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
tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.