Indexes local coding agent logs to allow programmatic searching and retrieval of past session context.
Install
mkdir -p .claude/skills/cass && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8215" && unzip -o skill.zip -d .claude/skills/cass && rm skill.zipInstalls to .claude/skills/cass
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.Key capabilities
- →Indexes logs from 11 distinct coding agents
- →Provides machine-readable JSON output for robot automation
- →Aggregates session metadata like cache stats and elapsed time
- →Expands specific log context around found lines
- →Supports programmatic health checks and index rebuilding
How it works
Scans local log directories across predefined agent paths and builds a searchable index that can be queried via standard CLI commands.
Inputs & outputs
When to use cass
- →Retrieve previous implementation details for a specific module
- →Export session logs to track historical coding decisions
- →Search for error logs across multiple agent history files
- →Verify the current active coding session path
About this skill
CASS - Coding Agent Session Search
Unified, high-performance CLI/TUI to index and search your local coding agent history. Aggregates sessions from 23 agents, including Codex, Claude Code, Gemini CLI, Cline, OpenCode, Amp, Cursor, ChatGPT, Aider, Pi-Agent, Factory (Droid), OpenHands, Antigravity, and Grok Build.
CRITICAL: Robot Mode Required for AI Agents
NEVER run bare cass - it launches an interactive TUI that blocks your session!
# WRONG - blocks terminal
cass
# CORRECT - JSON output for agents
cass search "query" --robot
cass search "query" --json # alias
Always use --robot or --json flags for machine-readable output.
Quick Reference for AI Agents
Bounded History Retrieval
For a quick project-history question, start with one scoped query. The flag set
below is verified on cass 0.8.0; check cass --version and cass search --help
once per installed version. If --no-maintenance is unsupported, stop and report
the version mismatch; silently removing it permits maintenance.
# Specific terms, one workspace, recent history, small cited result set
cass search "performance regression" --workspace /path/to/project --days 7 \
--mode lexical --no-maintenance --robot --robot-meta --fields minimal \
--limit 5 --max-tokens 2000 --timeout 2000
# Expand only a useful hit, using its exact source_path and line_number
cass view /path/to/session.jsonl -n 42 -C 3 --json --timeout 2000
--timeout is in milliseconds; --max-tokens is an approximate output budget,
not a CPU or memory limit. Apply a caller-side wall-clock deadline as well (for
example, GNU timeout 10s before the command). Exit 124 from that wrapper is an
incomplete attempt; its interrupted stdout may not be valid JSON. In JSON search
output, inspect budget.timed_out even after exit 0: empty timed-out hits do not
prove that no history exists.
view -C 3 limits surrounding lines, not bytes or tokens; a single JSONL record
can be large. Check its output size before adding excerpts to a prompt.
Hybrid remains the product default. Explicit lexical mode keeps this workflow
out of semantic inference; --no-maintenance prevents index repair, catch-up,
and daemon auto-spawn. If it returns maintenance-required, report that blocker
and stop this retrieval attempt. Do not turn a summary request into an index,
repair, model-install, wildcard-aggregate, or repeated health/status workflow.
Use readiness commands when diagnosing readiness; review their proposed actions
before starting a separate mutating task. Broaden dates or terms deliberately
after a completed query; choose semantic/hybrid only when conceptual retrieval
is needed and its cost is acceptable. Preserve source/line citations in summaries.
Essential Commands
# Find the current session for this workspace
cass sessions --current --json
# List recent sessions for a specific project
cass sessions --workspace "$(pwd)" --json --limit 5
# Common agent flow: find current session, then export it
cass export-html "$(cass sessions --current --json | jq -r '.sessions[0].path')" --json
# Search with JSON output
cass search "authentication error" --robot --limit 5
# Search with metadata (elapsed_ms, cache stats, freshness)
cass search "error" --robot --robot-meta
# Minimal payload (path, line, agent only)
cass search "bug" --robot --fields minimal
# View source at specific line
cass view /path/to/session.jsonl -n 42 --json
# Expand context around a line
cass expand /path/to/session.jsonl -n 42 -C 5 --json
# Capabilities discovery
cass capabilities --json
# Full API schema
cass introspect --json
# LLM-optimized documentation
cass robot-docs guide
cass robot-docs commands
cass robot-docs schemas
cass robot-docs examples
cass robot-docs exit-codes
Why Use CASS
Cross-Agent Knowledge Transfer
Your coding agents create scattered knowledge:
- Claude Code sessions in
~/.claude/projects - Codex sessions in
~/.codex/sessions - Cursor state in SQLite databases
- Aider history in markdown files
CASS unifies all of this into a single searchable index. When you're stuck on a problem, search across ALL your past agent sessions to find relevant solutions.
Use Cases
# "I solved this before..."
cass search "TypeError: Cannot read property" --robot --days 30
# Cross-agent learning (what has ANY agent said about X?)
cass search "authentication" --robot --workspace /path/to/project
# Agent-to-agent handoff
cass search "database migration" --robot --fields summary
# Daily review
cass timeline --today --json
Command Reference
Indexing
# Full rebuild of DB and search index
cass index --full
# Incremental update (since last scan)
cass index
# Watch mode: auto-reindex on file changes
cass index --watch
# Force rebuild even if schema unchanged
cass index --full --force-rebuild
# Safe retries with idempotency key (24h TTL)
cass index --full --idempotency-key "build-$(date +%Y%m%d)"
# JSON output with stats
cass index --full --json
Search
# Basic search (JSON output required for agents!)
cass search "query" --robot
# With filters
cass search "error" --robot --agent claude --days 7
cass search "bug" --robot --workspace /path/to/project
cass search "panic" --robot --today
# Time filters
cass search "auth" --robot --since 2024-01-01 --until 2024-01-31
cass search "test" --robot --yesterday
cass search "fix" --robot --week
# Wildcards
cass search "auth*" --robot # prefix: authentication, authorize
cass search "*tion" --robot # suffix: authentication, exception
cass search "*config*" --robot # substring: misconfigured
# Token budget management (critical for LLMs!)
cass search "error" --robot --fields minimal # path, line, agent only
cass search "error" --robot --fields summary # adds title, score
cass search "error" --robot --max-content-length 500 # truncate fields
cass search "error" --robot --max-tokens 2000 # soft budget (~4 chars/token)
cass search "error" --robot --limit 5 # cap results
# Pagination (cursor-based)
cass search "TODO" --robot --robot-meta --limit 20
# Use _meta.next_cursor from response:
cass search "TODO" --robot --robot-meta --limit 20 --cursor "eyJ..."
# Match highlighting
cass search "authentication error" --robot --highlight
# Query analysis/debugging
cass search "auth*" --robot --explain # parsed query, cost estimates
cass search "auth error" --robot --dry-run # validate without executing
# Aggregations (server-side counts)
cass search "error" --robot --aggregate agent,workspace,date
# Request correlation
cass search "bug" --robot --request-id "req-12345"
# Source filtering (for multi-machine setups)
cass search "auth" --robot --source laptop
cass search "error" --robot --source remote
# Traceability (for debugging agent pipelines)
cass search "error" --robot --trace-file /tmp/cass-trace.json
Session Analysis
# Export conversation to markdown/HTML/JSON
cass export /path/to/session.jsonl --format markdown -o conversation.md
cass export /path/to/session.jsonl --format html -o conversation.html
cass export /path/to/session.jsonl --format json --include-tools
# Expand context around a line (from search result)
cass expand /path/to/session.jsonl -n 42 -C 5 --json
# Shows 5 messages before and after line 42
# View source at line
cass view /path/to/session.jsonl -n 42 --json
# Activity timeline
cass timeline --today --json --group-by hour
cass timeline --days 7 --json --agent claude
cass timeline --since 7d --json
# Find related sessions for a file
cass context /path/to/source.ts --json
Status & Diagnostics
# Readiness diagnosis, when needed; not a prerequisite for every query
cass health --json
# Full status snapshot
cass status --json
cass state --json # alias
# Statistics
cass stats --json
cass stats --by-source # for multi-machine
# Full diagnostics
cass diag --verbose
Aggregation & Analytics
Aggregate search results server-side to get counts and distributions without transferring full result data:
Aggregations reduce output volume, not necessarily scan work. They are not the first step for a quick history question; use the scoped retrieval recipe above.
# Count results by agent
cass search "error" --robot --aggregate agent
# → { "aggregations": { "agent": { "buckets": [{"key": "claude_code", "count": 45}, ...] } } }
# Multi-field aggregation
cass search "bug" --robot --aggregate agent,workspace,date
# Combine with filters
cass search "TODO" --agent claude --robot --aggregate workspace
| Aggregation Field | Description |
|---|---|
agent | Group by agent type (claude_code, codex, cursor, etc.) |
workspace | Group by workspace/project path |
date | Group by date (YYYY-MM-DD) |
match_type | Group by match quality (exact, prefix, fuzzy) |
Top 10 buckets returned per field, with other_count for remaining items.
Remote Sources (Multi-Machine Search)
Search across sessions from multiple machines via SSH/rsync.
Setup Wizard (Recommended)
cass sources setup
The wizard:
- Discovers SSH hosts from
~/.ssh/config - Probes each for agent data and cass installation
- Optionally installs cass on remotes
- Indexes sessions on remotes
- Configures
sources.toml - Syncs data locally
cass sources setup --hosts css,csd,yto # Specific hosts only
cass sources setup --dry-run # Preview without changes
cass sources setup --resume # Resume interrupted setup
Manual Setup
# Add a remote machine
cass sources add [email protected] --preset macos-defaults
cass sources add dev@workstation --path ~/.claude/projects --path ~/.codex/sessions
# List sources
cass sources list --json
# Sync sessions
cass sources sync
cass sources sync --source laptop --verbos
---
*Content truncated.*
When not to use it
- →For interactive manual browsing in a standard TUI (unless user prefers terminal UI)
- →When working with live sessions that haven't been written to log files yet
Prerequisites
Limitations
- →Performance depends on index freshness; manual rebuilds needed
- →Dependent on consistent file formats across multiple disparate agent loggers
How it compares
It acts as a centralized database for fragmented local agent histories instead of requiring users to manually grep individual file logs.
Compared to similar skills
cass side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| cass (this skill) | 0 | 3mo | Caution | Intermediate |
| skill-from-github | 7 | 8mo | No flags | Intermediate |
| cursor-multi-repo | 5 | 2mo | Review | Intermediate |
| agentic-jujutsu | 3 | 6mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Dicklesworthstone
View all by Dicklesworthstone →You might also like
skill-from-github
GBSOSS
Create skills by learning from high-quality GitHub projects
cursor-multi-repo
jeremylongshore
Manage work with multiple repositories in Cursor. Triggers on "cursor multi repo", "cursor multiple projects", "cursor monorepo", "cursor workspace". Use when working with cursor multi repo functionality. Trigger with phrases like "cursor multi repo", "cursor repo", "cursor".
agentic-jujutsu
ruvnet
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination
cartographer
kingbootoshi
Maps and documents codebases of any size by orchestrating parallel subagents. Creates docs/CODEBASE_MAP.md with architecture, file purposes, dependencies, and navigation guides. Updates CLAUDE.md with a summary. Use when user says "map this codebase", "cartographer", "/cartographer", "create codebase map", "document the architecture", "understand this codebase", or when onboarding to a new project. Automatically detects if map exists and updates only changed sections.
moai
modu-ai
MoAI super agent - unified orchestrator for autonomous development. Routes natural language or explicit subcommands (plan, run, sync, fix, loop, project, feedback) to specialized agents. Use for any development task from planning to deployment.
build-with-agent-team
coleam00
Build a project using Claude Code Agent Teams with tmux split panes. Takes a plan document path and optional team size. Use when you want multiple agents collaborating on a build.