一键导入
forge
Mine transcripts for knowledge - decisions, learnings, failures, patterns. Triggers: "forge insights", "mine transcripts", "extract knowledge".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Mine transcripts for knowledge - decisions, learnings, failures, patterns. Triggers: "forge insights", "mine transcripts", "extract knowledge".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Process documents with the Nutrient DWS API. Use this skill when the user wants to convert documents (PDF, DOCX, XLSX, PPTX, HTML, images), extract text or tables from PDFs, OCR scanned documents, redact sensitive information (PII, SSN, emails, credit cards), add watermarks, digitally sign PDFs, fill PDF forms, or check API credit usage. Activates on keywords: PDF, document, convert, extract, OCR, redact, watermark, sign, merge, compress, form fill, document processing.
When the user wants to optimize images for search engines and performance. Also use when the user mentions "image SEO," "alt text," "image captions," "figcaption," "image optimization," "WebP," "lazy loading," "LCP," "image sitemap," "responsive images," "srcset," "image format," or "hero image optimization."
Diagnose and fix bugs with root-cause analysis and verification. Use when you have a concrete issue report, failing behavior, runtime error, or test regression that should be resolved safely. For ambiguous, high-risk, or broad-scope issues, stop and route to write-plan first.
Stores decisions and patterns in knowledge graph. Use when saving patterns, remembering outcomes, or recording decisions.
Unified decision tree for web research and competitive monitoring. Auto-selects WebFetch, Tavily, or agent-browser based on target site characteristics and available API keys. Includes competitor page tracking, snapshot diffing, and change alerting. Use when researching web content, scraping, extracting raw markdown, capturing documentation, or monitoring competitor changes.
Never test mock behavior. Never add test-only methods to production classes. Understand dependencies before mocking. Language-agnostic principles with TypeScript/Jest and Python/pytest examples.
| name | forge |
| description | Mine transcripts for knowledge - decisions, learnings, failures, patterns. Triggers: "forge insights", "mine transcripts", "extract knowledge". |
| skill_api_version | 1 |
| user-invocable | false |
| context | {"window":"fork","intent":{"mode":"task"},"sections":{"exclude":["TASK"]},"intel_scope":"full"} |
| metadata | {"tier":"background","dependencies":[],"internal":true} |
Typically runs automatically via SessionEnd hook.
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.
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 |
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
if (( $(echo "$CONF_NUM >= 0.7" | bc -l) )); then
cp "$f" .agents/learnings/
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
Tell the user:
Forged candidates enter at Tier 0:
Transcript → /forge → .agents/forge/ (Tier 0)
↓
Human review or 2+ citations
OR auto-promote (confidence >= 0.7, ao-free fallback)
↓
.agents/learnings/ (Tier 1)
Hook triggers: session-end.sh runs when session ends
What happens:
ao forge transcript --last-session --queue --quiet.agents/ao/pending.jsonl queue/forge --promote to process the queueResult: Session transcript automatically queued for knowledge extraction without user action.
User says: /forge <path> or "mine this transcript for knowledge"
What happens:
ao forge transcript --last-session.agents/forge/YYYY-MM-DD-forge.mdao forge markdownResult: Transcript mined for reusable knowledge, candidates ready for human review or 2+ citations promotion.
| 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 |