← Browse

@elliotfriend/adding-an-anchor

B

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.

skillclaude

Install

agr install @elliotfriend/adding-an-anchor --target claude

Writes 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.

  1. 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 the debug?: boolean flag described in CLAUDE.md and cover both logging behaviors with tests.
  2. src/lib/server/<name>Instance.ts — singleton getter reading env vars, passing debug: dev from $app/environment.
  3. src/lib/api/<name>.ts — client-side fetch wrappers per route. Mirror the per-provider shape in etherfuse.ts / testanchor.ts.
  4. src/routes/api/anchor/<name>/<operation>/+server.ts — one route per operation.
  5. src/routes/anchors/<name>/+page.svelte (landing) and <name>/<flow>/+page.svelte per flow. Compose primitives from src/lib/components/. Use AnchorRegionSelector for the region section. Don't try to share flow logic with another anchor in this PR — let it duplicate.
  6. Add the provider to src/lib/constants.ts (PROVIDER).
  7. Add to src/lib/config/anchors.ts (ANCHORS).
  8. Add to src/lib/config/regions.ts if the anchor serves a region.
  9. Add tests under tests/anchors/<name>/.
  10. 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