Skip to content

Commit 7fac213

Browse files
committed
feat: add cavemen skills
1 parent 2688f9a commit 7fac213

30 files changed

Lines changed: 1703 additions & 0 deletions

.agents/skills/cavecrew/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# cavecrew
2+
3+
Decision guide. When to delegate to caveman subagents instead of doing the work inline.
4+
5+
## What it does
6+
7+
Tells the main thread when to spawn a caveman-style subagent versus the vanilla equivalent. The win: subagent tool-results inject back into main context verbatim, and caveman output is roughly 1/3 the size of vanilla prose. Across 20 delegations in one session, that is the difference between context exhaustion and finishing the task.
8+
9+
Three subagents:
10+
11+
| Subagent | Job | Use when |
12+
|----------|-----|----------|
13+
| `cavecrew-investigator` | Locate code (read-only) | "Where is X defined / what calls Y / list uses of Z" |
14+
| `cavecrew-builder` | Surgical edit, 1-2 files | Scope is obvious, ≤2 files. Refuses 3+ file scope. |
15+
| `cavecrew-reviewer` | Diff/file review | One-line findings with severity emoji |
16+
17+
Use vanilla `Explore` or `Code Reviewer` when you want prose, architecture commentary, or rationale. Use main thread directly for one-line answers and 3+ file refactors.
18+
19+
This skill is a decision guide, not a slash command. It activates when the conversation mentions delegation.
20+
21+
## How to invoke
22+
23+
Triggers on phrases like "delegate to subagent", "use cavecrew", "spawn investigator", "save context", "compressed agent output".
24+
25+
## Example chaining
26+
27+
Locate → fix → verify (most common):
28+
29+
1. `cavecrew-investigator` returns site list (`path:line — symbol — note`)
30+
2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`
31+
3. `cavecrew-reviewer` audits the resulting diff
32+
33+
Parallel scout: spawn 2-3 `cavecrew-investigator` calls in one message with different angles (defs, callers, tests). Aggregate in main.
34+
35+
## See also
36+
37+
- [`SKILL.md`](./SKILL.md) — full decision matrix and output contracts
38+
- [`agents/cavecrew-investigator.md`](../../agents/cavecrew-investigator.md)
39+
- [`agents/cavecrew-builder.md`](../../agents/cavecrew-builder.md)
40+
- [`agents/cavecrew-reviewer.md`](../../agents/cavecrew-reviewer.md)
41+
- [Caveman README](../../README.md) — repo overview

.agents/skills/cavecrew/SKILL.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
name: cavecrew
3+
description: >
4+
Decision guide for delegating to caveman-style subagents. Tells the main
5+
thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder`
6+
(1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the
7+
work inline or using vanilla `Explore`. Subagent output is caveman-compressed
8+
so the tool-result injected back into main context is ~60% smaller — main
9+
context lasts longer across long sessions.
10+
Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer",
11+
"save context", "compressed agent output".
12+
---
13+
14+
Cavecrew = three subagent presets that emit caveman output. 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.
15+
16+
## When to use cavecrew vs alternatives
17+
18+
| Task | Use |
19+
|---|---|
20+
| "Where is X defined / what calls Y / list uses of Z" | `cavecrew-investigator` |
21+
| Same but you also want suggestions/architecture commentary | `Explore` (vanilla) |
22+
| Surgical edit, ≤2 files, scope obvious | `cavecrew-builder` |
23+
| New feature / 3+ files / cross-cutting refactor | Main thread or `feature-dev:code-architect` |
24+
| Review diff, branch, or file for bugs | `cavecrew-reviewer` |
25+
| Deep code review with rationale + alternatives | `Code Reviewer` (vanilla) |
26+
| One-line answer you already know | Main thread, no subagent |
27+
28+
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.**
29+
30+
## Why this exists (the real win)
31+
32+
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` returns ~700 tokens. Across 20 delegations in one session that's the difference between context exhaustion and finishing the task.
33+
34+
## Output contracts
35+
36+
What main thread can rely on per agent:
37+
38+
**`cavecrew-investigator`**
39+
```
40+
<Header>:
41+
- path:line — `symbol` — short note
42+
totals: <counts>.
43+
```
44+
Or `No match.` Always file-path-first, line-number-attached, backticked symbols. Safe to grep with `path:\d+`.
45+
46+
**`cavecrew-builder`**
47+
```
48+
<path:line-range> — <change ≤10 words>.
49+
verified: <re-read OK | mismatch @ path:line>.
50+
```
51+
Or one of: `too-big.` / `needs-confirm.` / `ambiguous.` / `regressed.` (terminal first token).
52+
53+
**`cavecrew-reviewer`**
54+
```
55+
path:line: <emoji> <severity>: <problem>. <fix>.
56+
totals: N🔴 N🟡 N🔵 N❓
57+
```
58+
Or `No issues.` Findings sorted file → line ascending.
59+
60+
## Chaining patterns
61+
62+
**Locate → fix → verify** (most common):
63+
1. `cavecrew-investigator` returns site list.
64+
2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`.
65+
3. `cavecrew-reviewer` audits the diff.
66+
67+
**Parallel scout** (when investigation is broad):
68+
Spawn 2-3 `cavecrew-investigator` calls in one message (different angles: defs vs callers vs tests). Aggregate in main thread.
69+
70+
**Single-shot edit** (when site is already known):
71+
Skip investigator. Hand exact path:line to `cavecrew-builder` directly.
72+
73+
## What NOT to do
74+
75+
- Don't use `cavecrew-builder` when you don't already know the file. Spawn investigator first or main thread will eat tokens passing context.
76+
- Don't chain `cavecrew-investigator → cavecrew-builder` for a 5-file refactor. Builder will return `too-big.` and you'll have wasted a turn.
77+
- Don't ask `cavecrew-reviewer` for "general feedback" — it returns findings only, no architecture opinions. Use `Code Reviewer` for that.
78+
- Don't expect prose. Cavecrew output is structured, sometimes terse to the point of cryptic. If a human will read it directly, paraphrase.
79+
80+
## Auto-clarity (inherited)
81+
82+
Subagents drop caveman → normal English for security warnings, irreversible-action confirmations, and any output where fragment ambiguity could be misread. Resume caveman after.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# caveman-commit
2+
3+
Terse Conventional Commits. Why over what.
4+
5+
## What it does
6+
7+
Generates commit messages in Conventional Commits format. Subject ≤50 chars, hard cap 72. Imperative mood. Body only when the *why* is non-obvious or there are breaking changes. No AI attribution, no "this commit does X", no emoji unless the project uses them. Body always required for breaking changes, security fixes, data migrations, and reverts — future debuggers need the context.
8+
9+
Outputs only the message. Does not stage, commit, or amend.
10+
11+
## How to invoke
12+
13+
```
14+
/caveman-commit
15+
```
16+
17+
Also triggers on phrases like "write a commit", "commit message", "generate commit".
18+
19+
## Example output
20+
21+
Diff: new endpoint for user profile.
22+
23+
```
24+
feat(api): add GET /users/:id/profile
25+
26+
Mobile client needs profile data without the full user payload
27+
to reduce LTE bandwidth on cold-launch screens.
28+
29+
Closes #128
30+
```
31+
32+
Diff: breaking API rename.
33+
34+
```
35+
feat(api)!: rename /v1/orders to /v1/checkout
36+
37+
BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout
38+
before 2026-06-01. Old route returns 410 after that date.
39+
```
40+
41+
## See also
42+
43+
- [`SKILL.md`](./SKILL.md) — full LLM-facing instructions
44+
- [Caveman README](../../README.md) — repo overview
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: caveman-commit
3+
description: >
4+
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving
5+
intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why"
6+
isn't obvious. Use when user says "write a commit", "commit message", "generate commit",
7+
"/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
8+
---
9+
10+
Write commit messages terse and exact. Conventional Commits format. No fluff. Why over what.
11+
12+
## Rules
13+
14+
**Subject line:**
15+
- `<type>(<scope>): <imperative summary>``<scope>` optional
16+
- Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `test`, `chore`, `build`, `ci`, `style`, `revert`
17+
- Imperative mood: "add", "fix", "remove" — not "added", "adds", "adding"
18+
- ≤50 chars when possible, hard cap 72
19+
- No trailing period
20+
- Match project convention for capitalization after the colon
21+
22+
**Body (only if needed):**
23+
- Skip entirely when subject is self-explanatory
24+
- Add body only for: non-obvious *why*, breaking changes, migration notes, linked issues
25+
- Wrap at 72 chars
26+
- Bullets `-` not `*`
27+
- Reference issues/PRs at end: `Closes #42`, `Refs #17`
28+
29+
**What NEVER goes in:**
30+
- "This commit does X", "I", "we", "now", "currently" — the diff says what
31+
- "As requested by..." — use Co-authored-by trailer
32+
- "Generated with Claude Code" or any AI attribution
33+
- Emoji (unless project convention requires)
34+
- Restating the file name when scope already says it
35+
36+
## Examples
37+
38+
Diff: new endpoint for user profile with body explaining the why
39+
- ❌ "feat: add a new endpoint to get user profile information from the database"
40+
-
41+
```
42+
feat(api): add GET /users/:id/profile
43+
44+
Mobile client needs profile data without the full user payload
45+
to reduce LTE bandwidth on cold-launch screens.
46+
47+
Closes #128
48+
```
49+
50+
Diff: breaking API change
51+
-
52+
```
53+
feat(api)!: rename /v1/orders to /v1/checkout
54+
55+
BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout
56+
before 2026-06-01. Old route returns 410 after that date.
57+
```
58+
59+
## Auto-Clarity
60+
61+
Always include body for: breaking changes, security fixes, data migrations, anything reverting a prior commit. Never compress these into subject-only — future debuggers need the context.
62+
63+
## Boundaries
64+
65+
Only generates the commit message. Does not run `git commit`, does not stage files, does not amend. Output the message as a code block ready to paste. "stop caveman-commit" or "normal mode": revert to verbose commit style.

0 commit comments

Comments
 (0)