Agent Skills
› AjayIrkal23/agentic-mercy-10x
› invoke-refactor
invoke-refactor
GitHub执行重构专项任务,调度重构专家智能体生成报告并写入运行文件夹。
Trigger Scenarios
需要执行代码重构任务
调用 /invoke refactor 命令
Install
npx skills add AjayIrkal23/agentic-mercy-10x --skill invoke-refactor -g -y
SKILL.md
Frontmatter
{
"name": "invoke-refactor",
"description": "Run the REFACTOR act — dispatches refactor-specialist (default sonnet; opus-guard routes) and writes `REFACTOR-REPORT.md` into a run folder. Single-act form of `\/invoke refactor -- <task>`.",
"argument-hint": "[--run <dir>] [task]"
}
Run the refactor act for: $ARGUMENTS
This is /invoke refactor without the closers; ~/.claude/skills/invoke/SKILL.md governs anything not said here.
- Run folder:
--run <dir>in the arguments → reuse that folder (absolute path) and update itsrun.jsonwith Edit; otherwise create a new one exactly as/invoke§2 (RUN="$(git rev-parse --show-toplevel)/.claude/runs/$(date -u +%Y%m%dT%H%M)-$SLUG",BRIEF.md,run.jsonwith"acts": ["refactor"]). Never write into any other existing run folder. - Set
run.json.expected_artifacts["refactor-specialist"] = "REFACTOR-REPORT.md". Agent(subagent_type="refactor-specialist", description="refactor: <task>", prompt=...). The prompt names$RUN/BRIEF.md, every artifact already in$RUN/, and the exact output path$RUN/REFACTOR-REPORT.md. Nomodel=: opus-guard routes it (pins, escalation, per-project mode). Artifact missing or the act failed → re-dispatch once with the prompt prefixedPrevious attempt failed: <one-line reason>.- Append
refactortorun.json.done, then report the artifact path and a one-paragraph verdict.
Runs in the main working tree: subagents never commit, so a worktree would hold nothing to merge back, and the closers review the main tree's diff.
Version History
- 2315578 Current 2026-10-18 19:22


