subagent

A tool for running GitHub issues as subagents, which are smaller coding agents that work inside the current conversation.

In plain words
What is it for?
Use it to assess whether issues fit a subagent, run fixes and reviews, monitor progress, and prepare completed work for merging.
Why use it?
It keeps issue execution, review, and merge preparation together instead of requiring separate coding sessions for each issue.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/auerbachb/claude-code-config/subagent
Any agent
npx skills add auerbachb/claude-code-config --skill subagent
Clone the repo
git clone --depth 1 https://github.com/auerbachb/claude-code-config

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 16,403 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.16403
Opus 5 $0.00031 $0.08202
Sonnet 5 $0.00012 $0.03281
Haiku 4.5 $0.00006 $0.01640

Measured 2d ago against content hash 806bd8e20b01, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

subagent scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Then verify: `--get` shows `phase_completed: "B"` with your SHA, and `find ~/.claude/handoffs -name 'pr-{PR_NUMBER}-handoff.json'` returns exactly ONE path — the `{owner}/{repo}` one. A second match means a call lost its
.claude/skills/subagent/SKILL.md · 797 lines

How it starts

The opening of the file, as written. The whole thing — 797 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execute one or more issues as subagents within the current thread. Each issue goes through the full Phase A/B/C orchestration protocol (fix, review, merge prep) while this skill monitors progress and manages transitions. Inline execution is the default for issues of any tier. Only two of Step 4's three too-big criteria route an issue out to a separate thread; the third — "should be split into multiple PRs" — is decomposed into an inline increment chain instead (Step 5.1).

Parse $ARGUMENTS as space-separated issue references. Strip # prefixes to get bare issue numbers. If no arguments provided, ask the user which issue(s) to execute.


Step 0: Resolve shared tooling

/subagent is symlinked into every repo, but its helper scripts and reference docs are not — most repos carry no .claude/ directory. Resolve them; never invoke a bare .claude/scripts/… path. Full contract and the classified dependency inventory: .claude/reference/portable-skill-resolution.md (issue #1189).

resolve_script() {
  local name="$1" candidate
  for candidate in \
    "$HOME/.claude/skills-worktree/.claude/scripts/$name" \
    "$HOME/.claude/scripts/$name" \
    ".claude/scripts/$name"; do
    if [[ -x "$candidate" ]]; then echo "$candidate"; return 0; fi
  done
  return 1
}
ISSUE_CLAIM=$(resolve_script issue-claim.sh || true)
CR_PLAN=$(resolve_script cr-plan.sh || true)
SESSION_STATE_SH=$(resolve_script session-state.sh || true)
ISSUE_DEDUP=$(resolve_script issue-dedup.sh || true)
ESTIMATE_RESOLVE_SH=$(resolve_script estimate-resolve.sh || true)
OVERRUN_CHECK_SH=$(resolve_script overrun-check.sh || true)

handoff-state.sh (Step 8), ac-checkboxes.sh, escalate-review.sh, and local-review.sh are resolved by the phase agents themselves, inside the spawn prompts — the RESOLVE block inserted with SAFETY/MINDSET/SKILLS carries the same candidate order to them. Read reference docs (chip-launching.md, subagent-phase-guardrails.md, issue-claim.md, merge-sequencing.md) through the matching .claude/reference/ order.

When something does not resolve, say so in one line; never skip the contract silently.

  • subagent-phase-guardrails.md unreadable → required. Print ERROR: subagent-phase-guardrails.md not found (checked all three paths) — SAFETY/MINDSET/SKILLS/RESOLVE blocks unavailable and spawn nothing. Those blocks are the safety restatement every spawn carries; a phase agent launched without them is not a degraded spawn, it is an unsafe one.
  • chip-launching.md unreadable → required for Step 5's route-to-thread branch only. Print ERROR: chip-launching.md not found (checked all three paths) — too-big routing gate unavailable, and queue the issue inline rather than routing it out: inline is the default the gate exists to protect (#1189), so failing toward it is correct.
  • SESSION_STATE_SH empty → required. Print ERROR: session-state.sh not found (checked all three paths) — agent tracking and refill state unavailable and do not spawn; an untracked agent is one nothing will ever reap.
  • ISSUE_CLAIM empty → optional. Print DEGRADED: issue-claim.sh not found (checked all three paths) — Step 6 claim gate skipped and continue.
  • CR_PLAN empty → optional. Print DEGRADED: cr-plan.sh not found (checked all three paths) — CR plan detection skipped and continue with Claude's own plan.
  • ESTIMATE_RESOLVE_SH empty → optional. Print DEGRADED: estimate-resolve.sh not found (checked all three paths) — planning-bound lookup unavailable; overrun check skipped and skip the overrun check in Step 8 (BOUND_MIN cannot be derived without it).
  • OVERRUN_CHECK_SH empty → optional. Print DEGRADED: overrun-check.sh not found (checked all three paths) — in-flight overrun alerts unavailable and skip the overrun check in Step 8.

The Step 4 too-big criteria need no fallback — they are written inline in this file, so that contract already travels. Only their per-criterion rationale doc (too-big-recalibration-2026-07.md) is a fallback read.

Read the full file on GitHub · 797 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 797 lines · 62 tokens per session scan B 806bd8e20b01

Subscribe to this mod's changes

subagent is a skill published in the GitHub repository auerbachb/claude-code-config (5 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 16,403 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.