From agentops
Mines session transcripts and extracts candidate learnings, then promotes validated entries to persistent knowledge stores.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agentops:forgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Cross-vendor analog:** the capture half of Anthropic Managed Agents' memory + dreaming pair (May 2026). Forge mines transcripts; `$curate --mode=dream` curates between sessions. Off the API, local, cross-vendor.
Cross-vendor analog: the capture half of Anthropic Managed Agents' memory + dreaming pair (May 2026). Forge mines transcripts;
$curate --mode=dreamcurates between sessions. Off the API, local, cross-vendor.
Typically runs automatically via SessionEnd hook.
Loop position: capture sub-step of move 7 in the operating loop. Extracts candidate learnings from transcripts; the promotion ratchet decides which ones survive (one-offs die at handoff; repeats promote to
.agents/learnings/). Forge is the funnel, not the filter.
Extract knowledge from session transcripts.
The SessionEnd hook runs:
ao forge transcript --last-session --queue --quiet
This queues the session for knowledge extraction.
| Flag | Default | Description |
|---|---|---|
--promote | off | Process pending extractions from .agents/knowledge/pending/ and promote to .agents/learnings/. Absorbs the former extract skill. |
Given /forge --promote:
ls -lt .agents/knowledge/pending/*.md 2>/dev/null
ls -lt .agents/ao/pending.jsonl 2>/dev/null
If no pending files found, report "No pending extractions" and exit.
For each file in .agents/knowledge/pending/:
# Learning:, **Category**:, **Confidence**:).agents/learnings/ (preserving filename).agents/knowledge/pending/if [ -f .agents/ao/pending.jsonl ] && [ -s .agents/ao/pending.jsonl ]; then
# Process each queued session
cat .agents/ao/pending.jsonl
# After processing, clear the queue
> .agents/ao/pending.jsonl
fi
Promoted N learnings from pending → .agents/learnings/
Queue cleared.
Done. Return immediately after reporting.
Given /forge [path]:
With ao CLI:
# Mine recent sessions
ao forge transcript --last-session
# Mine specific transcript
ao forge transcript <path>
Without ao CLI: Look at recent conversation history and extract learnings manually.
Read skills/forge/references/uncaptured-lesson-patterns.md for signal patterns and the 26 known uncaptured lesson categories.
Look for these patterns in the transcript:
| Type | Signals | Weight |
|---|---|---|
| Decision | "decided to", "chose", "went with" | 0.8 |
| Learning | "learned that", "discovered", "realized" | 0.9 |
| Failure | "failed because", "broke when", "didn't work" | 1.0 |
| Pattern | "always do X", "the trick is", "pattern:" | 0.7 |
Uncaptured Lesson Matching: During transcript scanning, match events against the 26 known uncaptured lesson patterns (see references/uncaptured-lesson-patterns.md). Pre-fill learning templates with matched pattern metadata (category, base confidence, pattern number tag).
Write to: .agents/forge/YYYY-MM-DD-forge.md
# Forged: YYYY-MM-DD
## Decisions
- [D1] <decision made>
- Source: <where in conversation>
- Confidence: <0.0-1.0>
## Learnings
- [L1] <what was learned>
- Source: <where in conversation>
- Confidence: <0.0-1.0>
## Failures
- [F1] <what failed and why>
- Source: <where in conversation>
- Confidence: <0.0-1.0>
## Patterns
- [P1] <reusable pattern>
- Source: <where in conversation>
- Confidence: <0.0-1.0>
if command -v ao &>/dev/null; then
ao forge markdown .agents/forge/YYYY-MM-DD-forge.md 2>/dev/null
else
# Without ao CLI: auto-promote high-confidence candidates to learnings
mkdir -p .agents/learnings .agents/ao
for f in .agents/forge/YYYY-MM-DD-*.md; do
[ -f "$f" ] || continue
# Extract confidence (numeric or categorical)
CONF=$(grep -i "confidence:" "$f" | head -1 | awk '{print $NF}')
# Normalize categorical to numeric: high=0.9, medium=0.6, low=0.3
case "$CONF" in
high) CONF_NUM=0.9 ;; medium) CONF_NUM=0.6 ;; low) CONF_NUM=0.3 ;; *) CONF_NUM=$CONF ;;
esac
# Auto-promote if confidence >= 0.7, prepending required frontmatter
if (( $(echo "$CONF_NUM >= 0.7" | bc -l) )); then
{ printf -- '---\ntype: learning\nsource: forge\ndate: %s\nmaturity: provisional\nutility: 0.5\n---\n' "$(date +%Y-%m-%d)"; cat "$f"; } > .agents/learnings/"$(basename "$f")"
TITLE=$(head -1 "$f" | sed 's/^# //')
echo "{\"file\": \".agents/learnings/$(basename $f)\", \"title\": \"$TITLE\", \"keywords\": [], \"timestamp\": \"$(date -Iseconds)\"}" >> .agents/ao/search-index.jsonl
echo "Auto-promoted (confidence $CONF): $(basename $f)"
fi
done
echo "Forge indexing complete (ao CLI not available — high-confidence candidates auto-promoted)"
fi
After extracting learnings that match uncaptured lesson patterns (Step 2), record which patterns were captured. This state lives in .agents/forge/capture-tracking.json (a runtime artifact, never in skills/).
mkdir -p .agents/forge
.agents/forge/capture-tracking.json if it exists, otherwise start with {}{
"3": {"captured": true, "date": "2026-03-30", "learning_path": ".agents/learnings/tooling/use-bin-cp.md"},
"7": {"captured": true, "date": "2026-03-29", "learning_path": ".agents/learnings/operations/worktree-commit.md"}
}
.agents/forge/capture-tracking.jsonPattern numbers correspond to the numbered headings in references/uncaptured-lesson-patterns.md (1-30, 26 total patterns).
Tell the user:
.agents/forge/capture-tracking.json)Forged candidates enter at Tier 0 (.agents/forge/), then promote to Tier 1
(.agents/learnings/) via human review, 2+ citations, or auto-promote when
confidence >= 0.7 (ao-free fallback).
See references/examples.md for the SessionEnd hook invocation walkthrough and manual transcript-mining walkthrough.
| Problem | Cause | Solution |
|---|---|---|
| No extractions found | Transcript lacks knowledge signals or ao CLI unavailable | Check transcript contains decisions/learnings; verify ao CLI installed |
| Low confidence scores | Weak signals or vague conversation | Focus sessions on concrete decisions and explicit learnings |
| forge --queue fails | CLI not available or permission error | Manually append to .agents/ao/pending.jsonl with session metadata |
| Duplicate forge outputs | Same session forged multiple times | Check forge filenames before writing; ao CLI handles dedup automatically |
cli/internal/feedbackcompiler)npx claudepluginhub boshu2/agentops --plugin agentopsExtracts reusable patterns from Claude Code sessions and saves them as learned skills for future use. Useful after long sessions with complex problem-solving.
Mines transcripts, .agents, bd, and git for skill diffs, bd updates, or rare wiki entries. Never mutates code.
Distils repeating patterns from session logs and lessons into draft skill files. Run after 10+ sessions to extract durable knowledge.