@elliotfriend/adding-an-anchor
BUse when adding a new anchor integration to this project — creating an anchor client, its server singleton, API wrappers, proxy routes, and flow pages, or deciding whether a new anchor belongs in ANCHORS vs HONORABLE_MENTIONS.
Install
agr install @elliotfriend/adding-an-anchor --target claudeWrites 1 file into .claude/skills/, pinned to git-bb00962d.
- .claude/skills/adding-an-anchor/SKILL.md
Document
name: adding-an-anchor description: Use when adding a new anchor integration to this project — creating an anchor client, its server singleton, API wrappers, proxy routes, and flow pages, or deciding whether a new anchor belongs in ANCHORS vs HONORABLE_MENTIONS.
Adding a new curated anchor
Each curated anchor owns its own client, server-side instance singleton, client-side API wrapper, API routes, and bespoke flow pages. Nothing is shared — see the per-provider isolation decision in CLAUDE.md.
src/lib/anchors/<name>/{client,types,index}.ts— shaped however the anchor's API actually works. No interface to satisfy. Define your own error class. Include thedebug?: booleanflag described inCLAUDE.mdand cover both logging behaviors with tests.src/lib/server/<name>Instance.ts— singleton getter reading env vars, passingdebug: devfrom$app/environment.src/lib/api/<name>.ts— client-side fetch wrappers per route. Mirror the per-provider shape inetherfuse.ts/testanchor.ts.src/routes/api/anchor/<name>/<operation>/+server.ts— one route per operation.src/routes/anchors/<name>/+page.svelte(landing) and<name>/<flow>/+page.svelteper flow. Compose primitives fromsrc/lib/components/. UseAnchorRegionSelectorfor the region section. Don't try to share flow logic with another anchor in this PR — let it duplicate.- Add the provider to
src/lib/constants.ts(PROVIDER). - Add to
src/lib/config/anchors.ts(ANCHORS). - Add to
src/lib/config/regions.tsif the anchor serves a region. - Add tests under
tests/anchors/<name>/. - Document in
src/lib/anchors/<name>/README.md.
If it doesn't clear the bar
Add it to HONORABLE_MENTIONS in src/lib/config/anchors.ts instead — no client code needed. Give it a scorecard (via makeCriteria) so its gaps render. For a candidate you're still researching rather than rejecting, use the assessing-an-anchor skill.
Adding SEP support
If the anchor needs a SEP this project doesn't implement yet: create src/lib/anchors/sep/sep<N>.ts modeled on the existing modules (pure functions, optional fetchFn), add types to sep/types.ts, export from sep/index.ts, and cover it under tests/anchors/sep/.
Trustgrade B
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- warnLicenseno SPDX license detected
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-bb00962dd4db2026-07-31