invoke

GitHub

参数化编排器,按规范顺序调度专家子代理执行审计、开发等任务。支持断点续跑与上下文传递,管理运行状态文件,确保多阶段工作流有序进行。

skills/invoke/SKILL.md AjayIrkal23/agentic-mercy-10x

Trigger Scenarios

用户输入 /invoke 命令 需要多步骤协作完成复杂任务

Install

npx skills add AjayIrkal23/agentic-mercy-10x --skill invoke -g -y
More Options

Use without installing

npx skills use AjayIrkal23/agentic-mercy-10x@invoke

指定 Agent (Claude Code)

npx skills add AjayIrkal23/agentic-mercy-10x --skill invoke -a claude-code -g -y

安装 repo 全部 skill

npx skills add AjayIrkal23/agentic-mercy-10x --all -g -y

预览 repo 内 skill

npx skills add AjayIrkal23/agentic-mercy-10x --list

SKILL.md

Frontmatter
{
    "name": "invoke",
    "description": "Parametric orchestrator: `\/invoke <acts...> [-- task]` runs one specialist subagent per act in canonical order; artifacts in .claude\/runs\/<ts>-<slug>\/; closers only after code-mutating acts.",
    "argument-hint": "<acts...> [--run <dir>] [-- task]",
    "user-invocable": true
}

/invoke $ARGUMENTS

1. Parse $ARGUMENTS

  • Tokens before -- are acts (plus the optional --run <dir>); everything after is the TASK (empty → the request already in the conversation).
  • Valid acts, canonical order: audit spec plan debug test impl refactor design clean security review docs verify.
  • Reorder the requested acts into canonical order regardless of how they were typed.
  • Unknown token → report unknown act "<x>" — valid: audit spec plan debug test impl refactor design clean security review docs verify and continue with the rest. No valid act → print this usage and stop.

2. Run folder + intel (once, yourself — no dispatch)

  1. New run: SLUG = kebab-case of at most 4 task words (run if empty); RUN="$(git rev-parse --show-toplevel)/.claude/runs/$(date -u +%Y%m%dT%H%M)-$SLUG" (no git repo → the cwd instead of the toplevel); mkdir -p "$RUN". $RUN is absolute: every prompt and closer gets the same path. Resume: --run <dir> → RUN = that folder, made absolute; read its run.json, skip every act already in run.json.done, add the new acts to acts, and give the remaining agents every artifact already in $RUN/ (BRIEF, an approved plan) as input; never redo them. Make sure .claude/runs/ is git-ignored (add it to .gitignore with Edit when missing). Every file below is written with the Write/Edit tools, never a shell heredoc or redirect.
  2. Intel (new run): jcodemunch plan_turn (query = TASK) + assemble_task_context on the impacted area; graphify query_graph only if graphify-out/ exists; read CODEX.md and the root→target CLAUDE.md chain when present.
  3. New run: Write tool → $RUN/BRIEF.md: task, surfaces (FE / BE / infra), impacted files, contracts at risk, acceptance criteria, open questions.
  4. New run: Write tool → $RUN/run.json; a resumed run is updated with Edit, never replaced. The one schema (the team playbook agents/team-lead.md uses the same): {"task": "<TASK>", "slug": "<SLUG>", "run": ".claude/runs/<ts>-<slug>", "started_utc": "<ISO-8601 UTC>", "start_sha": "<git rev-parse HEAD, or null>", "acts": ["<act>"], "done": [], "models": {"<act>": "<model>"}, "team": false, "expected_artifacts": {"<subagent_type or teammate name>": "<ARTIFACT>.md"}} run is the folder relative to the repo root; expected_artifacts maps the dispatched subagent_type (or a teammate name) to the artifact's file name inside the run folder; team is true only while you lead a team. /invoke-status, the TeammateIdle gate and the suite gate read this file — keep it current.

Every specialist receives $RUN/BRIEF.md plus every artifact already in $RUN/; later acts start warm and never re-derive earlier context.

3. Dispatch — one specialist per act, canonical order

act agent artifact (in $RUN/) model (default) mutates checkpoint
audit audit-specialist AUDIT-{date}.md sonnet no no
spec spec-architect SPEC-{slug}.md opus no yes
plan planning-director plan-{date}-{slug}.md opus no yes
debug debug-detective ROOTCAUSE.md opus no no
test test-author TEST-REPORT.md sonnet no no
impl implementation-engineer IMPL-REPORT.md sonnet yes no
refactor refactor-specialist REFACTOR-REPORT.md sonnet yes no
design frontend-uiux-designer DESIGN-REPORT.md opus yes no
clean deadcode-reaper REAP-REPORT.md sonnet yes no
security security-sentinel SECURITY-REPORT.md sonnet no no
review santa-reviewer SANTA-REVIEW.md opus no no
docs docs-sync-agent DOCS-SYNC-REPORT.md sonnet no no
verify qa-verifier VERIFY-REPORT.md sonnet no no

model is what opus-guard resolves by default: opus judges, sonnet executes. Execution agents escalate to opus when the prompt reports a failed previous attempt, or when it names no plan/spec artifact and the task is large. Do not pass model=: opus-guard ignores it for pinned agents and executors unless the user's own turn names the model ("use opus").

For each act, in order:

  1. Set run.json.expected_artifacts["<agent>"] = "<artifact>" (the file name) before dispatching.
  2. Agent(subagent_type="<agent>", description="<act>: <TASK>", prompt=...). The prompt names $RUN/BRIEF.md, each prior artifact path, and the exact output path $RUN/<artifact>; opus-guard adds the model and its [label]. Plain delegation: no name= (teams only for the mixed impl case below).
  3. Wait for it, then append the act to run.json.done. Artifact missing or the act failed → re-dispatch once with the prompt prefixed Previous attempt failed: <one-line reason>. (this escalates execution agents to opus); still failing → stop and report.

Act-specific rules:

  • impl [sonnet] surface-routes from the BRIEF: frontend → frontend-implementor-specialist; backend → backend-implementor-specialist (contract-first, publishes IMPL-REPORT-BE.md ## CONTRACT); general / infra → implementation-engineer. Mixed (FE + BE) → you (the main session) are the team lead. A subagent cannot lead a team (teammates cannot spawn teammates), so never dispatch a team-lead agent: follow the playbook ~/.claude/agents/team-lead.md. Set run.json.team = true and expected_artifacts {"impl-be": "IMPL-REPORT-BE.md", "impl-fe": "IMPL-REPORT-FE.md", "integrator": "INTEGRATION-REPORT.md"}, then spawn Agent(name="impl-be", subagent_type="backend-implementor-specialist", ...), Agent(name="impl-fe", subagent_type="frontend-implementor-specialist", ...), Agent(name="integrator", subagent_type="integrator-specialist", ...); the integrator starts once both reports exist. Teams unavailable (the Agent tool rejects name, or no SendMessage) or the user asked for no teams → plain sequential dispatch backend-implementor-specialist → frontend-implementor-specialist → integrator-specialist, each after the previous artifact exists, same artifacts keyed by subagent_type. A plan artifact in $RUN/ satisfies requires: plan; without one the implementor writes a mini-plan first.
  • design [opus] — frontend-uiux-designer; every raster/video/3D/audio asset comes from Higgsfield (higgsfield-generate), never placeholders. If Higgsfield needs its one-time login (the router says so once per session), ask the user once, batched with any other login, and use mcp__higgsfield__authenticate; until then report the assets as pending.
  • refactor — refactor-specialist edits the main working tree (no worktree: nothing is committed, so nothing would merge back).
  • clean edits code — treat REAP edits as real changes; the closers review them.
  • Checkpoints (after spec, plan): interactive session → stop, show the artifact path + a 5-line summary, ask "continue with ?" and wait for the answer. Non-interactive (-p) → continue.
  • Security auto-add: after the last mutating act, git diff --name-only <start_sha> (plus untracked files) matched against **/auth/**, **/middleware/**, **/security/**, **/api/**, **/routes/**, **/handlers/**, **/controllers/**, **/*login*, **/*session*, **/*token*, **/*password*, **/*oauth*, **/*jwt*, **/*secret*, **/*credential*, **/*validat*, **/*sanitiz* — any hit and security not requested → add security to the run before the closers.

4. Closers — only if an act that mutates (impl, refactor, design, clean) ran

Skip any closer whose act already ran explicitly in this run. Artifacts go to $RUN/.

  1. deadcode-reaper [sonnet] (clean) — sequential first; it edits code.
  2. In ONE message (parallel): santa-reviewer [opus] (review), security-sentinel [sonnet] (security), docs-sync-agent [sonnet] (docs).
  3. qa-verifier [sonnet] (verify) — last, on the final tree.

No mutating act → no closers; say so in one line.

5. Finish

Mark every act done in run.json, then report: $RUN, the artifact list, and the verdicts (Santa PASS / CHANGES REQUESTED, security PASS / BLOCK, QA PASS / FAIL). A BLOCK or FAIL is the headline, not a footnote. To resume later: /invoke <pending acts> --run $RUN -- <task>.

Fallback — Agent tool unavailable

Read references/rosters.md and run each act's skills yourself via the Skill tool, in canonical order. Never silently drop an act.

Optional deterministic flow (explicit opt-in)

~/.claude/workflows/invoke-fullstack.js runs spec → plan → BE → FE → integrator → parallel(santa, security, docs) → qa as a Workflow script. Only the user starts it (/invoke-fullstack, or Workflow with args: {"task", "run", "slug"} after creating the run folder in step 2, run = the absolute $RUN). Never launch it on the user's behalf.

Version History

  • 2315578 Current 2026-10-18 19:22

Same Skill Collection

skills/agentation-react/SKILL.md
skills/baseline-ui/SKILL.md
skills/brand/SKILL.md
skills/context7-mcp/SKILL.md
skills/create-design-md/SKILL.md
skills/debug-broken-ui/SKILL.md
skills/design-system-compliance/SKILL.md
skills/design-taste-frontend/SKILL.md
skills/design/SKILL.md
skills/docker-compose/SKILL.md
skills/ensure-repo-docs/SKILL.md
skills/expo-react-native/SKILL.md
skills/false-green-tests/SKILL.md
skills/fastify-patterns/SKILL.md
skills/fixing-accessibility/SKILL.md
skills/fixing-metadata/SKILL.md
skills/fixing-motion-performance/SKILL.md
skills/grill-with-docs/SKILL.md
skills/higgsfield-brandkit/SKILL.md
skills/higgsfield-video-explainer/SKILL.md
skills/higgsfield-youtube-thumbnail/SKILL.md
skills/idea-refine/SKILL.md
skills/img2threejs/SKILL.md
skills/improve-ui/SKILL.md
skills/invoke-audit/SKILL.md
skills/invoke-clean/SKILL.md
skills/invoke-debug/SKILL.md
skills/invoke-design/SKILL.md
skills/invoke-docs/SKILL.md
skills/invoke-impl/SKILL.md
skills/invoke-plan/SKILL.md
skills/invoke-refactor/SKILL.md
skills/invoke-review/SKILL.md
skills/invoke-security/SKILL.md
skills/invoke-session/SKILL.md
skills/invoke-spec/SKILL.md
skills/invoke-status/SKILL.md
skills/invoke-test/SKILL.md
skills/invoke-update/SKILL.md
skills/invoke-verify/SKILL.md
skills/kokonutui/SKILL.md
skills/mmx-cli/h3-video/SKILL.md
skills/modern-web-guidance/SKILL.md
skills/mongoose-patterns/SKILL.md
skills/no-ai-slop/SKILL.md
skills/slides/SKILL.md
skills/test-error-states/SKILL.md
skills/threejs-r3f/SKILL.md
skills/to-issues/SKILL.md

Metadata

Files
0
Version
2315578
Hash
725cd754
Indexed
2026-10-18 19:22

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 02:17
浙ICP备14020137号-1