extract
154
总安装量
20
周安装量
#3072
全站排名
安装命令
npx skills add https://github.com/boshu2/agentops --skill extract
Agent 安装分布
codex
19
claude-code
19
mcpjam
18
iflow-cli
18
zencoder
18
Skill 文档
Extract Skill
Typically runs automatically via SessionStart hook.
Process pending learning extractions from previous sessions.
How It Works
The SessionStart hook runs:
ao extract
This checks for queued extractions and outputs prompts for Claude to process.
Manual Execution
Given /extract:
Step 1: Check for Pending Extractions
ao extract 2>/dev/null
Or check the pending queue:
cat .agents/ao/pending.jsonl 2>/dev/null | head -5
Step 2: Process Each Pending Item
For each queued session:
- Read the session summary
- Extract actionable learnings
- Write to
.agents/learnings/
Step 3: Write Learnings
Write to: .agents/learnings/YYYY-MM-DD-<session-id>.md
# Learning: <Short Title>
**ID**: L1
**Category**: <debugging|architecture|process|testing|security>
**Confidence**: <high|medium|low>
## What We Learned
<1-2 sentences describing the insight>
## Why It Matters
<1 sentence on impact/value>
## Source
Session: <session-id>
Step 3.5: Validate Learnings
After writing learning files, validate each has required fields:
- Scan newly written files:
ls -t .agents/learnings/YYYY-MM-DD-*.md 2>/dev/null | head -5
-
For each file, check required fields:
- Heading: File must start with
# Learning: <title>(non-empty title) - Category: Must contain
**Category**: <value>where value is one of:debugging,architecture,process,testing,security - Confidence: Must contain
**Confidence**: <value>where value is one of:high,medium,low - Content: Must contain a
## What We Learnedsection with at least one non-empty line after the heading
- Heading: File must start with
-
Report validation results:
- For each valid learning: “â : valid”
- For each invalid learning: “â : missing ” (list each missing field)
-
Do NOT delete or retry invalid learnings. Log the warning and proceed. Invalid learnings are still better than no learnings â the warning helps identify extraction quality issues over time.
Step 4: Clear the Queue
ao extract --clear 2>/dev/null
Step 5: Report Completion
Tell the user:
- Number of learnings extracted
- Key insights
- Location of learning files
The Knowledge Loop
Session N ends:
â ao forge --last-session --queue
â Session queued in pending.jsonl
Session N+1 starts:
â ao extract (this skill)
â Claude processes the queue
â Writes to .agents/learnings/
â Validates required fields
â Loop closed
Key Rules
- Runs automatically – usually via hook
- Process the queue – don’t leave extractions pending
- Be specific – actionable learnings, not vague observations
- Close the loop – extraction completes the knowledge cycle