开始使用
Which Tasks Need a Claude Code Subagent? Planner

Which Tasks Need a Claude Code Subagent? Planner

List your recurring tasks; get a keep-as-agent / skill / script verdict and read-only .claude/agents drafts. #研究

评分
需要更多评价
订单数
0
如何使用
下载

What you paste, what you get

You paste: the recurring tasks in your coding workflow (how often, how big, what they touch).

You get: each task scored on a visible rubric and sorted into subagent, skill, script or stay manual, a staffing table, and drafts in Claude Code's subagent format (.claude/agents/.md, read-only by default, with an explicit tools line you review before saving) for the tasks that earn an agent. The drafts use Claude Code's subagent format; the scoring and sorting steps are plain text that other SKILL.md-reading agents should also be able to follow (not tested).

One-time download. Sign in, pay once and download the SKILL.md, then run it in your own AI agent. Built for Claude Code; other agents that read SKILL.md files (such as Codex CLI or OpenClaw) should also work. No network access or extra tools needed. No subscription from us: you use your own agent and its plan.

Sample output

The input was a hand-written, generic task list.

Real, unedited output from running this Skill on a sample problem:

## Evidence

| # | Task | Frequency | Input size | Output | Side effects | Pain |
|---|---|---|---|---|---|---|
| 1 | Dependency scan | Weekly | ~400 package files + lockfile | Short table | None | Volume of reading |
| 2 | Format + lint fix | Daily | Changed files | Clean code | Edits files | Manual, forgettable |
| 3 | PR review (tests, input handling) | Several/week | 20+ file diffs | Short report | None | Big diffs fill context |
| 4 | Error-log summary | Monthly | 30 days of logs, very long | Top recurring errors | None | Size |
| 5 | Feature-flag rename | Occasional | Codebase-wide search | Edited files | Edits many files | Needs judgement |
| 6 | Release checklist | Twice/month | The checklist | Steps done with you | Unknown, likely tags/deploys | Unknown |

## Rubric scores

| # | 1 Freq | 2 Context | 3 Isolation | 4 Tool risk | 5 Parallel | 6 Simpler option |
|---|---|---|---|---|---|---|
| 1 | `+` weekly, same shape | `+` reads far more than it reports | `+` lockfile noise stays out of chat | `+` read-only if `npm audit`/`outdated` output is passed in as files | `0` one lockfile | `0` `npm audit` gives raw data, but not the "risky" judgement |
| 2 | `+` daily | `-` only changed files | `0` | `-` must write | `0` | `-` Prettier/ESLint `--fix` in a pre-commit hook |
| 3 | `+` several/week | `+` 20+ files → short report | `+` diff noise stays out | `+` Read/Grep/Glob are enough if you pass the diff | `+` split per module | `+` no script judges missing tests |
| 4 | `0` monthly, not weekly | `+` very long logs | `+` | `+` read-only | `+` per-week chunks | `-` a grouping script (normalise, count, sort) does the heavy part |
| 5 | `-` occasional | `+` codebase-wide search | `-` needs your judgement in the chat | `-` broad edits | `0` | `0` |
| 6 | `0` twice/month | `-` | `-` needs the conversation | `-` release steps change state | `-` sequential | `-` a skill covers it |

## Buckets

- **Agent:** 1, 3
- **Script/CI:** 2 (pre-commit hook), 4 (aggregation script, then the main session summarises its short output)
- **Skill:** 6 (the checklist as a skill the main session follows with you)
- **Stay manual:** 5 (do it in the main session, where you can approve each judgement call)

## Anti-pattern check

- No one-agent-per-task: 6 tasks → 2 agents. Tasks 1 and 3 read different material, so they are not merged.
- No write tools: both agents are Read/Grep/Glob only. The main session runs `npm audit --json`, `npm outdated --json` and `git diff`, saves the output to files and passes the paths. That avoids granting Bash at all.
- No god-agent, no nested delegation, and no secrets in the bodies.

## Agent drafts

`.claude/agents/dependency-auditor.md`
```markdown
---
name: dependency-auditor
description: Reviews a Node lockfile plus npm audit/outdated JSON and returns a short risk table. Read-only; never edits files or runs commands.
tools: Read, Grep, Glob
---

You are the dependency auditor for this project. You receive a request without the surrounding conversation.

## Do
1. Confirm you were given the repo path, the lockfile path, and the paths to `npm audit --json` and `npm outdated --json` output files.
2. Read the audit and outdated files. Use the lockfile and package.json files only to check whether a package is direct or transitive and which top-level dependency pulls it in.
3. Rank the packages by risk: known vulnerabilities by severity first, then major versions behind, then deprecation notices found in package metadata.

## Does not do
- Does not edit, create or delete files.
- Does not run commands, install, upgrade or push anything.
- Does not guess: anything it cannot confirm from the given files is marked "unverified".
- Does not recommend upgrades beyond naming the target version.

## If context is missing
Say exactly which file or path is missing and stop. Do not assume.

## Report format
Table of at most 15 rows: Package | Direct/Transitive | Current | Latest | Issue | Severity | Suggested target.
Then a one-line verdict: "N urgent, N worth scheduling, rest fine."
```

`.claude/agents/pr-reviewer.md`
```markdown
---
name: pr-reviewer
description: Reviews a saved PR diff for missing tests and unsafe input handling and returns a short report. Read-only; never edits files.
tools: Read, Grep, Glob
---

You are the PR reviewer for this project. You receive a request without the surrounding conversation.

## Do
1. Confirm you were given the repo path, the diff file path, and the scope (all files, or a named module).
2. For each changed source file, find its tests with Glob/Grep. Flag new or changed behaviour that has no matching test change.
3. Check changed code that handles request input (params, body, query, headers, uploads) for missing validation, unescaped output, raw SQL/shell construction and unchecked redirects.
4. Report findings only. Do not narrate your process.

## Does not do
- Does not edit, create or delete files.
- Does not run commands, tests or git operations.
- Does not guess: unclear cases are reported as "unverified".
- Does not comment on style or formatting; linting handles that.

## If context is missing
Say exactly what is missing (diff path, scope) and stop.

## Report format
At most 10 bullets, each written as `file:line — category (Missing test | Input handling) — one-line issue`.
Then a one-line verdict: "Ready", "Ready with notes", or "Needs changes".
```

## Delegation examples

- **dependency-auditor:** "Repo /work/example-shop. Lockfile /work/example-shop/package-lock.json. Audit JSON at `<path>`, outdated JSON at `<path>`. Return the risk table."
- **pr-reviewer:** "Repo /work/example-shop. Diff at `<path>` (main...feature-x). Scope: all files." For large PRs, run one copy per top-level module with the same diff path and a different scope, then have the main session merge the reports and remove duplicates.

## Staffing table

| Task | Bucket | Criteria met | Agent name or alternative | Tools | Writes? |
|---|---|---|---|---|---|
| 1 Dependency scan | Agent | 1, 2, 3, 4 | dependency-auditor | Read, Grep, Glob | No |
| 2 Format/lint | Script/CI | 1 | Pre-commit hook (Prettier + ESLint `--fix`) | — | Yes (by the hook) |
| 3 PR review | Agent | 1, 2, 3, 4, 5, 6 | pr-reviewer | Read, Grep, Glob | No |
| 4 Log summary | Script/CI | 2, 3, 4, 5 | Grouping script, then the main session summarises | — | No |
| 5 Flag rename | Stay manual | 2 | Main session, with you approving edits | — | Yes (reviewed) |
| 6 Release | Skill | none | Release-checklist skill | — | Per step |

**Recommendation: 2 agents.** Not staffed:
- 2: deterministic, so a hook is cheaper.
- 4: monthly, and a script does the heavy reduction.
- 5: rare and judgement-heavy, so it belongs with you.
- 6: needs the conversation, so a skill fits better.

**Review step:** read each draft's `tools:` line and its `Does not do` list before saving. Saving the files, and deciding which tools to grant, is your call. I haven't written anything to disk.

Use cases

  • You keep re-explaining the same chore to Claude Code and wonder if it should be an agent
  • Cleaning up an over-grown 'helper' agent that has every tool
  • Deciding between an agent, a skill, a script or a git hook for a recurring task
  • Giving each agent least-privilege tools and a clear report format

FAQ

Does it create files for me? Not unless you ask. It writes drafts in the reply; you decide what to save.

Is this only for Claude Code? The drafts use Claude Code's agent format. Other agents that read SKILL.md files should also be able to follow the scoring steps, but it is built and described for Claude Code.

Will it tell me not to build agents? Often, yes. Tasks that a script, hook or saved prompt does better are marked that way.

Product and company names mentioned here, including Anthropic, OpenAI and OpenClaw, are trademarks of their respective owners; this Skill is an independent product and is not affiliated with, endorsed by or sponsored by any of them.

How it works (in detail)

Subagent Staffing Planner is for the moment you think 'I should make an agent for this' and are not sure which tasks really deserve one. It scores each recurring task and tells you what should stay manual, become a plain skill or become a script.

Phase 1 — List the tasks. Frequency, input size, output needed, side effects and pain for each recurring task you give it. Unknowns stay marked unknown.

Phase 2 — Score. A transparent rubric: frequency, context size, need for isolation, tool risk, parallelism, and whether a script or saved prompt is enough.

Phase 3 — Buckets and anti-patterns. Agent, skill, script or stay manual, plus a check against one-agent-per-task and god-agents with write tools.

Phase 4 — Drafts and table. Read-only .claude/agents/.md drafts with an explicit tools line and a does-not-do list, delegation examples and a final staffing table.