Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/naimkatiman/continuous-improvementnpx agentmods add commands/naimkatiman/continuous-improvement/companion-preferenceWrote 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/commands/naimkatiman/continuous-improvement/companion-preference)<a href="https://agentmods.dev/commands/naimkatiman/continuous-improvement/companion-preference"><img src="https://agentmods.dev/badge/commands/naimkatiman/continuous-improvement/companion-preference.svg" alt="Measured on agentmods" 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.00024 | $0.00829 |
| Opus 5 | $0.00012 | $0.00415 |
| Sonnet 5 | $0.00005 | $0.00166 |
| Haiku 4.5 | $0.00002 | $0.00083 |
Grade B, and why
companion-preference scanned grade B 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 6d 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.
3. If the CLI prints "no telemetry recorded yet," check three things in order: (a) `~/.claude/settings.json` has `continuous_improvement.companion_preference` set (otherwise the hook is a no-op and writes nothing); (b) t How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/companion-preference
Read and aggregate the JSONL telemetry written by hooks/companion-preference.mjs. Reports per-skill totals, action breakdown (observation, advisory, block, block-not-installed), and the share of events where the companion plugin was installed at the time.
The dataset is the evidence base for a future companions-first default-flip decision — once a 7-day shadow shows the companions-first path firing on a meaningful share of routed Skill calls, with companions installed in the majority of them, the flip is grounded.
Trigger phrases
/companion-preference/companion-preference status- "show companion preference stats"
- "what does the companion-preference hook see"
What happens
- Run
node bin/companion-preference-status.mjsfrom the repo root with the operator's chosen window. Default--days 7. Pass--allfor the entire file or--days Nfor a different window. - Render the table the CLI emits to the user verbatim. Do not paraphrase the numbers — the JSONL is authoritative.
- If the CLI prints "no telemetry recorded yet," check three things in order: (a)
~/.claude/settings.jsonhascontinuous_improvement.companion_preferenceset (otherwise the hook is a no-op and writes nothing); (b) the user has invoked at least one mapped CI skill (tdd-workflow,verification-loop,context-budget,ralph,learn-eval) since the hook landed; (c) the hook's PreToolUse registration is intact inplugins/continuous-improvement/hooks/hooks.json. - Offer one decision-ready next step based on the totals — e.g., "ratio of
observationrows withcompanion_installed=truesuggestscompanions-firstis safe to flip for X but not Y."
Subcommands
/companion-preference status (default)
Same as /companion-preference.
/companion-preference status --json
Emit the machine-readable JSON report. Useful when you want to pipe the output into another tool or write your own aggregator.
node bin/companion-preference-status.mjs --json --all
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.
- 6d ago First seen · 59 lines · 24 tokens per session scan B 05cc42843ed6
companion-preference is a command published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 829 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
ap-swarm
Run a MultiAgentRuntime swarm in file mode — local journal at .runtime/conversation.md, no network.
reflect-promote
Promote learnings from skills to global CLAUDE.md.
reflect-meta
Show meta-learning statistics and pattern performance.
reflect-stats
Show cross-skill learning statistics.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.