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/komluk/scaffolding/learngit clone --depth 1 https://github.com/komluk/scaffoldingWhat 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 | $0.00000 | $0.01331 |
| Opus 5 | $0.00000 | $0.00665 |
| Sonnet 5 | $0.00000 | $0.00266 |
| Haiku 4.5 | $0.00000 | $0.00133 |
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 — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/learn Command
Distill a finished conversation into classified knowledge candidates and propose (never auto-apply) memory writes or a new-skill hand-off. Closes the loop between a completed agent chain and the persistent memory system.
Usage
/learn [conversation_id]
conversation_id is optional — when omitted, the active conversation is used. It
MUST be a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
What It Does
- Resolves the
conversation_id - Locates
context.md, the design## Decisionssection, and drains any low-confidence candidates queued in.scaffolding/.ingest-queue - Exits cleanly if there is nothing to distill
- Distills the conversation into knowledge candidates
- Classifies each candidate: memory entry vs new-skill proposal
- Dry-run proposes the changes; applies only on explicit confirmation
Apply the distill skill (Conversation-Scoped Distillation + Skill Promotion
Criterion) and the agent-memory skill (Learning Loop) throughout.
Steps
Follow these steps exactly.
1. Resolve the conversation_id
CONV_ID="$1"
if [ -z "$CONV_ID" ]; then
# Default: most recently modified conversation directory.
CONV_ID=$(ls -1dt .scaffolding/conversations/*/ 2>/dev/null | head -1 | xargs -r basename)
fi
UUID_RE='^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
if ! echo "$CONV_ID" | grep -qE "$UUID_RE"; then
echo "ABORT: '$CONV_ID' is not a valid conversation UUID."
exit 1
fi
echo "Conversation: $CONV_ID"
2. Locate the input files
CONV_DIR=".scaffolding/conversations/$CONV_ID"
CONTEXT_FILE="$CONV_DIR/agent-memory/context.md"
DESIGN_FILE="$CONV_DIR/specs/design.md"
if [ ! -f "$CONTEXT_FILE" ]; then
echo "Nothing to distill: $CONTEXT_FILE does not exist."
echo "The /learn command exits cleanly — no conversation memory to process."
exit 0
fi
echo "Found context: $CONTEXT_FILE"
if [ -f "$DESIGN_FILE" ]; then
echo "Found design: $DESIGN_FILE"
else
echo "No design.md — distilling from context.md only."
fi
# Drain low-confidence candidates queued by the memory-ingest Stop hook.
INGEST_QUEUE=".scaffolding/.ingest-queue"
if [ -s "$INGEST_QUEUE" ]; then
echo "Found ingest queue: $INGEST_QUEUE ($(wc -l < "$INGEST_QUEUE") lines)"
fi
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 · 149 lines · 0 tokens per session scan A 24c9253d0f6c
learn is a command published in the GitHub repository komluk/scaffolding (15 stars, last pushed 27d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,331 tokens. 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-30.
Other commands, from other repositories
auto
Intent-classified router, the front door to OrchestKit and the DEFAULT entry point for any goal-shaped request. Classifies a plain-English goal and routes it to the right specialist skill. Routing is never overhead, so use it even when the target skill seems obvious; skip only when already executing inside another…
node-skill
Generate a Claude skill for a ComfyUI custom node pack.
evolve
Cluster hardened instincts into a proposed Command / Skill / Agent (Instinct Engine).
sessions
The work-item ↔ harness-session registry, the five execution-control commands, and the reset that forgets a work item entirely.
autonomy
Set Heimdall autonomy (1=Guided, 2=Checkpoint, 3=Full Auto) — how much the agent does before asking. Use with a number, +/- to cycle, or no argument to show current.
orch
Launch orchestrator mode with subagent delegation, monitoring, mode-aware execution, and chat compression.