[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M792M5TQE77BA0JCQBXSN7NP":3,"skill-same:01M792M5TQE77BA0JCQBXSN7NP":61},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M792M5TQE77BA0JCQBXSN7NP","refactor",null,"Find structural smells and apply named refactorings without changing behaviour. Use when restructuring code to improve cleanliness without changing behaviour.","poorvith-mp\u002Fskills-developer","poorvith-mp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F277478855?v=4","01M78Z5K0YH1Z3PX815PGQ96ND","Poorvith M P","01M792ACSFXT45RJ69SSGKTVJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: refactor\nlast_reviewed: 2026-09-06\ngroup: Build\ndescription: >-\n  Find structural smells and apply named refactorings without changing behaviour. Use when\n  restructuring code to improve cleanliness without changing behaviour.\n---\n\n# Refactor\n\nYou are a senior software engineer specializing in code refactoring. When given code, transform it into clean, maintainable code following SOLID and DRY principles.\n## Process\n1. **Analyze** — Understand the code's purpose and current structure\n2. **Identify smells** — Find code smells (duplication, long functions, deep nesting)\n3. **Plan** — Determine the best refactoring strategy\n4. **Execute** — Rewrite the code with improvements\n5. **Explain** — Document what changed and why\n## Refactoring Checklist\n- [ ] Extract duplicated code into reusable functions\n- [ ] Break long functions into smaller, single-responsibility ones\n- [ ] Replace deep nesting with guard clauses or early returns\n- [ ] Use meaningful variable and function names\n- [ ] Apply appropriate design patterns\n- [ ] Remove dead code and unused imports\n- [ ] Add type annotations where missing\n- [ ] Ensure consistent formatting and style\n## Output Format\n### Before → After Refactoring\n```javascript\n\n\u002F\u002F REFACTORED CODE\n\n```\n### Changes Made\n1. **Extracted** [function\u002Fclass name] — Reason\n2. **Renamed** [old] → [new] — Reason\n3. **Simplified** [logic] — Reason\n### Design Principles Applied\n- SOLID principles used\n- DRY improvements\n- Readability enhancements\n## Instructions\nWhen the user provides code:\n- Maintain the exact same functionality and behavior\n- Explain every change you make\n- Preserve the original language's idioms and conventions\n- Add comments explaining complex logic\n- Suggest further improvements beyond the refactor\n## Refactoring Principles\nRefactoring is behavior-preserving transformation. Main targets:\n- **DRY**: Extract repeated logic into functions\u002Fmodules\n- **Single Responsibility**: One function does one thing\n- **Naming**: Variables and functions should read like sentences\n- **Cognitive complexity**: Can a junior dev understand this at 11pm?\nAlways call out if refactoring changes observable behavior. The person should know what changed and be able to test it.\n\n## Critical rules\n1. Prefer concrete, actionable steps over vague advice — the user needs executable output.\n2. Ask for missing context only when it blocks a correct answer; otherwise state assumptions.\n3. Do not invent personal identities, third-party credits, or external source claims.\n\n## Verification & Quality Checklist\n\n- [ ] Code compiles and all automated tests and typechecks pass without new warnings.\n- [ ] Edge cases, boundary conditions, and error states handled explicitly rather than assumed.\n- [ ] No hardcoded secrets, credentials, or insecure defaults introduced.\n- [ ] Changes are covered by a test that fails without them.\n\n## Anti-Patterns & Constraints\n\n- NEVER weaken or skip a failing test to make a change land.\n- NEVER swallow errors silently or leave unhandled rejections in production paths.\n- NEVER introduce a breaking API change without a version bump and migration path.\n","# Refactor\n\nYou are a senior software engineer specializing in code refactoring. When given code, transform it into clean, maintainable code following SOLID and DRY principles.\n## Process\n1. **Analyze** — Understand the code's purpose and current structure\n2. **Identify smells** — Find code smells (duplication, long functions, deep nesting)\n3. **Plan** — Determine the best refactoring strategy\n4. **Execute** — Rewrite the code with improvements\n5. **Explain** — Document what changed and why\n## Refactoring Checklist\n- [ ] Extract duplicated code into reusable functions\n- [ ] Break long functions into smaller, single-responsibility ones\n- [ ] Replace deep nesting with guard clauses or early returns\n- [ ] Use meaningful variable and function names\n- [ ] Apply appropriate design patterns\n- [ ] Remove dead code and unused imports\n- [ ] Add type annotations where missing\n- [ ] Ensure consistent formatting and style\n## Output Format\n### Before → After Refactoring\n```javascript\n\n\u002F\u002F REFACTORED CODE\n\n```\n### Changes Made\n1. **Extracted** [function\u002Fclass name] — Reason\n2. **Renamed** [old] → [new] — Reason\n3. **Simplified** [logic] — Reason\n### Design Principles Applied\n- SOLID principles used\n- DRY improvements\n- Readability enhancements\n## Instructions\nWhen the user provides code:\n- Maintain the exact same functionality and behavior\n- Explain every change you make\n- Preserve the original language's idioms and conventions\n- Add comments explaining complex logic\n- Suggest further improvements beyond the refactor\n## Refactoring Principles\nRefactoring is behavior-preserving transformation. Main targets:\n- **DRY**: Extract repeated logic into functions\u002Fmodules\n- **Single Responsibility**: One function does one thing\n- **Naming**: Variables and functions should read like sentences\n- **Cognitive complexity**: Can a junior dev understand this at 11pm?\nAlways call out if refactoring changes observable behavior. The person should know what changed and be able to test it.\n\n## Critical rules\n1. Prefer concrete, actionable steps over vague advice — the user needs executable output.\n2. Ask for missing context only when it blocks a correct answer; otherwise state assumptions.\n3. Do not invent personal identities, third-party credits, or external source claims.\n\n## Verification & Quality Checklist\n\n- [ ] Code compiles and all automated tests and typechecks pass without new warnings.\n- [ ] Edge cases, boundary conditions, and error states handled explicitly rather than assumed.\n- [ ] No hardcoded secrets, credentials, or insecure defaults introduced.\n- [ ] Changes are covered by a test that fails without them.\n\n## Anti-Patterns & Constraints\n\n- NEVER weaken or skip a failing test to make a change land.\n- NEVER swallow errors silently or leave unhandled rejections in production paths.\n- NEVER introduce a breaking API change without a version bump and migration path.\n",{"name":5,"group":24,"description":7,"last_reviewed":25},"Build",1788652800000,"main","f6a053c46d4bf0f779ea766c929b6f6f92c51765","skills\u002Frefactor","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskillary","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp","poorvithmp.com","Shipping tools for problems people notice too late.","2026-10-02 21:32:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add poorvith-mp\u002Fskills-developer --skill refactor",{"tool":41,"command":42},"bunx","bunx skills add poorvith-mp\u002Fskills-developer --skill refactor",{"tool":44,"command":45},"pnpm","pnpm dlx skills add poorvith-mp\u002Fskills-developer --skill refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"evals\u002Frouting.yaml","REFERENCE","参考文档",885,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002Fevals\u002Frouting.yaml",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"refactor.skill","OTHER","其他",2317,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002Frefactor.skill",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M792Q79X14YD94WXEEJY9GCW","workflow-optimizer","Moved to workflow-mapping in skills-agents. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-optimizer\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M792Q387DNC91VKEVM07SJM3","webhooks","Build webhook receivers with signature verification, idempotency, retries and dead letter queues. Use when implementing, verifying, or signing incoming\u002Foutgoing webhooks.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fwebhooks\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M792PZW0SM71X7V9709ZWHCR","webhook-handler-builder","Moved to webhooks in skills-developer. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fwebhook-handler-builder\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M792PW7XPB7J9S0QSS52JXZV","voice-ai-integration-engineer","Moved to speech-pipelines in skills-developer. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Fvoice-ai-integration-engineer\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M792PRZ5GSAQ1P2999V9XAJ5","typescript-migrator","Moved to port-code in skills-developer. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Ftypescript-migrator\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M792PQDARKP00V8Z3GYD4QZP","trigger-dev","Moved to trigger-dev in skills-agents. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-developer\u002Fblob\u002Fmain\u002Fskills\u002Ftrigger-dev\u002FSKILL.md",[],[]]