一键导入
cass
Mine past agent sessions for working prompts, decisions, and patterns. Use when "what did I ask?", "find that prompt", session archaeology, or agent history.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Mine past agent sessions for working prompts, decisions, and patterns. Use when "what did I ask?", "find that prompt", session archaeology, or agent history.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Relentless goal/design interview that sharpens framing and writes durable docs (brainstorm artifact, ADRs, glossary) as decisions crystallize. Use when refining a flywheel goal, pressure-testing scope, or "grill with docs".
Start or resume the full agentic coding flywheel. Drives the complete workflow: scan → discover → plan → implement → review.
Set up flywheel prerequisites for this project.
One-shot diagnostic of every flywheel dependency — MCP connectivity, Agent Mail liveness, br/bv/ntm/cm binaries, node version, git status, dist-drift, orphaned worktrees, and checkpoint validity. Use when debugging toolchain issues, before starting a new session, after /flywheel-cleanup, or as a CI gate.
Strategic gap analysis between vision (AGENTS.md / README.md / plan docs) and what's actually implemented. Converts gaps into beads, optionally launches a swarm. Use when "reality check", "where are we really", "gap analysis", "did we drift", or before declaring a long-running project done.
Launch a parallel swarm of agents to implement multiple beads simultaneously.
| name | cass |
| description | Mine past agent sessions for working prompts, decisions, and patterns. Use when "what did I ask?", "find that prompt", session archaeology, or agent history. |
Core Insight: Your repeated prompts are your best prompts. If you typed it 10+ times, it works. Mine your history.
Your conversation history contains:
The insight: Mining your past beats inventing new approaches.
1. Bootstrap: Check health, refresh index, get project overview
cass status --json && cass index --json
cass search "*" --workspace /data/projects/PROJECT --aggregate agent,date --limit 1 --json
2. Find prompts: Search for keywords, filter to user prompts (lines 1-3)
cass search "KEYWORD" --workspace /data/projects/PROJECT --json --fields minimal --limit 50 \
| jq '[.hits[] | select(.line_number <= 3)]'
3. Follow hits: View the actual content
cass view /path/from/source_path.jsonl -n LINE -C 20
4. Expand context: See the full conversation flow
cass expand /path/from/source_path.jsonl --line LINE --context 3
5. Discover related: Find the whole work cluster
cass context /path/from/source_path.jsonl --json
--fields minimal — 5x smaller output, preserves context windowline_number <= 3 — User prompts live at the top of sessions# Health + refresh (ALWAYS first)
cass status --json && cass index --json
# Project overview: who did what, when?
cass search "*" --workspace /path --aggregate agent,date --limit 1 --json
# Find keyword, minimal output
cass search "KEYWORD" --workspace /path --json --fields minimal --limit 50
# Follow a hit
cass view /path.jsonl -n LINE -C 20 # Line-oriented
cass expand /path.jsonl --line LINE --context 3 # Message-oriented
# Find related sessions
cass context /path.jsonl --json
# Export for parsing
cass export /path.jsonl --format json --include-tools -o /tmp/out.json
| You Want | Use | Why |
|---|---|---|
| Project overview | --aggregate agent,date --limit 1 | Counts only, no content |
| Find prompts | --fields minimal + jq select(.line_number <= 3) | User prompts are lines 1-3 |
| Ritual detection | Count matches: >10 = ritual | Repeated = working |
| Full conversation | cass expand --context 3 | Message boundaries preserved |
| Raw JSON parsing | cass export --include-tools -o file.json | Never pipe exports |
| Content not found | rg "string" /path.jsonl | cass skips tool outputs |
| Rule | Why | Consequence |
|---|---|---|
--limit 1 minimum | --limit 0 panics | Use 1 for aggregations |
--fields minimal | Token efficiency | 5x smaller output |
| Export to file | Piping causes broken pipe panic | -o /tmp/out.json always |
| Exact workspace paths | Case-sensitive matching | Use --aggregate workspace to discover |
--include-tools | Tool calls hidden by default | Required for full export |
| Mode | When | Example |
|---|---|---|
lexical (default) | Exact strings, filenames | "AGENTS.md", "--workspace" |
semantic | Conceptual, unknown wording | "scope reduction discussions" |
hybrid | Broad exploration | "architecture decisions" |
Default to lexical. Only use semantic when you don't know exact wording.
| Signal | Meaning | Action |
|---|---|---|
line_number 1-3 | User prompts | Filter: select(.line_number <= 3) |
/subagents/ line 2 | THE extraction prompt | Copy-paste ready |
total_matches > 10 | Ritual pattern | Document it, reuse it |
| 0 results + content exists | Workspace path mismatch | Use --aggregate workspace |
# User prompts only
| jq '[.hits[] | select(.line_number <= 3)]'
# Source paths for follow-up
| jq '.hits[].source_path' -r
# Aggregation buckets
| jq '.aggregations.agent.buckets'
# Count matches
| jq '.total_matches'
# Find repeated prompts (ritual detection)
| jq '[.hits[] | select(.line_number <= 3) | .title[0:80]] | group_by(.) | map({prompt: .[0], count: length}) | sort_by(-.count) | .[0:20]'
| Need | Reference |
|---|---|
| Full command reference | COMMANDS.md |
| Workflow recipes | RECIPES.md |
| jq patterns | PATTERNS.md |
| Pitfalls & fixes | PITFALLS.md |
| Session file formats | SESSION_FORMATS.md |
| Script | Usage |
|---|---|
./scripts/quick_analysis.sh /path | One-command project overview |
./scripts/prompt_miner.py --workspace /path | Find repeated prompts |
./scripts/validate.sh | Validate cass is working |
# Quick health check
cass status --json | jq '.index.fresh'
# Should return: true
If false, run: cass index --json