用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill flywheel命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
| name | flywheel |
| description | Check knowledge flywheel health. |
Monitor the knowledge flywheel health.
Sessions → Transcripts → Forge → Pool → Promote → Knowledge
↑ │
└───────────────────────────────────────────────┘
Future sessions find it
Velocity = Rate of knowledge flowing through Friction = Bottlenecks slowing the flywheel
Given $flywheel:
# Count top-level artifact files (avoid counting directories)
LEARNINGS=$(find .agents/learnings -maxdepth 1 -type f 2>/dev/null | wc -l)
PATTERNS=$(find .agents/patterns -maxdepth 1 -type f 2>/dev/null | wc -l)
RESEARCH=$(find .agents/research -maxdepth 1 -type f 2>/dev/null | wc -l)
RETROS=$(find .agents/retros -maxdepth 1 -type f 2>/dev/null | wc -l)
echo "Learnings: $LEARNINGS"
echo "Patterns: $PATTERNS"
echo "Research: $RESEARCH"
echo "Retros: $RETROS"
# Recent learnings (last 7 days)
find .agents/learnings -maxdepth 1 -type f -mtime -7 2>/dev/null | wc -l
# Recent research
find .agents/research -maxdepth 1 -type f -mtime -7 2>/dev/null | wc -l
# Old artifacts (> 30 days without modification)
find .agents/ -name "*.md" -mtime +30 2>/dev/null | wc -l
if command -v ao &>/dev/null; then
# Get citation report (cache metrics)
CITE_REPORT=$(ao metrics cite-report --json --days 30 2>/dev/null)
if [ -n "$CITE_REPORT" ]; then
HIT_RATE=$(echo "$CITE_REPORT" | jq -r '.hit_rate // "unknown"')
UNCITED=$(echo "$CITE_REPORT" | jq -r '(.uncited_learnings // []) | length')
STALE_90D=$(echo "$CITE_REPORT" | jq -r '.staleness["90d"] // 0')
echo "Cache hit rate: $HIT_RATE"
echo "Uncited learnings: $UNCITED"
echo "Stale (90d uncited): $STALE_90D"
fi
else
# ao-free fallback: compute approximate metrics from files
echo "Cache health (ao-free fallback):"
# Learnings modified in last 30 days (active pool)
ACTIVE_30D=$(find .agents/learnings/ -name "*.md" -mtime -30 2>/dev/null | wc -l | tr -d ' ')
echo "Active learnings (30d): $ACTIVE_30D"
# Forge candidates awaiting promotion
FORGE_PENDING=$(ls .agents/forge/*.md 2>/dev/null | wc -l | tr -d ' ')
[ -f .agents/ao/citations.jsonl ];
CITATION_COUNT=$( -l < .agents/ao/citations.jsonl | -d )
UNIQUE_CITED=$(grep -o .agents/ao/citations.jsonl 2>/dev/null | -u | -l | -d )
[ -f .agents/ao/outcomes.jsonl ];
OUTCOME_COUNT=$( -l < .agents/ao/outcomes.jsonl | -d )
if command -v ao &>/dev/null; then
ao metrics flywheel status 2>/dev/null || echo "ao metrics flywheel status unavailable"
ao status 2>/dev/null || echo "ao status unavailable"
ao maturity --scan 2>/dev/null || echo "ao maturity unavailable"
ao anti-patterns 2>/dev/null || echo "ao anti-patterns unavailable"
ao badge 2>/dev/null || echo "ao badge unavailable"
# Knowledge maintenance
ao dedup --merge 2>/dev/null || true
ao contradict 2>/dev/null || true
ao constraint review 2>/dev/null || true
ao curate status 2>/dev/null || true
ao metrics health 2>/dev/null || true
ao metrics cite-report --days 30 2>/dev/null || true
# Active pruning: archive stale, evict low-utility, and curate noisy uncited learnings
ao maturity --expire --archive 2>/dev/null || true
ao maturity --evict --archive 2>/dev/null || true
ao maturity --curate --archive 2>/dev/null || true
# Retrieval quality: use the representative live corpus when it exists
if [ -d cli/cmd/ao/testdata/retrieval-bench-live ]; then
ao retrieval-bench --live --corpus cli/cmd/ao/testdata/retrieval-bench-live --json 2>/dev/null || true
fi
else
echo "ao CLI not available — using file-based metrics"
# Pool inventory
echo "Pool depths:"
for pool in learnings patterns forge knowledge research retros; do
COUNT=$( .agents//*.md 2>/dev/null | -l | -d )
GLOBAL_COUNT=$( ~/.codex/patterns/*.md 2>/dev/null | -l | -d )
If .agents/ao/skill-telemetry.jsonl exists, use jq to extract: invocations by skill, average cycle time per skill, gate failure rates. Include in health report (Step 6) under ## Process Metrics.
Cross-reference validation: scan knowledge artifacts for broken internal references.
Use scripts/artifact-consistency.sh (method documented in references/artifact-consistency.md).
Default allowlist lives at references/artifact-consistency-allowlist.txt; use --no-allowlist for a full raw audit.
Health indicator: >90% = Healthy, 70-90% = Warning, <70% = Critical.
Write to: .agents/flywheel-status.md
# Knowledge Flywheel Health
**Date:** YYYY-MM-DD
## Pool Depths
| Pool | Count | Recent (7d) |
|------|-------|-------------|
| Learnings | <count> | <count> |
| Patterns | <count> | <count> |
| Research | <count> | <count> |
| Retros | <count> | <count> |
## Velocity (Last 7 Days)
- Sessions with extractions: <count>
- New learnings: <count>
- New patterns: <count>
## Artifact Consistency
- References scanned: <count>
- Broken references: <count>
- Consistency score: <percentage>%
- Status: <Healthy/Warning/Critical>
## Cache Health
- Hit rate: <percentage>%
- Uncited learnings:
Stale (90d uncited):
Status:
Live corpus coverage:
Live corpus learnings:
Status:
Tell the user:
| Metric | Healthy | Warning | Critical |
|---|---|---|---|
| Learnings/week | 3+ | 1-2 | 0 |
| Stale artifacts | <20% | 20-50% | >50% |
| Research/plan ratio | >0.5 | 0.2-0.5 | <0.2 |
| Cache hit rate | >80% | 50-80% | <50% |
Read references/cache-eviction.md for the full eviction pipeline (passive tracking → confidence decay → maturity scan → archive).
Phase 4 (soc-ytpq) governance for ~/.agents/learnings/ — all advisory, none block by default. Full details in references/hub-budget.md.
ao maturity --evict --target-size=250M (lowest-utility-first; respects lifecycle.IsEvictionEligible so canonical / high-confidence files are protected).ao harvest WARNs when promotions exceed --max-promotions=N (default 500; AO_MAX_PROMOTIONS=N env as fallback; ≤0 disables). WARN-only — the 2,638-promotion soc-ujls drain proves a hard gate would falsely block legitimate runs.source_rig: in its frontmatter (empty writers serialize as source_rig: unknown). Both harvest.Promote and pool.(*Pool).Promote content-dedup against the same hub via ~/.agents/pool/promoted-index.jsonl.SkipGlobalHub defaults to true (the agentops-b3v / soc-ujls fix), then grep -h '^source_rig:' ~/.agents/learnings/*.md | sort | uniq -c | sort -rn to identify the regressed writer. Use --target-size, never raw rm.User says: $flywheel — Counts pool depths, checks recent activity, validates artifact consistency, writes health report to .agents/flywheel-status.md.
Hook trigger: After $post-mortem — Compares current vs historical metrics, flags velocity drops and friction points.
| Problem | Cause | Solution |
|---|---|---|
| All pool counts zero | .agents/ directory missing or empty | Run $post-mortem or $retro to seed knowledge pools |
| Velocity always zero | No recent extractions (last 7 days) | Run $retro or $post-mortem to extract and index learnings |
| "ao CLI not available" | ao command not installed or not in PATH | Install ao CLI or use manual pool counting fallback |
| Stale artifacts >50% | Long time since last session or inactive repo | Run $provenance --stale to audit and archive old artifacts |
scripts/artifact-consistency.shscripts/validate.sh