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/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/commands/naimkatiman/continuous-improvement/companion-preference"><img src="https://agentmods.dev/badge/commands/naimkatiman/continuous-improvement/companion-preference.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.00024 | $0.00829 |
| Opus 5.5 | $0.00010 | $0.00332 |
| Sonnet 5.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 3mo 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.
- 3mo 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 (11 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 829 once invoked, about $0.0001 per session on Opus 5.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.
companion-preference compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| companion-preferencenaimkatiman/continuous-improvement | Command | 11 | 3d ago | MIT | B | 24 | Claude Code |
| rao92265/claude-code-playbook | Command | 13 | 13d ago | MIT | A | 12 | Claude Code |
| reflect-metahaddock-development/claude-reflect-system | Command | 387 | 10mo ago | none | A | 10 | Claude Code |
| reflect-statshaddock-development/claude-reflect-system | Command | 387 | 10mo ago | none | A | 6 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | today | MIT | A | 27 | Claude Code |
| analyzegithub/spec-kit | Command | 153k | today | MIT | A | 26 | Claude Code |