用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/AxGord/claude-workflow --skill task-delegation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Debugging meta-patterns — what to do when fixes don't stick
Game dev precision and physics gotchas
Claude Code configuration gotchas — permission rule syntax and evaluation order, settings hierarchy, plugin install scopes, hook behavior
基于 SOC 职业分类
正在显示 SKILL.md
| name | task-delegation |
| description | When and how to delegate to subagents |
3+ yes → delegate
ALWAYS pass an explicit model to the Agent tool — never let a spawn
silently inherit the session model (the session tier is the orchestrator's;
paying it per worker doubles cost for no gain). Never haiku. Pick by
cost-of-error × mechanical safety net: where a linter/test-suite/compiler
catches mistakes, sonnet suffices; where nothing mechanical guards the
output, opus.
| Spawn | Model |
|---|---|
| Review batches with a lint report (.hx+hxq), instruction/config files, routine code | sonnet |
| Review of macro-heavy / concurrency / engine-critical / no-linter code | opus |
| Finding verification (one skeptic over aggregated findings) | opus |
| Code-writing agents: non-trivial logic | opus |
| Code-writing agents: mechanical edits from a detailed plan | sonnet |
| Explore / locate fan-out (returns locations, not judgements) | sonnet |
| Build/test/repro runners (verbatim-quote reporting) | sonnet |
| Web-research fetch/extract fan-out (synthesis stays in the parent) | sonnet |
| Analytical judgement subagents (blast-radius verdicts, design recon) | opus |
On overlap, opus wins: a lint-covered batch that is ALSO macro-heavy / concurrency / engine-critical goes to opus — a style/structure linter does not mechanically guard against races or codegen-correctness bugs.
When THIS session runs on the top model tier — the STRONGEST model the harness offers (you know your own model from your system prompt; an opus/sonnet session is NOT top-tier and skips this section) — your output is JUDGMENT, not code: the session context is re-read every turn at top-tier rates, so file bodies must not flow through it:
sonnet — implementation became mechanics; the plan deliberately
leaves in-implementation freedom (algorithms, macros, concurrency,
engine-critical) or there is no net → opus. The economics of the
scheme: top-tier judgment buys a plan so precise that a cheap model
can write from it.Pick the agent type by task shape:
run_in_background. ONE spawn whose result gates your next step →
ALWAYS run_in_background: false; backgrounding it buys nothing and
costs an idle turn + a wake-up round-trip. A small batch needed
all-at-once → sync too (all calls in one message). Background ONLY
when completions are consumed one-by-one as they finish (rolling
window over a queue) or you genuinely do other work meanwhile.run_in_background: false; when a background write-agent's
report doesn't match the tree, check whether its workflow session is
still active before concluding fabrication; treat the LAST report as
authoritative. Re-verify with a REBUILT tool — a verification probe
through a stale cached binary refutes a fix that actually landed.run_in_background: false, so it cannot honour the "one gating spawn →
sync" rule: you send, then idle-wait for a wake-up. So when the follow-up
gates your next step, decide by SIZE, not by "an agent already has the
context": a small, already-precisely-diagnosed fix (≤~30 lines — the same
threshold as tiny-edits-stay-inline above) → edit it inline YOURSELF; the
background round-trip costs more than it saves, and repeating it becomes
spawn-one-and-wait, the exact anti-pattern the sync rule forbids. Reserve
SendMessage-resume for a LARGE or coupled follow-up where re-establishing
the agent's own context is worth the background wait — and then don't idle:
it's the rolling-window case (do other work, expect the wake-up).Build, run, and test operations → subagent. Interactive live-app debugging sessions (display-tree queries, clicks, screenshots — e.g. via a debug bridge, driver, or browser MCP) → subagent. Heavy output (compilation logs, long files, web content) → subagent with precise extraction prompt ("extract only X"), never dump raw output into main context. Preserves main context for decision-making.
A spawned subagent runs flat by default — no workflow session, no
load_skills gate, no skills. Classify every spawn:
<SESSION_ID> with the current workflow session ID
before sending:
IMPORTANT: Override the default CLAUDE.md rule about start(). Do NOT call start() without arguments. Your FIRST action must be mcp__plugin_workflow_wf__start({ workflow: "subagent", parent_session_id: "<SESSION_ID>" }); then follow the subagent workflow until completion. start() returns SESSION: <id> — pass that session_id explicitly in every subsequent workflow tool call; parallel siblings share the same ppid. (its route self-classifies → skill-loaded
sub-workflow).Environment rules: a bash hook blocks grep/sed/cat/head/tail on parseable .hx — use the Read tool or hxq, never shell text-extraction. hxq is multi-file: ONE hxq <sub> <Type> <dir-or-glob> call, never a per-file loop. Strip noise, but quote every error, failing assertion, and number VERBATIM — don't paraphrase the signal or replace it with a verdict; the parent judges. Bash: run commands FOREGROUND with an explicit timeout sized to the command; background ONLY for never-exiting processes (servers, watchers) or runs genuinely over the 10-min foreground ceiling.This is the parent-side safety net: workflow states that instruct spawning carry their own preamble text, but those prompts can be stale (e.g. a template edit not yet propagated to a live cache). The parent injects the correct preamble into every spawn regardless.
Long multi-agent waves get killed mid-run (API session limits, user interrupts). Two rules make that cheap instead of catastrophic:
Also time-box research inside implementation agents: an agent told to verify facts can rabbit-hole into open-ended web verification. Say "apply the plan text as given; quick checks only; list unverified items in the report instead of digging."
After collecting all reports: sessions → abort any orphaned child
subagent sessions. A child that errored or was interrupted leaves an
active session behind, which blocks the parent session's completion.
removeEventListener in stop/dispose has a matching addEventListener in start, not just constructor (listener orphaning on restart); (2) new init code is inside the correct conditional block, not placed before a guard where it runs in wrong stategit apply --3way and expect to hand-reconcile files several agents touched. Also instruct agents to report their base commit (git log --oneline -1) so staleness is visible. One more trap in that merge flow: git apply --3way STAGES everything it applies — a later git add <subset> && git commit silently commits the WHOLE staged index, not your subset (the tell: the first chunk commit's stat lists every merged file and later chunk commits say "nothing to commit"). Run git reset -q to unstage all before building chunked commits, and if rebuilding botched history, soft-reset to the true pre-merge base, never to a mid-wave commit.