codex/skills/cass/SKILL.md
Mine past agent sessions for working prompts, decisions, and patterns. Use when "what did I ask?", "find that prompt", session archaeology, or agent history.
npx skillsauth add tkersey/dotfiles cassInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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
testing
Use before local patching when bugs, regressions, malformed state, crashes, parser failures, migrations, cache drift, protocol problems, compatibility requests, tolerant readers, fallbacks, coercions, retries, catch-and-continue logic, or local workarounds may broaden accepted invalid state.
testing
Use for bug reports, PR/issue prose, reviewer comments, user diagnoses, generated summaries, memories, retrieved context, public tracker context, claimed root causes, proposed fixes, fake-minimal repro risk, or any investigation where natural-language context could anchor the implementation scope.
development
Use when non-trivial work needs Challenge Escalation, latent-intelligence activation, frame-market selection, doctrine operators, dominant-move selection, ablation/surface-tax judgment, reification, review comment law, negative capability, route receipts, or proof-bearing refusal to mutate.
development
Apply Algebra-Driven Design. Use for ADD, denotational design, combinator models, law-driven architecture, domain algebra, property tests, codebase modeling, event sourcing, workflow design, or agentic skill design. If the canonical bundle is unavailable, use this wrapper as the minimal ADD kernel and report the missing bundle path.