Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add isaacriehm/cairn/plugin install cairnWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/isaacriehm/cairn/cairn-adopt-components)<a href="https://agentmods.dev/skills/isaacriehm/cairn/cairn-adopt-components"><img src="https://agentmods.dev/badge/skills/isaacriehm/cairn/cairn-adopt-components/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/isaacriehm/cairn/cairn-adopt-components"><img src="https://agentmods.dev/badge/skills/isaacriehm/cairn/cairn-adopt-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.03339 |
| Opus 5 | $0.00013 | $0.01670 |
| Sonnet 5 | $0.00005 | $0.00668 |
| Haiku 4.5 | $0.00003 | $0.00334 |
Grade A, and why
cairn-adopt-components scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
const cp=require("node:child_process"); How it starts
The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: cairn-adopt-components
Host portability
This skill is shared by Claude Code, Cursor, and Codex. Use the host's
structured question UI when available; otherwise ask the same concise A/B/C
question in chat and pause. Named subagent briefs live under ../../agents/:
dispatch by name where supported, or read the brief and pass it to the host's
native subagent tool. Execute inline only when no subagent tool exists.
You are backfilling Cairn's component store into an already-adopted
project — the one-time work the adoption pipeline does for fresh repos,
applied to a repo that predates the store. The goal: every component
file carries a @cairn registry header, the derived index is built, and
@singleton headers become §INVs. Spec: docs/PLUGIN_ARCHITECTURE.md
§6 (the component trio 9d→9e→9f) and docs/COMPONENT_STORE_PLAN.md.
This skill drives the bundled dist/cli.mjs internally using the plugin-root
variable supplied by the active host (PLUGIN_ROOT, CURSOR_PLUGIN_ROOT, or
CLAUDE_PLUGIN_ROOT). Never
surface a CLI subcommand to the operator (Plugin spec §11) — the chat
shows progress + consent gates, not commands.
Step 0 — classify the repo
Run this single probe to decide whether backfill applies. It is
ghost-aware: a ghost-adopted repo has no in-repo .cairn/ — its state
lives out-of-repo at ~/.cairn/state/<root-commit>/. The probe resolves the
effective state home (in-repo when present, else the out-of-repo ghost dir
keyed on the repo's root-commit) and prints <mode> <verdict> <home>:
node -e '
const fs=require("node:fs");
const os=require("node:os");
const path=require("node:path");
const cp=require("node:child_process");
const root=process.cwd();
let mode="committed";
let home=path.join(root,".cairn");
if(!fs.existsSync(home)){
// No in-repo .cairn — may be ghost-adopted. Ghost state lives at
// ~/.cairn/state/<repo-id>; repo-id is the move-stable root-commit SHA
// (matches registerGhostRepo). Resolve it and probe there instead.
let rc="";
try{rc=cp.execFileSync("git",["-C",root,"rev-list","--max-parents=0","HEAD"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().split(/\s+/)[0]||"";}catch{}
if(rc){const g=path.join(os.homedir(),".cairn","state",rc);if(fs.existsSync(g)){home=g;mode="ghost";}}
}
const cfg=path.join(home,"config.yaml");
const idx=path.join(home,"ground","components");
if(!fs.existsSync(home)||!fs.existsSync(cfg)){console.log(mode+" not-adopted "+home);process.exit(0);}
let hasBlock=false;
try{hasBlock=/^components:/m.test(fs.readFileSync(cfg,"utf8"));}catch{}
const hasIndex=fs.existsSync(idx)&&fs.readdirSync(idx).length>0;
console.log(mode+" "+(hasBlock&&hasIndex?"has-store":"backfill")+" "+home);'
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 281 lines · 26 tokens per session scan A d4e6bd3ca44d
cairn-adopt-components is a skill published in the GitHub repository isaacriehm/cairn (6 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 3,339 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
reverse-architecture
Reverse-engineer a system's architecture from what already exists — a code repo, Terraform / CloudFormation / Pulumi / Bicep, Kubernetes manifests, docker-compose, a database schema, an OpenAPI spec, or a package manifest — and produce a renderable diagram (Mermaid / C4 / PlantUML) plus a written description suitable…
api-contract-draft
Draft an OpenAPI 3.1 contract from a feature brief or story — resource-oriented paths, a full error catalog (RFC 9457), pagination/idempotency/versioning decided not deferred, examples on every operation, plus a decisions log so review argues choices instead of YAML. Use when the user wants to design an API, draft an…
stripe-projects
Provision SaaS services + sync creds via Stripe Projects.
version-bump
Automated semantic versioning and release workflow for Claude Code plugins. Handles version increments across package.json, marketplace.json, plugin.json manifests, build verification, git tagging, GitHub releases, and changelog generation. NPM publishing is the final human-required handoff because the maintainer…
cloud-sync
Set up or check claude-mem cloud sync with cmem.ai Pro. Use when the user says "set up cloud sync", "sync my memories", "cmem pro", "cloud backup", "sync status", or wants their memory database backed up or synced to their cmem.ai account.
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.