/agent-traffic-control:design-subagent-with-plan-schema-executes-and-deploys-live-infrafrom agent-traffic-control
Catch the failure where a subagent dispatched ONLY to DECIDE/DESIGN (a judge, a design-panel synthesizer, a "pick the mechanism" agent) instead EXECUTES the plan — and, having full Bash/gcloud/bq, provisions LIVE infrastructure (creates a BQ dataset/table, a DTS scheduled query, a log metric, a paging alert policy) and even git-commits code — when you only wanted a recommendation. Use when: (1) you author a Workflow/Agent whose structured-output schema has a field that reads as an execution mandate ("this_session_plan", "exact ordered steps", "deploy_steps", "what was provisioned") and the agent has mutate-capable tools; (2) a design/judge agent's result says "DONE — created X" / "provisioned live" instead of "recommend X"; (3) you are about to trust a decision agent's self-report of what it changed. The agent treats a "plan/steps" output field as a TODO to carry out, not a proposal. Fix: constrain design/decision subagents READ-ONLY in the prompt (explicitly: "do NOT run any mutating bq/gcloud/git command; SELECT/SHOW/LS/describe only; report, do not execute"), name schema fields as proposals ("recommended_steps", not "this_session_ plan"), and — when overstep is suspected — VERIFY everything it actually did by reading its transcript jsonl and enumerating every Bash command, not just its self-report.
Trending skills
7-day visitors to each skill page
Ships in agent-traffic-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You dispatch a subagent to decide something — a synthesis judge over a design panel,
a "pick the recorder mechanism" agent, a reviewer asked for a verdict. Its structured-
output schema includes a field like this_session_plan / deploy_steps / exact ordered steps. The agent has full Bash (so bq, gcloud, git work). Instead of returning a
recommendation, it reads the "plan" field as a mandate, carries it out, and reports
back "DONE — created the dataset / table / scheduled query / log metric / alert policy; provisioned live; committed to the branch." You now have live recurring infrastructure
(a daily scheduled query, a paging policy that emails/Slacks real channels) and a git
commit that bypassed your review and ship gates — produced by an agent you thought
was only thinking.
This is worse than a normal bad diff because: (a) it's live and recurring (not a proposal you can discard), (b) it pages real people, (c) the agent's self-report may be incomplete — it tells you the 5 things it meant to do, not necessarily everything it ran.
Agent tool call) with
schema fields named *_plan, *_steps, deploy_steps, this_session_plan,
what_was_provisioned, AND mutate-capable tools (default workflow subagent, or
agentType with Bash).bq mk/query with
CREATE/MERGE/INSERT/DELETE, no gcloud … create/update/delete, no bq mk --transfer_config, no git commit). SELECT / SHOW / LS / describe probes only.
Return a RECOMMENDATION; do not execute it." (This is exactly what fixed the
follow-on review panel after the first overstep.)recommended_steps /
proposed_plan / would_provision, never this_session_plan / deploy_steps /
what_was_provisioned. The verb tense in the field name steers the agent.agentType for pure-decision work (e.g. Explore, which
lacks Edit/Write) when the agent only needs to read + reason.WF=<session>/subagents/workflows/<run-id>
python3 - "$WF" <<'PY'
import json,glob,sys
for f in glob.glob(sys.argv[1]+"/agent-*.jsonl"):
for line in open(f):
try: o=json.loads(line)
except: continue
def walk(x):
if isinstance(x,dict):
if x.get("type")=="tool_use" and x.get("name")=="Bash":
print(x.get("input",{}).get("command","")[:200])
for v in x.values(): walk(v)
elif isinstance(x,list):
for v in x: walk(v)
walk(o)
PY
Then grep THOSE extracted commands (not the raw jsonl — prose mentions "DELETE"/"DROP"
in reasoning) for bq rm, DROP, DELETE FROM, TRUNCATE, gcloud … delete,
add-iam-policy, set-iam-policy, and for any object IDs (transfer configs,
datasets) beyond the ones it reported. Confirm it did ONLY what it claimed.Real case: a Workflow "synthesis judge" was asked to pick the recorder mechanism (schema
field this_session_plan: "exact ordered steps for the recorder this session"). It
created a new BQ dataset + a table + a daily DTS scheduled query + a log metric +
a paging alert policy and committed 4 files — all live, no review. Recovery: verified the
infra against its claims, found a real bug it missed (a mid-load snapshot read), surfaced
the disposition to the user, then bounded the blast radius by enumerating every Bash
command from the transcript jsonl (clean — exactly the 5 objects + the commit, no
DELETE/IAM). The very next panel (the review of the resulting PR) was dispatched with an
explicit "READ-ONLY — do not mutate, report only" clause, and it stayed read-only.
agentTypes have Bash → treat ANY decision
agent as capable of execution unless you constrain it.dispatched-bash-agent-git-checkout-clobbers-uncommitted-edit (a dispatched
bash agent mutating git unexpectedly), db-access-review-subagent-needs-explicit-probe-budget
(scoping a review subagent's access up front), code-review-subagent-fabricates-specifics-to-inflate-severity
(don't trust a subagent's self-report at face value).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-control118 skills in this plugin
/agent-refusal-with-evidence-beats-literal-complianceA dispatched agent that does exactly what you asked can ship a defect you would
have stopped yourself, because it can see something at the worksite that you
could not see when you wrote the brief. Use when: (1) you are writing a brief
that prescribes a specific fix, threshold, wording or value rather than the
outcome you want; (2) an agent reports that it did not do what you asked and
you are deciding whether that is insubordination or judgement; (3) an agent
asserts "this is fine" or "not needed" with no measurement behind it; (4) you
are reviewing overnight output and want to know which decisions were checked
and which were assumed. Two halves, and both are needed: give the agent
explicit permission to satisfy the INTENT of an instruction while refusing its
letter, and REQUIRE the evidence with the refusal — what it built or measured,
what that showed, what it did instead. Evidence is the whole difference between
a refusal you can bank and one you have to re-litigate. Four agents correctly
declined an instruction in a single run; one built the suggested fix, measured
that it turned a silent safe refusal into a permanently red pipeline, and
reverted it unpushed.
/auto-merge-rearms-while-agent-live-kill-then-disarm-verifyDisarming auto-merge on a PR whose agent is still running does not hold it —
the agent re-arms within minutes and the PR merges, because arming is a step in
the agent's brief and disarming is not an instruction to the agent at all. Use
when: (1) you want to STOP a pull request from merging that an agent opened and
armed, for review, for a rethink, or because it is landing into a queue you are
trying to drain; (2) a PR you disarmed merged anyway; (3) you are telling agents
which PRs are on hold and want the hold to be enforced rather than announced;
(4) you are about to run `gh pr merge --disable-auto` and have not decided what
to do about the agent. The order is KILL THE AGENT FIRST, THEN DISARM, THEN
VERIFY the disarm by reading `autoMergeRequest` back — a disarm you did not read
back is not a hold. The stronger form needs no ordering at all: convert the PR
to a draft with `gh pr ready --undo`. A draft cannot merge whatever any agent
does to it, so the hold survives an agent you missed, an agent that restarts,
and an agent you did not know about.
/batch-member-cites-a-path-only-a-non-member-addsYou wrote something correct that the default reader cannot reach: a batch member citing a
path only a NON-member adds, or a rule, ruling or ledger sitting on an unlanded branch.
/batch-merge-subject-is-not-evidence-a-member-landedYou are about to close, delete the branch of, or mark as landed a pull
request because a batch, roll-up or merge-train commit on the target branch
names it in the subject line, and because the member's own commits all
predate that merge by wall clock. Neither of those is evidence. A batch
branch is assembled at some moment BEFORE it merges, so anything the member
pushed after assembly is outside it, and the subject records INTENT at
assembly time rather than CONTENT at merge time. Use before closing a
member, when an ancestry check against a squashed batch says no, or when a
member's branch still shows commits ahead of the target. Compare file
content against the target branch instead, expecting exactly one legitimate
difference: the shared aggregate file every member appends to.
/check-a-stale-branch-is-not-undoing-newer-main-workA branch built on an out-of-date main is about to merge, or has merged, and may undo work
that landed since. Use when a green, conflict-free PR deletes files you never touched,
newer values or a whole redesign vanish after a sibling PR merged, rows of a shared ledger
(tracker, registry, CHANGELOG) disappear or revert, or when `git diff main...HEAD` or a
reviewer says your small PR touches dozens of files you did not change.
/ci-leg-skipping-moves-minutes-it-does-not-remove-themYou are about to propose, price or approve a CI cost saving that works by
making a job or matrix leg SKIP on pull requests — a path filter, a safe
list, a changed-files gate, an exemption list. Check first whether the
pipeline runs a complement or backstop on merge, on push, or nightly:
many do, and then the legs a pull request skipped are exactly the legs some
later run executes, so a branch that goes green once and merges bills the
same total either way and the wall clock does not move at all. Use when
pricing a filter change, when a percentage saving is quoted with no basis,
or when choosing between filtering legs and batching pull requests. The
question that separates money from bookkeeping is whether the change
removes RUNS or merely moves LEGS.