AGENT SKILL

subagent-buildverify-tool-grant-check

Before delegating a task to a subagent whose acceptance test requires running a build, test suite, simulator/device action, or any other shell-gated verification, check that the subagent type actually has a Bash (or equivalent shell) tool. Use this whenever you're about to spawn a subagent/Task/Agent to "implement and verify" something, especially in iOS/Xcode, compiled-language, or any project where "done" means "it builds and the tests pass" or "the sim/device shows the right screen" — a subagent given that acceptance test but no shell access will not fail fast, it will silently stall for many minutes producing zero output while looking "busy."

License 许可
MIT
最近更新
2026-11-07
Stars
★ 1
Forks
1

01 前言 Front Matter

name
subagent-buildverify-tool-grant-check
description
Before delegating a task to a subagent whose acceptance test requires running a build, test suite, simulator/device action, or any other shell-gated verification, check that the subagent type actually has a Bash (or equivalent shell) tool. Use this whenever you're about to spawn a subagent/Task/Agent to "implement and verify" something, especially in iOS/Xcode, compiled-language, or any project where "done" means "it builds and the tests pass" or "the sim/device shows the right screen" — a subagent given that acceptance test but no shell access will not fail fast, it will silently stall for many minutes producing zero output while looking "busy."

03 SKILL.md 正文

Check a Subagent's Tool Grant Before Delegating Build/Verify Work

Symptom

You spawn a subagent (general-purpose or a named agent type) to implement a fix or feature and verify it — "implement X, then run the build/tests to confirm it works." The subagent runs for a very long time (tens of minutes), shows almost no CPU/token usage, produces zero file edits, and never reports progress. It isn't crashed and isn't obviously erroring — it just never finishes. This happened twice in the same session, with two different model tiers, before the pattern was recognized as systemic rather than a one-off fluke.

Root cause

The subagent's tool list did not include Bash (or the project's equivalent shell-execution tool). Its task description asked it to satisfy an acceptance test that structurally requires running a shell command — xcodebuild, ./build.sh, xcrun simctl, npm test, cargo test, whatever the project's "prove it works" step is. A subagent in this position doesn't have a clean way to say "I cannot do this, I have no shell" — it keeps trying, re-reading files, re-reasoning about how to verify without the tool it needs, and burns enormous wall-clock time never converging. This is a silent capability mismatch, not a bug in the subagent's reasoning: it was simply asked to do something it has no tool to do, and the harness doesn't surface that as a hard error the way a missing file or a permission denial would.

Fix

Before spawning a subagent for a task whose "done" condition is build- or verify-gated, check what tools that subagent type actually has. Two ways to do this safely:

  1. Look up the agent type's declared tool list (shown alongside its name and description wherever available agent types are listed) before dispatching. If Bash isn't in the list, don't hand it a task whose acceptance test needs a shell.
  2. When in doubt, split the work by capability, not by feature. Give the subagent a pure read/edit/logic task with an acceptance test it can actually check itself (a diff that compiles by inspection, a self-contained unit of logic, a reasoning-checkable transformation) — and reserve every build, test-run, and simulator/device step for the main loop, which does have the shell tool. The subagent implements; you build and verify.
# WRONG — subagent has no Bash, acceptance test needs one
Agent("Implement the RealityKit fix in RackMapFullScreenView.swift, then run
./build.sh and xcrun simctl to confirm the full-screen 3D scene renders.")
# → subagent wedges: it has Read/Edit/Write/Grep/Glob but no way to build or
#   drive the simulator, and never says so — it just never finishes.

# RIGHT — split by capability
Agent("Implement the RealityKit fix in RackMapFullScreenView.swift per this
root-cause analysis: <analysis>. Return when the edit is made; do not attempt
to build or run a simulator — you don't have those tools.")
# main loop, after the subagent returns:
./build.sh --no-launch && xcrun simctl io <udid> screenshot ...

If a task's acceptance test is inherently build/sim-gated and can't be usefully split (e.g., "make this 3D view render — you'll know it works when the screenshot shows boxes, not black"), the pragmatic call is often to do the whole task in the main loop rather than force an artificial split, especially for RealityKit/UI work where the fix only becomes obvious by looking at what actually rendered.

When to use

  • Any time you're about to dispatch a subagent whose task description includes "build", "run the tests", "verify on the simulator/device", or similar, in a project where those steps require shell access.
  • Especially relevant for Xcode/Swift projects (xcodebuild, xcrun simctl), but the same failure mode applies to any compiled or test-gated stack.
  • If a previously-dispatched subagent has been running far longer than its task should plausibly take with near-zero CPU/token movement and zero file changes, suspect this before assuming it's "just thinking hard" — check its tool grant and consider stopping it.

Related skills

  • parallel-ios-agent-fixes-single-sim — a different failure mode in the same neighborhood: subagents that do have Bash but contend over the same simulator device. This skill is about subagents that have no shell at all; that one is about isolating shell-capable subagents from each other.
  • superpowers:subagent-driven-development — general subagent-dispatch guidance; this skill sharpens one specific pre-flight check it doesn't spell out explicitly: verifying the tool grant matches the acceptance test before dispatch, not after a stall.

04 同仓库更多 Skills

abhijitbansal
abhijitbansal/claude-skills

second-wind

Orchestrate long unattended Claude Code runs across multiple repos with the wind CLI. Use when the user wants to run Claude Code overnight, resume sessions after the 5-hour usage limit, run Claude in many repos at once via tmux, or says "set up second wind", "wind up", "overnight run", "resume after limit", "usage limit orchestrator".

★ 1
abhijitbansal
abhijitbansal/claude-skills

structured-output-adaptive-thinking-token-bloat

A Claude API call using output_config.format (json_schema structured outputs) with thinking:{type:"adaptive"} burns most of its output budget on thinking (observed ~21k of ~24k tokens) without improving JSON quality, making the run up to ~5x more expensive than the same call with thinking omitted — use when calling the Messages API with a json_schema output format for extraction, ranking, classification, or summarization tasks, or when a schema-constrained call's usage.output_tokens is far larger than the returned JSON.

★ 1
abhijitbansal
abhijitbansal/claude-skills

review

Apply a code-review lens to a diff, branch, or file — find correctness bugs, security issues, and quality problems, ranked by severity, with a concrete fix for each. Use when the user says "review this", "review my diff", "check this PR", "look this over before I commit", or "is this safe". Skip when the user wants the code written, not reviewed.

★ 1
abhijitbansal
abhijitbansal/claude-skills

refresh

Rebuild the prompt-craft command registry and usage profile, and print a summary of installed commands and your personalized recommendations. Use when you install or update plugins and want the advisor to pick them up immediately, or say "refresh prompt-craft", "rebuild the command registry".

★ 1
abhijitbansal
abhijitbansal/claude-skills

refactor

Apply a refactoring lens — restructure code without changing behavior, guarded by tests that pass before and after. Use when the user says "refactor", "clean this up", "extract this", "simplify this", "reduce duplication", or "make this readable" on existing working code. Skip when the change is meant to alter behavior (that's a feature or a fix).

★ 1
abhijitbansal
abhijitbansal/claude-skills

plan

Decompose a non-trivial task into an explicit, tracked plan with goals and per-step acceptance criteria before writing code. Use when the user says "plan this", "break this down", "what's the plan", or asks for a multi-step feature/refactor that touches more than one file. Pairs with plan mode. Skip for single-edit changes that need no decomposition.

★ 1