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.
npx agentmods add commands/avelikiy/great_cto/learngit clone --depth 1 https://github.com/avelikiy/great_ctoWrote 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/avelikiy/great_cto/learn)<a href="https://agentmods.dev/commands/avelikiy/great_cto/learn"><img src="https://agentmods.dev/badge/commands/avelikiy/great_cto/learn.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.00043 | $0.00846 |
| Opus 5 | $0.00022 | $0.00423 |
| Sonnet 5 | $0.00009 | $0.00169 |
| Haiku 4.5 | $0.00004 | $0.00085 |
Grade A, and why
learn 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 2d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the great_cto /learn slash command. Trigger the continuous-learner subagent to extract lessons from the current session and write to .great_cto/lessons.md.
When to use this command
The continuous-learner runs automatically on session end (via the SessionEnd hook). Use /learn manually when:
- A session ends without invoking the hook (e.g. force-quit, crash recovery)
- You just made a notable decision and want to capture it before context drifts
- You want a focused extraction (e.g. only cost-related lessons):
/learn cost - You're debugging the learner itself
Step 1 — Validate context
# Must be in a great_cto-managed project
[ -f .great_cto/PROJECT.md ] || { echo "ERROR: no .great_cto/PROJECT.md — not a great_cto project"; exit 1; }
# Need *some* session activity to learn from
COMMITS=$(git log --oneline --since="8 hours ago" 2>/dev/null | wc -l | tr -d ' ')
WRITES=$(wc -l < .great_cto/agent-writes.log 2>/dev/null || echo 0)
[ "$COMMITS" -eq 0 ] && [ "$WRITES" -eq 0 ] && { echo "No session activity detected — nothing to learn from."; exit 0; }
Step 2 — Invoke continuous-learner subagent
Use the Task tool to spawn the subagent. Pass the user's optional focus argument:
Task(subagent_type="continuous-learner", description="Extract session lessons", prompt="""
Extract lessons from the current session. Read recent commits, agent writes,
cost log, beads activity, and reviewer verdicts. Apply quality gates strictly —
silence > noise.
Focus: $ARGUMENTS
If the user said "cost", emphasize cost-outlier patterns (shape B).
If the user said "security", emphasize reviewer-catch patterns (shape A).
If the user said "architecture", emphasize tool/library decisions (shape E).
Otherwise apply all 5 shapes.
Output one summary line at the end.
""")
Step 3 — Surface results
After the subagent completes, show the user:
✓ Continuous-learner finished
Wrote: <N> new lessons → .great_cto/lessons.md
Rejected: <M> candidates (didn't pass quality gates)
Promoted: <P> patterns → ~/.great_cto/decisions.md
Latest lesson preview:
─────────────────────
$(tail -25 .great_cto/lessons.md 2>/dev/null)
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.
- 2d ago First seen · 84 lines · 43 tokens per session scan A acb355922d1c
learn is a command published in the GitHub repository avelikiy/great_cto (89 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 846 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-09-03.
Other commands, from other repositories
export
Export a saved context as a bundle folder you can share.
rekindle
Recover a fellowship after a session crash. Scans worktrees and state files, presents a recovery dashboard, and re-spawns Gandalf with recovered quest context. Use when returning to a crashed or expired fellowship session.
delete
Delete a NeatContext Context.
disconnect
Disconnect the NeatContext context from this session.
learn
Codify implicit codebase knowledge as agent rules.
pm-crystallize
Promote a project-local lesson to /.great-pm/decisions.md (cross-project memory) when it has 3+ hits with high confidence. Surfaces candidates as PROPOSALS — never auto-promotes; human approval required.