Cavecrew Subagent Delegation

Cavecrew Subagent Delegation

Guides an AI coding agent on when to hand work to compressed-output investigator, builder or reviewer subagents instead of working inline, saving context.

Skill files2 files
SKILL.md86 lines
1
---
2
name: cavecrew
3
description: >
4
When to delegate to `cavecrew-investigator` (locate code), `cavecrew-builder`
5
(1-2 file edit) or `cavecrew-reviewer` (diff review) instead of working inline
6
or using `Explore`. Their output is compressed, so main context lasts longer.
7
---
8
9
Cavecrew = three subagent presets that answer in ultracave voice (tool runs: one status line in, one out; nothing between routine calls). Same job as Anthropic defaults (`Explore`, edit-style agents, reviewer); difference is the tool-result they return is compressed, so main context shrinks per delegation.
10
11
## When to use cavecrew vs alternatives
12
13
| Task | Use |
14
|---|---|
15
| "Where is X defined / what calls Y / list uses of Z" | `cavecrew-investigator` |
16
| Same but you also want suggestions/architecture commentary | `Explore` (vanilla) |
17
| Surgical edit, ≤2 files, scope obvious | `cavecrew-builder` |
18
| New feature / 3+ files / cross-cutting refactor | Main thread, or `feature-dev:code-architect` if installed |
19
| Review diff, branch, or file for bugs | `cavecrew-reviewer` |
20
| Deep code review with rationale + alternatives | `Code Reviewer` (vanilla) if installed, else main thread |
21
| One-line answer you already know | Main thread, no subagent |
22
23
Rule of thumb: **if you'd want the subagent's output in 1/3 the tokens, pick cavecrew. If you'd want prose, pick vanilla.**
24
25
## Why this exists (the real win)
26
27
Subagent tool results get injected into main context verbatim. A vanilla `Explore` that returns 2k tokens of prose costs 2k tokens of main-context budget every time. The same finding from `cavecrew-investigator` comes back as a compressed `path:line` table instead. Across 20 delegations in one session that's the difference between context exhaustion and finishing the task.
28
29
## Output contracts
30
31
What main thread can rely on per agent:
32
33
**`cavecrew-investigator`**
34
```
35
<Header>:
36
- path:line — `symbol` — short note
37
totals: <counts>.
38
```
39
Or `No match.` Always file-path-first, line-number-attached, backticked symbols. Safe to grep with `path:\d+`.
40
41
**`cavecrew-builder`**
42
```
43
<path:line-range> — <change ≤10 words>.
44
verified: <re-read OK | mismatch @ path:line>.
45
```
46
Or one of: `too-big.` / `needs-confirm.` / `ambiguous.` / `regressed.` (terminal first token).
47
48
**`cavecrew-reviewer`**
49
```
50
path:line: <emoji> <severity>: <problem>. <fix>.
51
totals: N🔴 N🟡 N🔵 N❓
52
```
53
Or `No issues.` Findings sorted file → line ascending.
54
55
## Chaining patterns
56
57
**Locate → fix → verify** (most common):
58
1. `cavecrew-investigator` returns site list.
59
2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`.
60
3. `cavecrew-reviewer` audits the diff.
61
62
**Parallel scout** (when investigation is broad):
63
Spawn 2-3 `cavecrew-investigator` calls in one message (different angles: defs vs callers vs tests). Aggregate in main thread.
64
65
**Single-shot edit** (when site is already known):
66
Skip investigator. Hand exact path:line to `cavecrew-builder` directly.
67
68
## Subagent briefing
69
70
Give subagents concise, self-contained handoffs:
71
- Name the exact working directory (or worktree path) and target `path:line` ranges up front.
72
- Do not include slash-command triggers or hook keywords that would switch modes or fire unrelated hooks inside the subagent.
73
- Keep git identity and config repo-local (`git -C <repo> config user.name ...`); never mutate global git config from a subagent.
74
75
## What NOT to do
76
77
- Don't accept or reject a subagent's absence claim (`No match.`, `No issues.`, "section missing", "unchanged") without one targeted check of the relevant file, search scope, or diff. Check cited line numbers are within the file before acting.
78
- Don't use `cavecrew-builder` when you don't already know the file. Spawn investigator first or main thread will eat tokens passing context.
79
- Don't chain `cavecrew-investigator → cavecrew-builder` for a 5-file refactor. Builder will return `too-big.` and you'll have wasted a turn.
80
- Don't ask `cavecrew-reviewer` for "general feedback" — it returns findings only, no architecture opinions. Use `Code Reviewer` for that when installed.
81
- Don't expect prose. Cavecrew output is structured, sometimes terse to the point of cryptic. If a human will read it directly, paraphrase.
82
83
## Auto-clarity (inherited)
84
85
Subagents drop caveman → normal English for security warnings, irreversible-action confirmations, and any output where fragment ambiguity could be misread. Resume caveman after.
86

© Julius Brussee · Apache 2.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…