[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M756J0TSH17W8TCW2W92GV3W":3,"skill-same:01M756J0TSH17W8TCW2W92GV3W":55},{"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":35,"commitSha":36,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M756J0TSH17W8TCW2W92GV3W","code-structure-cleanup",null,"Use after an AI-built feature works but the code has duplicated mechanics, repeated API calls, or messy structure. Guides a cleanup pass that extracts reusable service-layer modules without changing behavior.","manjunathva2018\u002Furban-invention","manjunathva2018","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F45636107?v=4","01M756HSVDBRCHFYAQN91F9X1F","Manjunath V A","01M756HSWJ3H44YDZ0J5YCXZ7W",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmanjunathva2018\u002Furban-invention\u002Fblob\u002Fmaster\u002Fcode-structure-cleanup\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: code-structure-cleanup\ndescription: Use after an AI-built feature works but the code has duplicated mechanics, repeated API calls, or messy structure. Guides a cleanup pass that extracts reusable service-layer modules without changing behavior.\nversion: 1.0.0\nauthor: David Ondrej \u002F Michael Shimeles interview notes\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [agentic-engineering, refactor, service-layer, code-quality]\n    related_skills: [agentic-engineering-workflow]\n---\n\n# Code Structure Cleanup After Every Feature\n\n## Overview\n\nAI agents often take the easiest path: they create new functions instead of reusing existing ones. A feature can work while still leaving behind duplicated logic, inconsistent validation, repeated API calls, and code that future agents struggle to understand.\n\nRun this cleanup pass after a feature works, not before.\n\n## When to Use\n\n- A feature works locally but the code feels duplicated or messy.\n- The agent created similar helper functions in multiple files.\n- You want future agents to pick up the codebase without confusion.\n- You need a smaller, cleaner PR before review.\n\nDo not use this as permission to redesign the whole app.\n\n## What \"Service Layer\" Means\n\nA service layer is a place for reusable mechanics:\n\n- sending an email,\n- streaming an AI response,\n- creating a sandbox,\n- validating a webhook,\n- calling an external API,\n- transforming a payload,\n- parsing or normalizing data.\n\nThe UI\u002Froute\u002Faction decides **what** should happen. The service handles **how** it happens.\n\n## Cleanup Prompt\n\n```md\nThe feature is working. Now do a code-structure cleanup pass.\n\nGoal:\n- Find duplicated runtime mechanics, repeated API calls, repeated parsing, repeated validation, or repeated business logic.\n- Move repeated mechanics into reusable service-layer functions\u002Fmodules.\n- Keep domain policy in the calling route\u002Faction\u002Fcomponent.\n- Do not change user-facing behavior.\n- Keep the diff small.\n\nProcess:\n1. Inspect the files touched by the feature.\n2. Identify repeated logic and name the duplication clearly.\n3. Propose the smallest service-layer extraction.\n4. Implement it.\n5. Run the relevant tests\u002Ftypechecks.\n6. Summarize exactly what got simpler.\n```\n\n## Good Outcome\n\nInstead of 4 files each having their own slightly different `sendEmail()` logic, there is one tested email service that all 4 files call.\n\n## Common Pitfalls\n\n1. **Refactoring the whole app.** Keep the scope tied to the feature.\n2. **Renaming everything.** Naming churn makes PRs hard to review.\n3. **Mixing cleanup with a new feature.** Cleanup is a separate pass.\n4. **Only formatting code.** Pretty code can still contain duplicated logic.\n5. **Moving domain policy into services.** Services should handle mechanics, not business decisions.\n\n## Verification Checklist\n\n- [ ] User-facing behavior stayed the same.\n- [ ] Repeated mechanics were actually reduced.\n- [ ] Calling files became simpler.\n- [ ] Relevant tests\u002Ftypechecks ran.\n- [ ] Diff stayed focused on the feature area.\n","# Code Structure Cleanup After Every Feature\n\n## Overview\n\nAI agents often take the easiest path: they create new functions instead of reusing existing ones. A feature can work while still leaving behind duplicated logic, inconsistent validation, repeated API calls, and code that future agents struggle to understand.\n\nRun this cleanup pass after a feature works, not before.\n\n## When to Use\n\n- A feature works locally but the code feels duplicated or messy.\n- The agent created similar helper functions in multiple files.\n- You want future agents to pick up the codebase without confusion.\n- You need a smaller, cleaner PR before review.\n\nDo not use this as permission to redesign the whole app.\n\n## What \"Service Layer\" Means\n\nA service layer is a place for reusable mechanics:\n\n- sending an email,\n- streaming an AI response,\n- creating a sandbox,\n- validating a webhook,\n- calling an external API,\n- transforming a payload,\n- parsing or normalizing data.\n\nThe UI\u002Froute\u002Faction decides **what** should happen. The service handles **how** it happens.\n\n## Cleanup Prompt\n\n```md\nThe feature is working. Now do a code-structure cleanup pass.\n\nGoal:\n- Find duplicated runtime mechanics, repeated API calls, repeated parsing, repeated validation, or repeated business logic.\n- Move repeated mechanics into reusable service-layer functions\u002Fmodules.\n- Keep domain policy in the calling route\u002Faction\u002Fcomponent.\n- Do not change user-facing behavior.\n- Keep the diff small.\n\nProcess:\n1. Inspect the files touched by the feature.\n2. Identify repeated logic and name the duplication clearly.\n3. Propose the smallest service-layer extraction.\n4. Implement it.\n5. Run the relevant tests\u002Ftypechecks.\n6. Summarize exactly what got simpler.\n```\n\n## Good Outcome\n\nInstead of 4 files each having their own slightly different `sendEmail()` logic, there is one tested email service that all 4 files call.\n\n## Common Pitfalls\n\n1. **Refactoring the whole app.** Keep the scope tied to the feature.\n2. **Renaming everything.** Naming churn makes PRs hard to review.\n3. **Mixing cleanup with a new feature.** Cleanup is a separate pass.\n4. **Only formatting code.** Pretty code can still contain duplicated logic.\n5. **Moving domain policy into services.** Services should handle mechanics, not business decisions.\n\n## Verification Checklist\n\n- [ ] User-facing behavior stayed the same.\n- [ ] Repeated mechanics were actually reduced.\n- [ ] Calling files became simpler.\n- [ ] Relevant tests\u002Ftypechecks ran.\n- [ ] Diff stayed focused on the feature area.\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"description":7},"David Ondrej \u002F Michael Shimeles interview notes","1.0.0",{"hermes":27},{"tags":28,"related_skills":33},[29,30,31,32],"agentic-engineering","refactor","service-layer","code-quality",[34],"agentic-engineering-workflow","master","b58a14ed6bf2a34fdac557c4efe1607746c73f34","https:\u002F\u002Fgithub.com\u002Fmanjunathva2018\u002Furban-invention","https:\u002F\u002Fgithub.com\u002Fmanjunathva2018","I am a MEAN stack developer having 8+ years of experience in IT. ","2026-06-01 13:10:34",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add manjunathva2018\u002Furban-invention --skill code-structure-cleanup",{"tool":47,"command":48},"bunx","bunx skills add manjunathva2018\u002Furban-invention --skill code-structure-cleanup",{"tool":50,"command":51},"pnpm","pnpm dlx skills add manjunathva2018\u002Furban-invention --skill code-structure-cleanup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanjunathva2018\u002Furban-invention\u002Fblob\u002Fmaster\u002Fcode-structure-cleanup\u002FSKILL.md",true,[],[56,63,70],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M756JBCCE7H6P0AAF0EANZ6Q","source-code-context","Use when an AI coding agent is guessing API names or framework behavior from incomplete docs. Shows how to provide local source-code references so the agent searches the real implementation before coding.","https:\u002F\u002Fgithub.com\u002Fmanjunathva2018\u002Furban-invention\u002Fblob\u002Fmaster\u002Fsource-code-context\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M756J7JBT8S8T1JTVGT2DA6T","grep-loop-review-workflow","Use when you have a small PR or feature and want an agent to repeatedly fix review feedback until tests pass and the PR is merge-ready. Works with AI reviewers, Greptile-style review, or human feedback.","https:\u002F\u002Fgithub.com\u002Fmanjunathva2018\u002Furban-invention\u002Fblob\u002Fmaster\u002Fgrep-loop-review-work\u002FSKILL.md",[],[],{"skillNo":71,"name":34,"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},"01M756HWZG1HTSYVEVXKMBRCWV","Use when building software with AI agents and you need a serious end-to-end workflow instead of vibe coding. Covers harness choice, context discipline, cleanup, review loops, launch pressure, and security basics.","https:\u002F\u002Fgithub.com\u002Fmanjunathva2018\u002Furban-invention\u002Fblob\u002Fmaster\u002Fagentic-engineering-workflow\u002FSKILL.md",[],[]]