Cairn Vibe Session

Cairn Vibe Session is a command for Claude Code from cairn-framework/cairn. It costs 32 tokens per session (4,046 once invoked), scanned A, original, Apache-2.0.

An attended workflow for completing a themed block of software work through Cairn, with a human approving the direction and release plan first. It runs the work in separate units and checks the changed files before release.

In plain words
What is it for?
Use it to carry out a release-sized group of Cairn tasks, review each unit, land it as its own pull request, and release according to the agreed plan.
Why use it?
It turns a broad release theme into reviewed pieces of work while keeping the overall direction approved in advance.

Command for Claude Code

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 commands/cairn-framework/cairn/cairn-vibe
Clone the repo
git clone --depth 1 https://github.com/cairn-framework/cairn

Made for: Claude Code.

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 Vibe Session

README.md
[![agentmods](https://agentmods.dev/badge/commands/cairn-framework/cairn/cairn-vibe.svg)](https://agentmods.dev/commands/cairn-framework/cairn/cairn-vibe)
Your own site
<a href="https://agentmods.dev/commands/cairn-framework/cairn/cairn-vibe"><img src="https://agentmods.dev/badge/commands/cairn-framework/cairn/cairn-vibe.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.1 $0.00032 $0.04046
Opus 5 $0.00016 $0.02023
Sonnet 5 $0.00006 $0.00809
Haiku 4.5 $0.00003 $0.00405

Measured 5d ago against content hash 19740e162d39, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

Cairn Vibe Session 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 5d 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.

.claude/commands/cairn-vibe.md · 284 lines

How it starts

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

Run a Cairn Vibe Session: the attended, director-style cousin of /cairn-loop. The human is the director whose hands are off the keyboard, driving worker CLI sessions (a fast low-latency model for mechanical work, a good strong model for judgment) and verifying their output by reading. Never take a worker's word: open the touched files and confirm the change meets the success criterion.

Whereas /cairn-loop is autonomous and works one unit at a time, /cairn-vibe picks a release-sized themed block of work, gets the maintainer's approval of the direction and the release plan together up front, then executes the whole arc hands-off, landing each unit as an independently-reviewed PR, and finishes by releasing per the pre-approved plan.

Input: the argument after /cairn-vibe is an optional theme hint, area, or direction (e.g. /cairn-vibe webui findings). With no argument, derive a theme from live graph state (cairn status, its open-todo list, cairn next, and per-node cairn todos <node>). cairn frontier is an optional secondary signal for ghost-node / architecture pressure only; it is not the todo source.

Setup

Cairn must reflect current source. Do all director build and query work in a dedicated director worktree, never the main checkout. Running cairn scan or a build in the main checkout rewrites the tracked, committed map.json snapshot and dirties it. Create the worktree first. Each tool call is independent: the cwd and environment do not carry across calls. A lone cd or export PATH does not affect the next call, so bind every director command to its concrete path in the same call.

Pick and record a unique concrete director worktree path, never a fixed shared name. This example uses /tmp/cairn-director-1699999999; substitute a unique suffix and reuse that exact literal in every Setup/Orient command and at teardown.

(<main-checkout> is the path to your primary clone, e.g. the repo root; substitute the real path in every command.)

git -C <main-checkout> fetch origin
git -C <main-checkout> worktree add --detach /tmp/cairn-director-1699999999 origin/main
( cd /tmp/cairn-director-1699999999 && cargo build --release )

Use /tmp/cairn-director-1699999999 only for Setup and Orient. Run every Setup/Orient cairn command via /tmp/cairn-director-1699999999/target/release/cairn <args> (or cd /tmp/cairn-director-1699999999 && ./target/release/cairn <args> in each call). Do not rely on an exported PATH, a persisted cwd, or a $DIRECTOR_WT variable across calls.

Roles (RACI)

  • Workers: implement the unit, add or extend tests, push the feature branch, and open the unit PR (gh pr create). Mechanical units go to fast; design or judgment units go to good.
  • Director: runs Setup and Orient (read-only cairn queries plus the local cargo build --release) in the dedicated director worktree, never the main checkout, and runs a fresh local cargo build --release in each post-merge verification worktree. The director commissions the two reviewer subagents, adjudicates, and squash-merges when CI is green and review is satisfied. For release, the director (directly or via a dedicated release worker) opens the release-prep PR and creates the tag, only after the phase-2 disposition and after confirming no material divergence. The director MUST NOT implement unit or product code.

Steps

Work the six phases in order. Do not advance until a phase's exit criterion is met. Ephemeral in-session phase tracking is fine for this session's own progress. Durable cross-session work items go through cairn todo new <slug> --node <id> and status edits via cairn todo set on the resulting meta/todos/todo.<slug>.md (this repo's native tracker), not bd.

  1. Orient - in the dedicated director worktree from Setup, never the main checkout, run /tmp/cairn-director-1699999999/target/release/cairn status, /tmp/cairn-director-1699999999/target/release/cairn change list, /tmp/cairn-director-1699999999/target/release/cairn next, /tmp/cairn-director-1699999999/target/release/cairn lint --json, and (per candidate node) /tmp/cairn-director-1699999999/target/release/cairn todos <node>. Optionally glance at /tmp/cairn-director-1699999999/target/release/cairn frontier as a secondary signal for ghost-node / architecture pressure; do not treat it as a todo backlog. Record the baseline: /tmp/cairn-director-1699999999/target/release/cairn lint has no new findings (the one accepted deferred Info is fine) and exits 0; /tmp/cairn-director-1699999999/target/release/cairn hook all exits 0; and /tmp/cairn-director-1699999999/target/release/cairn scan must be zero findings (run it now if not already clean). Triage any pre-existing scan finding or new lint finding before proposing a block. Name the open unblocked todos and which todos are already blocked on maintainer authorisation or an external dependency. At Orient's end, immediately remove the director worktree: git -C <main-checkout> worktree remove --force /tmp/cairn-director-1699999999. It exists only for Setup and Orient. Exit criterion: if there are no open unblocked todos and no actionable next unit, report the state and stop (do not manufacture work); otherwise proceed to phase 2 with a written backlog snapshot.

Read the full file on GitHub · 284 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. 5d ago First seen · 284 lines · 32 tokens per session scan A 19740e162d39

Subscribe to this mod's changes

Cairn Vibe Session is a command published in the GitHub repository cairn-framework/cairn (41 stars, last pushed yesterday), licensed Apache-2.0. It adds 32 tokens to every session and 4,046 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.