/ab-method:adopt-or-buildfrom ab-method
Searches for open-source libraries before building features, evaluating each piece for adoption vs. building based on maintenance, compatibility, and scope.
Ships in ab-method. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every piece of a feature gets one verdict: adopt a library or build it. Adopt only a healthy library that removes real work. Build when no healthy library exists, or when the piece is small enough that a dependency costs more than the code.
The repo's own rules win. Read AGENTS.md, CLAUDE.md, CONTRIBUTING.md, the tech-stack doc and the ADRs for banned or preferred dependencies, licence policy and supported runtimes. An ADR that decided to build something is not reopened unless the user asks. In an AB Method repo, read .ab-method/structure/index.yaml first: it says where those docs live.
For any capability, whatever placement you lean towards (reusing an installed library included), when either holds:
Skip it for:
Break the feature or bug into pieces: the separate capabilities it needs (parsing, retries, rendering, scheduling). Mark each hard or trivial.
Then read the project's exact stack from the manifests and lockfile, never from memory:
Done when every piece has a one-line description and the stack is written down with versions.
For each piece, look for existing code that already covers it:
package.json, pyproject.toml, go.mod, Cargo.toml), including what they offer beyond what the repo uses todayMark each piece:
file:line). Reuse it; no health check. An internal wrapper around a library is covered by a dependency: check the library.Done when every piece is marked. Adding a second library for a job a healthy installed one already does is the redundancy this skill exists to prevent.
For each open or dependency-covered hard piece, search the package registry, GitHub and the framework's own docs and ecosystem lists. Collect up to three candidates per piece, starting with the ones the ecosystem treats as the default.
Done when every open piece has its candidates listed, or a note that the search found none.
A library is healthy only when it passes every check below. Gather the numbers with the commands; never estimate them or recall them from training data, which is out of date by definition.
| Check | Bar | How |
|---|---|---|
| Maintained | a release in the last 6 months, or human commits in the last 3 months on a mature library (bot and Dependabot pushes don't count); not archived; not deprecated | npm view <pkg> time deprecated, gh repo view <owner/repo> --json pushedAt,isArchived, the recent commit list |
| Current | its latest major supports the project's current framework majors; adopting it needs no downgrade | changelog, npm view <pkg> peerDependencies engines |
| Responsive | a maintainer replied to issues or merged PRs in the last 6 months. A single maintainer passes, but write "single maintainer" in the Why column as a risk | the latest issues and PRs, gh api repos/<owner/repo>/contributors |
| Used | widely depended on for its ecosystem (for npm, roughly 10k+ weekly downloads); a niche library below that needs a reason | registry download stats, GitHub "Used by" |
| Safe | no open high or critical advisories on the version you would install | osv.dev (https://api.osv.dev/v1/query), GitHub advisories; npm audit only after install |
| Licence | compatible with the project's licence | npm view <pkg> license (gh repo view --json licenseInfo often returns null) |
| Fits exactly | see below | its docs, its manifest, a spike |
Fits exactly means each of these holds against the versions from step 1:
peerDependencies and engines accept the installed versions, not just a nearby range, in every runtime from step 1. Check the version you would install, not only the latest: a newer release may narrow enginesWhen fit is still uncertain, run a spike: install the exact version in a scratch directory outside the repo, with the project's TypeScript and Node versions, write the smallest call the piece needs, and typecheck or run it. Throw it away after. Never install into the repo while deciding.
Published outside the registry. Some libraries ship current releases only from their own server or CDN (SheetJS does), so the registry shows a stale version. Check the project's README for where it publishes. Judge the registry version as what npm install <pkg> gives you; the off-registry build passes only if the project accepts that install source.
Done when every candidate has a pass or fail on each check, with the number or link behind it. A candidate that fails any check is out, unless the user overrides it: an override is written as the verdict adopt (override: <failed check>, <reason>), never silently. An installed dependency that fails stays in the report as covered, unhealthy, with the failing checks, next to the healthy alternative.
For each healthy candidate, compare the work it removes against what it costs:
Adopt when the library handles the hard part and the glue is smaller than the code it replaces. Build when the piece takes a short function to write, or when the glue would match the library's size. A healthy installed dependency wins a tie; when a new candidate removes clearly more glue, or the installed one is unhealthy, say so and let the user choose. When a choice between candidates also decides architecture (where code runs: browser or server; sync or background), put that to the user as its own question instead of letting the tie-break settle it.
Done when every piece has a verdict with a one-sentence reason.
Send one table, then stop:
| Piece | Verdict | Library | Why |
| --- | --- | --- | --- |
| retries | adopt | [email protected] | handles backoff and abort; last release 3 weeks ago, 4 active contributors, ESM + types, Node 20 ✓ |
| CSV export | build | none | 15 lines with the built-in stream API; candidates unreleased since 2023 |
| date parsing | covered | date-fns (already installed) | `parseISO` covers the formats; released 2 months ago, healthy |
Under the table, list what adopting changes: the packages and exact versions to install, the module the library sits behind, and the files the glue code goes in. Keep the losing candidates in the table with the check they failed, and write down the date the checks ran, so a later reader knows why and how fresh the evidence is. Install packages only after the user agrees, pinned to the exact version that was checked, with no ^ or ~ range. When a reused dependency's manifest range would let a lockfile refresh pull a version that fails a check (a narrower engines, a new advisory), pin it too. A package already in the lockfile through another dependency keeps the locked version unless a check fails on it.
Done when every piece from step 1 appears in the table.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ayoubben18/ab-method --plugin ab-method36 skills in this plugin
/ab-analyze-backendAnalyze and document a project's backend patterns — API design, data access, service structure. Use when the user wants a backend-only architecture analysis./ab-analyze-frontendAnalyze and document a project's frontend patterns — component structure, state management, conventions. Use when the user wants a frontend-only architecture analysis./ab-analyze-projectAnalyze a project's architecture end to end — extract domain language, map the tech stack, document frontend and backend patterns. Use when onboarding a new codebase or refreshing the architecture baseline.Other plugins' skills for the same job