[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HBV7SGBH14T5K2336RYZWW":3,"skill-same:01M6HBV7SGBH14T5K2336RYZWW":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":45,"updatedAt":46,"install":47,"resources":59},"01M6HBV7SGBH14T5K2336RYZWW","refactor",null,"Improve code structure without changing behavior, verifying with tests at every step. Use this when you want to restructure, extract, rename, or simplify existing code that already works.","SyloRei\u002Fclaude-godmode","SyloRei","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5840195?v=4","01M6HBT6QSK7QM4DTVPNGARNP4","Andrey Prokofev","01M6HBT6WED1MEN8W7JYP412WE",3,"MIT","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"code","simplify","improve","behavior","extract","use","rename","structure","tests","with","you","true","at","Existing","2026-11-10 10:12:30",false,"---\nname: refactor\ndescription: \"Improve code structure without changing behavior, verifying with tests at every step. Use this when you want to restructure, extract, rename, or simplify existing code that already works.\"\nuser-invocable: true\n---\n\n# Safe Refactoring\n\nImprove code structure without changing behavior. Every step verified by tests, with quality gates passing before and after each change.\n\n---\n\n## Auto Mode\n\nWhen `## Auto Mode Active` is present in context: do not pause for confirmation. Plan the steps using reasonable defaults, surface the plan and assumptions inline, then execute step by step with per-step quality gates. When the refactor's scope or target is genuinely ambiguous — what to restructure into what — ask, following the shared recommendation convention (`godmode:recommend-convention`) in `rules\u002Fgodmode-recommend.md`: lead with your best-inferred answer to override, not a blank prompt (e.g. \"I'll extract X into Y unless you'd scope the boundary differently\"), then let the user redirect. Treat user course-corrections as normal input.\n\n---\n\n## The Job\n\n1. Verify baseline\n2. Plan steps\n3. Execute one step at a time with test verification\n4. Report results\n\n---\n\n## Process\n\n### 1. BASELINE\n- Run ALL quality gates (from `config\u002Fquality-gates.txt`). They must pass.\n- If not: fix quality issues first (separate commit).\n- Note current test count and coverage.\n\n### 2. IDENTIFY\n- What specifically needs improving and WHY\n- Is this refactoring or a behavior change? (If behavior → wrong skill, use normal workflow)\n- Scope: list exactly which files\u002Ffunctions are affected\n\n### 3. PLAN\n- Break into steps, each independently committable\n- Order: safest\u002Fsimplest first, riskiest last\n- Each step leaves the code in a working state\n\n### 4. EXECUTE (repeat per step)\n```\na. Apply one refactoring\nb. Run quality gates\nc. If GREEN → commit: \"refactor: [what was done]\"\nd. If RED → revert immediately, try smaller step\n```\n\n### 5. VERIFY\n- Run full quality gates\n- Compare test count (same or higher, never lower)\n- Compare coverage (same or higher)\n- Confirm: no behavior changed\n\n---\n\n## Common Refactorings\n\n| Refactoring | When to use |\n|-------------|------------|\n| Extract function | >40 lines, mixed responsibilities |\n| Rename | Name doesn't describe purpose |\n| Inline | Abstraction adds complexity without value |\n| Move | Code in wrong module\u002Ffile |\n| Split file | >300 lines or mixed responsibilities |\n| Simplify conditional | Nested if\u002Felse, complex booleans |\n| Replace magic values | Hardcoded numbers\u002Fstrings |\n| Improve types | `any`, loose types where precise ones exist |\n\n---\n\n## Rules (Non-Negotiable)\n\n- NEVER mix refactoring with feature changes in the same commit\n- Quality gates must pass before AND after EACH step\n- If gates break: REVERT. Don't fix forward during refactoring.\n- Commit after each successful step\n- When `.planning\u002FSTANDARDS.md` is present, the code you restructure must honor it as authoritative project context over the generic defaults where it has spoken (see \"Project Standards Precedence\" in `rules\u002Fgodmode-coding.md`)\n\n---\n\n## Agent Routing\n\n| Step | Agent | Purpose |\n|------|-------|---------|\n| IDENTIFY | MUST spawn @researcher | Explore affected files, find all callers\u002Fconsumers, map dependencies before planning |\n| PLAN | Always spawn @architect when >5 files affected | Validate refactoring approach and step ordering for large-scope changes |\n| VERIFY | MUST run `\u002Fverify` (5 parallel review lenses) | Review each completed refactoring step for correctness and regressions |\n\n**Rule:** Never explore the codebase inline when @researcher can do it in parallel.\n\n---\n\n## Feeding Back Into the Workflow\n\nAfter the PLAN step, decide how the refactoring re-enters the workflow spine:\n\n- **Execute now (default).** Apply all steps immediately with per-step test verification and an atomic commit per step. Best for small refactorings (1-2 steps).\n- **Defer as a work unit.** When the refactoring is large (3+ steps) and deserves its own planning pass, append a work unit to `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md` describing the area and the planned steps, then pick it up with `\u002Fbrief N`. The brief captures the why + what, `\u002Fplan N` re-derives the steps, and `\u002Fbuild N` executes them with the same per-step verification.\n\nIn Auto Mode, execute now for small refactorings; for large ones, append a work unit and say so inline.\n\n**Appended work-unit note (for `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md`):**\n\n```\n- Refactor: [area] — N steps, structure only, no behavior change.\n  Steps: [short list]. Quality gates must pass before AND after each step.\n```\n\n---\n\n## Output\n\n\u003C!-- Output follows the in-skill output convention: godmode:output-convention — see rules\u002Fgodmode-output.md -->\n\n```\nRefactoring: [what and why]\nSteps completed: N\n  1. [step] — gates pass ✓\n  2. [step] — gates pass ✓\nTests: [before] → [after]\nCoverage: [before] → [after]\n```\n\n---\n\n## Related\n\n- **\u002Ftdd** — for TDD-style development of new features\n- **\u002Fdebug** — if refactoring reveals bugs, switch to debug protocol\n- **\u002Fverify** — runs the 5 parallel review lenses on refactoring changes before committing\n\n**Spine:** plan the steps, then either execute now (`\u002Fship`) or append a work unit to `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md` and resume the spine at `\u002Fbrief N`.\n","# Safe Refactoring\n\nImprove code structure without changing behavior. Every step verified by tests, with quality gates passing before and after each change.\n\n---\n\n## Auto Mode\n\nWhen `## Auto Mode Active` is present in context: do not pause for confirmation. Plan the steps using reasonable defaults, surface the plan and assumptions inline, then execute step by step with per-step quality gates. When the refactor's scope or target is genuinely ambiguous — what to restructure into what — ask, following the shared recommendation convention (`godmode:recommend-convention`) in `rules\u002Fgodmode-recommend.md`: lead with your best-inferred answer to override, not a blank prompt (e.g. \"I'll extract X into Y unless you'd scope the boundary differently\"), then let the user redirect. Treat user course-corrections as normal input.\n\n---\n\n## The Job\n\n1. Verify baseline\n2. Plan steps\n3. Execute one step at a time with test verification\n4. Report results\n\n---\n\n## Process\n\n### 1. BASELINE\n- Run ALL quality gates (from `config\u002Fquality-gates.txt`). They must pass.\n- If not: fix quality issues first (separate commit).\n- Note current test count and coverage.\n\n### 2. IDENTIFY\n- What specifically needs improving and WHY\n- Is this refactoring or a behavior change? (If behavior → wrong skill, use normal workflow)\n- Scope: list exactly which files\u002Ffunctions are affected\n\n### 3. PLAN\n- Break into steps, each independently committable\n- Order: safest\u002Fsimplest first, riskiest last\n- Each step leaves the code in a working state\n\n### 4. EXECUTE (repeat per step)\n```\na. Apply one refactoring\nb. Run quality gates\nc. If GREEN → commit: \"refactor: [what was done]\"\nd. If RED → revert immediately, try smaller step\n```\n\n### 5. VERIFY\n- Run full quality gates\n- Compare test count (same or higher, never lower)\n- Compare coverage (same or higher)\n- Confirm: no behavior changed\n\n---\n\n## Common Refactorings\n\n| Refactoring | When to use |\n|-------------|------------|\n| Extract function | >40 lines, mixed responsibilities |\n| Rename | Name doesn't describe purpose |\n| Inline | Abstraction adds complexity without value |\n| Move | Code in wrong module\u002Ffile |\n| Split file | >300 lines or mixed responsibilities |\n| Simplify conditional | Nested if\u002Felse, complex booleans |\n| Replace magic values | Hardcoded numbers\u002Fstrings |\n| Improve types | `any`, loose types where precise ones exist |\n\n---\n\n## Rules (Non-Negotiable)\n\n- NEVER mix refactoring with feature changes in the same commit\n- Quality gates must pass before AND after EACH step\n- If gates break: REVERT. Don't fix forward during refactoring.\n- Commit after each successful step\n- When `.planning\u002FSTANDARDS.md` is present, the code you restructure must honor it as authoritative project context over the generic defaults where it has spoken (see \"Project Standards Precedence\" in `rules\u002Fgodmode-coding.md`)\n\n---\n\n## Agent Routing\n\n| Step | Agent | Purpose |\n|------|-------|---------|\n| IDENTIFY | MUST spawn @researcher | Explore affected files, find all callers\u002Fconsumers, map dependencies before planning |\n| PLAN | Always spawn @architect when >5 files affected | Validate refactoring approach and step ordering for large-scope changes |\n| VERIFY | MUST run `\u002Fverify` (5 parallel review lenses) | Review each completed refactoring step for correctness and regressions |\n\n**Rule:** Never explore the codebase inline when @researcher can do it in parallel.\n\n---\n\n## Feeding Back Into the Workflow\n\nAfter the PLAN step, decide how the refactoring re-enters the workflow spine:\n\n- **Execute now (default).** Apply all steps immediately with per-step test verification and an atomic commit per step. Best for small refactorings (1-2 steps).\n- **Defer as a work unit.** When the refactoring is large (3+ steps) and deserves its own planning pass, append a work unit to `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md` describing the area and the planned steps, then pick it up with `\u002Fbrief N`. The brief captures the why + what, `\u002Fplan N` re-derives the steps, and `\u002Fbuild N` executes them with the same per-step verification.\n\nIn Auto Mode, execute now for small refactorings; for large ones, append a work unit and say so inline.\n\n**Appended work-unit note (for `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md`):**\n\n```\n- Refactor: [area] — N steps, structure only, no behavior change.\n  Steps: [short list]. Quality gates must pass before AND after each step.\n```\n\n---\n\n## Output\n\n\u003C!-- Output follows the in-skill output convention: godmode:output-convention — see rules\u002Fgodmode-output.md -->\n\n```\nRefactoring: [what and why]\nSteps completed: N\n  1. [step] — gates pass ✓\n  2. [step] — gates pass ✓\nTests: [before] → [after]\nCoverage: [before] → [after]\n```\n\n---\n\n## Related\n\n- **\u002Ftdd** — for TDD-style development of new features\n- **\u002Fdebug** — if refactoring reveals bugs, switch to debug protocol\n- **\u002Fverify** — runs the 5 parallel review lenses on refactoring changes before committing\n\n**Spine:** plan the steps, then either execute now (`\u002Fship`) or append a work unit to `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md` and resume the spine at `\u002Fbrief N`.\n",{"name":5,"description":7,"user-invocable":38},true,"main","717a1f3af996804502df0047840b6c74a1d464c5","skills\u002Frefactor",0,"https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode","https:\u002F\u002Fgithub.com\u002FSyloRei","Nya? Kawai? Desu?","2026-06-08 16:03:07",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":38},[49,52,55],{"tool":50,"command":51},"npx","npx skills add SyloRei\u002Fclaude-godmode --skill refactor",{"tool":53,"command":54},"bunx","bunx skills add SyloRei\u002Fclaude-godmode --skill refactor",{"tool":56,"command":57},"pnpm","pnpm dlx skills add SyloRei\u002Fclaude-godmode --skill refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002FSKILL.md",[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002FREADME.md","SCRIPT","脚本",1170,"https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002Fscripts\u002FREADME.md",[67,75,100,120,138,157],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":33},"01M6HBW3WEVBXANCRWF5YK5BYC","{{name=null}=null}","{{description=null}=null}","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Ftemplates\u002Fskill\u002FSKILL.md",[],[69,74,30],"name",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":33},"01M6HBVZ86GN3TGGFSJ4XM9C5Q","verify","Check a built unit goal-backward: classify every brief acceptance criterion COVERED \u002F PARTIAL \u002F MISSING with concrete evidence, so you know what is truly done. Use when: verify N, check whether unit N is done, confirm the goals for roadmap unit N are met.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[],[77,82,29,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"roadmap","ShellCheck","unit","scripts","classify","done","show","godmode","log","goal","coverage","read","model","Bash","brief","acceptance","git","run",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":33},"01M6HBVTDPNPD88ZWXT4T5M8EA","triage","Respond to a production incident, outage, or regression in the wild: establish the timeline, assess blast radius, and reconstruct what happened with cited evidence. Use this when something is failing in production and you need to understand it before fixing it.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[102,24,28,107,108,109,110,111,112,113,114,115,116,117,118,29,119,30],"understand","it","respond","assess","production incident","incident","evidence","regression","radius","timeline","Production","blast radius","wild",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":33},"01M6HBVNQ1ASFTJTYT47F8M559","tdd","Build new behavior test-first using strict Red-Green-Refactor cycles. Use this when you want to drive a new feature or behavior from failing tests before writing the implementation.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[122,127,128,129,27,130,30,29,131,132,24,133,22,134,5,135,136,137],"green","drive","red","feature","implementation","red-green-refactor","new feature","first","test","writing","build",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":33},"01M6HBVH8GX9JCMS5432JZVTMN","ship","Run every canonical quality gate, push the branch, and open a pull request — release in one command. Use when: ship it, ready to ship, create the PR, push and open a PR.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Fship\u002FSKILL.md",[],[140,145,99,146,147,148,98,85,149,150,89,151,93,152,153,94,95,154,155,156],"release","create","quality gate","pr","canonical","ship it","ready","command","branch","open","push","pull",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":33},"01M6HBVB6SVSMQPXBMWEWQ4J5M","refine","Mid-mission gap analysis: read the active mission's roadmap and briefs, surface what's missing or underspecified, converge on one gap, and append a NEW numbered work unit plus its full brief — strictly additive. Use when: refine, what are we missing, find gaps in the current mission, add the next unit. Never edits an existing brief or roadmap unit in place — that is \u002Fbrief N's job.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefine\u002FSKILL.md",[],[159,164,165,166,167,84,168,169,170,89,82,171,172,173,174,93,175,95,176,96],"active","mission","converge","briefs","add","full","next","never","append","edit","write","work","analysis"]