Skip to content

rapchic/cavecrew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cavecrew

Token-efficient subagent delegation for long AI coding sessions.

Subagent tool results inject back into the main agent context verbatim. Vanilla explore/review agents often return 1,500–2,000 tokens of prose per delegation. cavecrew presets emit structured, compressed output (~60% smaller) while preserving path:line locators and actionable fixes.

Problem

Across 20 subagent delegations in one session:

Mode Avg tokens/delegation 20 delegations
Vanilla Explore ~2,000 ~40,000
cavecrew-investigator ~700 ~14,000

The difference is often context exhaustion vs finishing the task.

Three presets

Preset Job Use when
cavecrew-investigator Locate code (read-only) "Where is X defined / what calls Y"
cavecrew-builder Surgical edit, ≤2 files Scope obvious, single-function fix
cavecrew-reviewer Diff/file review One-line findings with severity

Use vanilla agents when you want prose, architecture commentary, or 3+ file refactors.

Quick start (Cursor / Claude Code)

  1. Copy SKILL.md and agents/*.md into your agent skills folder (e.g. .cursor/skills/cavecrew/ or .agents/skills/cavecrew/).
  2. Configure subagent types that load the agent prompts from agents/.
  3. Trigger with: "use cavecrew", "spawn investigator", "delegate to subagent".

See SKILL.md for the full decision matrix and docs/OUTPUT_CONTRACTS.md for parseable output formats.

Chaining pattern

investigator → main picks sites → builder → reviewer

Parallel scout: spawn 2–3 investigators (defs / callers / tests) in one turn; aggregate in main thread.

Related work

  • caveman — ultra-compressed communication mode
  • Agent Skills (SKILL.md) — Anthropic / Cursor skill format
  • Deterministic tool-result compression: see skill-runtime-adapter companion repo

License

MIT — see LICENSE.

About

Token-efficient subagent delegation for long AI coding sessions

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors