{"kind":"Skill","metadata":{"namespace":"community","name":"refactor-plan","version":"0.1.0"},"spec":{"description":"Create a concrete plan before starting a multi-file refactor. Use when the user asks to plan, sequence, scope, or safely execute a refactor across multiple files; always investigate first, output the plan, and wait for confirmation before making code changes.","files":{"SKILL.md":"---\nname: refactor-plan\ndescription: 'Create a concrete plan before starting a multi-file refactor. Use when the user asks to plan, sequence, scope, or safely execute a refactor across multiple files; always investigate first, output the plan, and wait for confirmation before making code changes.'\n---\n\n# Refactor Plan\n\nCreate a detailed plan before making any code changes.\n\n## Instructions\n\n1. Do not edit files while preparing the plan.\n2. Search the codebase to understand the current state. Read enough implementation, tests, configuration, and docs to make the plan specific to the repository.\n3. Identify affected files, ownership boundaries, dependencies, and likely hidden coupling.\n4. Plan changes in a safe sequence. Prefer contracts and types first, then implementations, then callers, then tests, then cleanup.\n5. Include verification steps between phases and a final validation command.\n6. Include rollback or recovery steps for the riskiest phases.\n7. Output the complete plan using the format below.\n8. Stop after the plan and ask for confirmation before implementing. If the user already asked you to implement, still produce the plan first and wait for confirmation unless they explicitly said to continue without review after the plan.\n\nIf the request is too ambiguous to plan safely, ask concise clarifying questions instead of editing files.\n\n## Output Format\n\n```markdown\n## Refactor Plan: [title]\n\n### Current State\n[Brief description of how things work now]\n\n### Target State\n[Brief description of how things will work after]\n\n### Affected Files\n| File | Change Type | Dependencies |\n|------|-------------|--------------|\n| path | modify/create/delete | blocks X, blocked by Y |\n\n### Execution Plan\n\n#### Phase 1: Types and Interfaces\n- [ ] Step 1.1: [action] in `file.ts`\n- [ ] Verify: [how to check it worked]\n\n#### Phase 2: Implementation\n- [ ] Step 2.1: [action] in `file.ts`\n- [ ] Verify: [how to check]\n\n#### Phase 3: Tests\n- [ ] Step 3.1: Update tests in `file.test.ts`\n- [ ] Verify: Run `npm test`\n\n#### Phase 4: Cleanup\n- [ ] Remove deprecated code\n- [ ] Update documentation\n\n### Rollback Plan\nIf something fails:\n1. [Step to undo]\n2. [Step to undo]\n\n### Risks\n- [Potential issue and mitigation]\n```\n\nAfter the plan, ask: \"Shall I proceed with Phase 1?\"\n"},"import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/tree/541b7819d8c3545c6df122491af4fa1eae415779/plugins/context-engineering/skills/refactor-plan"}},"content_hash":[128,29,32,3,170,73,141,46,70,7,80,237,98,236,204,136,21,30,184,122,122,233,248,1,190,4,142,218,75,231,120,239],"trust_level":"unsigned","yanked":false}
