cairn-statusline-setup

cairn-statusline-setup is a command for Claude Code from isaacriehm/cairn. It costs 23 tokens per session (1,794 once invoked), scanned B, original, MIT.

A one-time setup command that adds a Cairn status badge to Claude Code's user settings. The badge appears in every Claude Code session.

In plain words
What is it for?
Use it to configure the status line and show task progress, pending decisions, context usage, and related project signals.
Why use it?
It avoids checking separate files or tools to see the project's current tasks, decisions, and other Cairn signals.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cairn plugin — 5 skills, 4 commands, 5 agents, 5 hooks, 1 MCP server shipped together

Good fit Use it to configure the status line and show task progress, pending decisions, context usage, and related project signals.

Compare 6 commands from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add isaacriehm/cairn
Claude Code
/plugin install cairn

Made for: Claude Code.

Or install cairn, the plugin that ships this one along with the rest of its 5 skills, 4 commands, 5 agents, 5 hooks, 1 MCP server.

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-statusline-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/isaacriehm/cairn/cairn-statusline-setup.svg)](https://agentmods.dev/commands/isaacriehm/cairn/cairn-statusline-setup)
Your own site
<a href="https://agentmods.dev/commands/isaacriehm/cairn/cairn-statusline-setup"><img src="https://agentmods.dev/badge/commands/isaacriehm/cairn/cairn-statusline-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00023 $0.01794
Opus 5 $0.00012 $0.00897
Sonnet 5 $0.00005 $0.00359
Haiku 4.5 $0.00002 $0.00179

Measured 8d ago against content hash 648676e253fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

cairn-statusline-setup scanned grade B with 2 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 8d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Wire this developer's `~/.claude/settings.json` statusline to the

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

"command": "node -e \"const f=require('node:fs'),{homedir}=require('node:os'),{join}=require('node:path'),{spawnSync}=require('node:child_process');const C=join(homedir(),'.claude','plugins','cache');const newest=a=>{let
packages/cairn-plugin/commands/cairn-statusline-setup.md · 142 lines

How it starts

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

/cairn:cairn-statusline-setup

Wire this developer's ~/.claude/settings.json statusline to the cairn bundle. Once configured, every Claude Code session shows a compact one-line badge in the prompt's status row:

⬡ cairn  [signal]  [ctx-meter pct%]

Signal priority (first match wins):

  • ⏳ adopt <phase> X/Y (P%) ~Nm — live during cairn-adopt long phases
  • ⚠ N unattested — bypass commits since cairn init
  • ⚑ N pending — pending decision drafts in attention queue
  • ◐ gc — GC sweep in progress
  • TSK-... <title> — active task in flight
  • ✓ N·Midle heartbeat showing N decisions and M invariants in scope (positive signal that Cairn is alive)
  • (empty) — fresh adoption with no ground state yet; just brand + ctx meter

Step 1 — surface the inline prompt

Render via AskUserQuestion:

Wire the cairn statusline into your user-level settings? It shows a one-line ground-state summary in every Claude Code session.

  • [a] set it up now
  • [b] skip — re-run /cairn:cairn-statusline-setup later

Step 2 — locate the shim file

The plugin's SessionStart hook writes the bundle's current path to ~/.claude/plugins/cache/<slug>/.active-version-path on every session open, where <slug> is the marketplace name Claude Code installed the plugin under. The shim is a single line: the absolute path to the active dist/cli.mjs. Resolve it with a Node glob over ~/.claude/plugins/cache/*/.active-version-path that picks the most-recently-written shim by mtime — never hardcode the slug:

const { readdirSync, statSync } = require('node:fs');
const { homedir } = require('node:os');
const { join } = require('node:path');
const base = join(homedir(), '.claude', 'plugins', 'cache');
let shim = null, newest = 0;
for (const slug of readdirSync(base)) {
  const p = join(base, slug, '.active-version-path');
  try {
    const m = statSync(p).mtimeMs;
    if (m >= newest) { newest = m; shim = p; }
  } catch {}
}

If empty, the plugin's SessionStart hook hasn't fired even once for the current install. Surface this enumerated cause list:

Read the full file on GitHub · 142 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. 8d ago First seen · 142 lines · 23 tokens per session scan B 648676e253fe

Subscribe to this mod's changes

cairn-statusline-setup is a command published in the GitHub repository isaacriehm/cairn (6 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 1,794 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.