Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/commands/naimkatiman/continuous-improvement/harvest)<a href="https://agentmods.dev/commands/naimkatiman/continuous-improvement/harvest"><img src="https://agentmods.dev/badge/commands/naimkatiman/continuous-improvement/harvest.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.00031 | $0.00865 |
| Opus 5 | $0.00015 | $0.00432 |
| Sonnet 5 | $0.00006 | $0.00173 |
| Haiku 4.5 | $0.00003 | $0.00086 |
Grade A, and why
harvest 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/harvest — Friction Harvest
Run the friction-harvest classifier against this project's observation log and append new typed instincts to instincts.jsonl. Idempotent on re-run.
What it does
Reads ~/.claude/instincts/<project-hash>/observations.jsonl produced by the Mulahazah hook, classifies failure rows into four typed friction patterns, scores confidence with a recency-weighted decay, and appends new instincts to <project-hash>/instincts.jsonl alongside.
| Type | What it catches |
|---|---|
env_issue |
jq missing, command not found, not recognized as cmdlet |
permission_block |
sandbox / harness blocked, Permission denied |
wrong_approach |
file changed since last read (parallel-actor stale) |
buggy_code |
file not read first, old_string ambiguous, file too large |
How to invoke
node bin/harvest-friction.mjs
node bin/harvest-friction.mjs <project-hash>
node bin/harvest-friction.mjs --list
--list shows new classifications without writing to instincts.jsonl — useful for dry-run before committing the harvest output.
Idempotency
Each instinct carries a dedup_key = sha1(type + tool + summary[:120]). Re-running on the same observations does not duplicate previously-written instincts; loadExistingDedupKeys() reads the destination file once at start.
Confidence model
confidence = log10(occurrence_count + 1) * recency_factor
recency_factor = 0.5 + 0.5 * exp(-days_since_last_seen / 14)
One occurrence today → 0.30. Ten occurrences today → clamped to 1.0. One occurrence 30 days ago → 0.17.
Output shape
harvest-friction project=0af156594b39
observations rows: 9346
tool_complete rows: 2104
classified failures: 47
thin-schema rows: 0
new instincts: 12
skipped (existing): 35
New instincts:
[0.92] env_issue on Bash (×8): bash: jq: command not found
[0.74] permission_block on Bash (×4): harness blocked direct push to main
...
Appended 12 instinct(s) to /Users/.../instincts/0af156594b39/instincts.jsonl
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 · 77 lines · 31 tokens per session scan A eec5bb708d02
harvest is a command published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed 11d ago), licensed MIT. It adds 31 tokens to every session and 865 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-31.
Other commands, from other repositories
meta-learn
Capture post-session learnings and compound intelligence across skills.
meta-synthesis
Detect cross-skill patterns and propose brain updates.
rust-teach
One-time setup that scans your Rust project, understands its patterns and conventions, and writes a Rust-specific context section to your CLAUDE.md. Run once per project to establish persistent Rust guidelines.
build-brain
Build or update your GTM brain — product context, ICP, positioning, voice, market context, and proof points.
f5-ctx
Context and session management - save, restore, optimize.
f5-context
This command has been consolidated into /f5-ctx.