cairn-apply

cairn-apply is a skill for Claude Code, Codex from sdotj/sleeper-bot. It costs 38 tokens per session (1,510 once invoked), scanned A, a copy of cairn-apply, MIT.

A workflow for applying a planned code change from proposal, design, and task files, then checking that the result meets the project's acceptance requirements.

In plain words
What is it for?
Use it to identify a change, implement its tasks, run the repository's tests and checks, and mark the change complete.
Why use it?
It gives an agent a defined path from an approved change description to implemented and verified code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sdotj/sleeper-bot/cairn-apply
Any agent
npx skills add sdotj/sleeper-bot --skill cairn-apply
Clone the repo
git clone --depth 1 https://github.com/sdotj/sleeper-bot

Made for: Claude Code, Codex.

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

agentmods badge for cairn-apply

README.md
[![agentmods](https://agentmods.dev/badge/skills/sdotj/sleeper-bot/cairn-apply.svg)](https://agentmods.dev/skills/sdotj/sleeper-bot/cairn-apply)
Your own site
<a href="https://agentmods.dev/skills/sdotj/sleeper-bot/cairn-apply"><img src="https://agentmods.dev/badge/skills/sdotj/sleeper-bot/cairn-apply.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.01510
Opus 5 $0.00019 $0.00755
Sonnet 5 $0.00008 $0.00302
Haiku 4.5 $0.00004 $0.00151

Measured 4d ago against content hash 8e6a41c562c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cairn-apply scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to cairn-apply — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/cairn-apply/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apply a change: implement its tasks, prove the outcome, and accept it.

Prerequisites

  • A change directory exists at meta/changes/<change-id>/
  • proposal.md, design.md, and tasks.md are present

Steps

  1. Identify the change to apply

    If the user doesn't specify a change:

    cairn change list
    
  2. Read the change artifacts

    Read proposal.md, design.md, and tasks.md. The proposal names the outcome and the acceptance boundary you have to reach; treat that as the definition of done, not the task checkboxes.

  3. Implement the tasks in order

    For each unchecked task, implement it and mark it complete in tasks.md. Run whatever narrow test or check covers just that task as you go. Let the repository decide commit granularity; most expect one reviewable commit per change, not one per task.

  4. Run the host repository's own gates

    This is the target repository's call, not Cairn's. In order of authority:

    1. Instructions the repository gives you (AGENTS.md, CLAUDE.md, CONTRIBUTING.md, a documented script such as scripts/*gates*.sh).
    2. The gates: list in cairn.config.yaml, if the project configures one.
    3. The project's ordinary build and test commands for its language.

    Run only batteries from the project's own language. If you cannot tell what the gates are, ask rather than guessing.

  5. Prove the outcome at its own claim boundary

    A green internal check is evidence about the code, not about the claim. Prove the thing the proposal actually promised, at the nearest place it becomes observable:

    Claim Insufficient Proof at the boundary
    Behavioural change unit test passes run the command or call the API and show the new observable result
    UI change component test passes load the surface and confirm the rendered state
    Generated output generator has no errors diff the regenerated artefact and show the delta is the intended one
    Operational change config parses exercise the path in a running instance, or state plainly that you could not
    Bug fix new test passes reproduce the original failure first, then show that reproduction now passes

    If a boundary is genuinely out of reach in this environment, say so and name what would close it. Do not upgrade a partial check into a completeness claim.

  6. Run Cairn's acceptance boundary

    cairn change accept <change-id>
    

    This resolves and runs the project's language battery, then checks Cairn's own invariants: cairn lint, and the suggested-edges queue.

    accept picks the battery in this order: an explicit gates: list in cairn.config.yaml wins (an explicit empty list deliberately runs nothing); otherwise a Rust project falls back to a built-in cargo battery; every other language reports an informational note that no default battery exists and continues to the language-agnostic checks. That note means "configure gates: if you want Cairn to run them", not "this project has no gates". You are still responsible for step 4.

    CC002 means the change's meta/changes/<change-id>/suggested-edges.json still holds entries whose triage_state is pending. Those are machine suggested blueprint edges, and Cairn will not let them enter the graph without a human decision. Resolve it by setting each entry's triage_state to accepted, rejected, or deferred (with a triage_note when the reason is not obvious), then re-run accept. Do not delete the queue to clear the gate.

  7. Report

    Summarise what was implemented, the evidence for the outcome, and anything you could not prove.

Mutation authority

You may, without asking: edit source, tests, and docs inside the change's scope; create and edit files the design calls for; run builds, tests, linters, and read-only commands; run cairn commands that write inside meta/ (todo set, change accept).

Read the full file on GitHub · 143 lines

Changes

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.

  1. 4d ago First seen · 143 lines · 38 tokens per session scan A 8e6a41c562c0

Subscribe to this mod's changes

cairn-apply is a skill published in the GitHub repository sdotj/sleeper-bot (0 stars, last pushed 7d ago), licensed MIT. It adds 38 tokens to every session and 1,510 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cairn-apply, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens