[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77XQT12TZHEHA9ESN0ZCB53":3,"skill-same:01M77XQT12TZHEHA9ESN0ZCB53":47},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77XQT12TZHEHA9ESN0ZCB53","code-organisation",null,"Decide where code lives and what each module hides — the directory tree, module and package boundaries, a module's entry point, and when to split or merge a file. Use when starting a project or directory tree, placing a new file, class or function, grouping code into modules or packages, splitting or merging a module or file, naming directories or files, or auditing a codebase's structure.","synmux\u002Fclaude-commit","synmux","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F66192?v=4","01M77XNT1GDNA1H74K0RYJ4FBM","syn","01M77XNT2BD5GEXVJ5HP24GTG8",1,"MIT","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcode-organisation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: code-organisation\ndescription: Decide where code lives and what each module hides — the directory tree, module and package boundaries, a module's entry point, and when to split or merge a file. Use when starting a project or directory tree, placing a new file, class or function, grouping code into modules or packages, splitting or merging a module or file, naming directories or files, or auditing a codebase's structure.\n---\n\n# Code organisation\n\n## The rule\n\n**Information hiding** (Parnas, 1972): every module owns one **secret**, a design decision\nlikely to change, and hides it behind an interface smaller than the secret.\n\nA **module** is anything with an interface and an implementation, at any size: an app\nslice such as a Nuxt layer or a workspace package, a directory, a file, a class, a\nfunction. The rule is the same at every size; only the zoom changes. Its payoff is\n**locality**: a change, a bug, a test, and the context an agent must load all stay inside\none module.\n\nTo shape one module's interface (depth, seams, adapters), use `\u002Fcodebase-design`.\n\n## The four checks\n\nRun them on every module you create, move or audit. A module is done when it passes all\nfour.\n\n1. **One secret.** Finish \"this changes when ___\" in domain words, without naming a\n   technology. Two answers mean two modules. One answer spread across several modules\n   means they are one module.\n2. **Deep.** The interface is smaller than what it hides. Deletion test: delete the\n   module; if its complexity vanishes instead of reappearing in its callers, it was a\n   pass-through, so inline it.\n3. **Encapsulated.** Callers and tests reach the secret only through the interface. They\n   import the module's entry point, not a file behind it. Interfaces carry domain types,\n   so ORM rows, SDK objects and HTTP responses stay inside. No caller needs to know the\n   order of internal steps. A test that must reach past the interface means the seam is\n   in the wrong place.\n4. **Directed.** Dependencies between modules form an acyclic graph and point toward the\n   more stable module. Coupling is balanced: the closer two modules sit, the more they may\n   know of each other. Files in one module may share internals; separate slices share\n   only narrow interfaces.\n\n## Zoom levels\n\n### App: slices\n\n- Slice the app by business capability, one **bounded context** per slice: `auth`,\n  `billing`, `email`. Each slice owns its UI, logic, data access and tests. A Nuxt layer,\n  a workspace package and a top-level directory are the same move at different tooling\n  cost.\n- A slice publishes one entry point (layer exports, `index.ts`, a package `exports` map)\n  and other slices use only that. A slice owns its tables; other slices ask through its\n  interface.\n- Inside a slice, keep decisions pure and push I\u002FO to the edge: **functional core,\n  imperative shell**. The core is tested without mocks. I\u002FO sits behind **ports and\n  adapters** only where two adapters exist; production plus a test double counts.\n- One word can mean different things in two slices (`Account` in auth and in billing).\n  Give each slice its own model and translate at the interface.\n- A **shared kernel** holds only concepts every slice agrees on and that rarely change,\n  such as money and ids. Keep it tiny.\n\n### Directory: modules\n\n- Group by feature first, by technical role only inside a feature: the tree should\n  scream the domain, not the framework. A slice with its own `components\u002F` and\n  `composables\u002F`, as a Nuxt layer has, is this rule; one top-level `components\u002F` holding\n  every feature's components breaks it.\n- A directory module's entry file is its interface. Every other file in it is private.\n- Split by knowledge, not by execution order. `fetch.ts`, `parse.ts` and `save.ts` that\n  all know the file format are one secret in three files (**temporal decomposition**).\n- When two slices grow similar code, duplicate until a third use shows the real concept\n  (**rule of three**). A wrong shared abstraction couples slices; duplication costs only\n  typing.\n\n### File, class, function\n\n- Split a file when it holds two secrets; merge files that share one. Size is a reason to\n  look, not to split: a long file with one secret behind a small interface is a deep\n  module.\n- A class exports the least it can. A getter and setter per field publishes its\n  representation; give callers the behaviour they need instead (**tell, don't ask**).\n- A function's parameters are its interface. A boolean flag that switches behaviour means\n  two functions. A parameter that only passes through to a callee leaks the callee's\n  secret upward.\n- Layout inside a file (newspaper order, stepdown) belongs to `\u002Fclean-code`.\n\n## Naming\n\nName a module for its secret, in the domain's language: `billing\u002F`, `invoice-pdf\u002F`. A\nname that needs \"and\" marks two secrets.\n\n## Placing new code\n\n1. **Name its secret.** Finish \"this changes when ___\". Done when the answer names a\n   domain concept, not a technology.\n2. **Find the module that owns that secret.** Check siblings at the slice, directory and\n   file zoom, not only the file you are in. Done when you have a home, or have shown none\n   exists.\n3. **Place it, or create a sibling module** named for the secret, with its entry point.\n   Done when its neighbours change on the same trigger as it.\n4. **Run the four checks** on every module you touched. Done when all four pass.\n\n## Enforcing boundaries\n\nA boundary held only by discipline erodes. When a boundary matters, propose a **fitness\nfunction** that fails CI on a violation: an import-boundary lint rule\n(`eslint-plugin-boundaries`, `dependency-cruiser`, `import\u002Fno-cycle`), TypeScript project\nreferences, or a package `exports` map.\n\n## Smells\n\nEach smell is a failed check. Name the secret at stake before moving anything.\n\n| Smell                                                         | Failed check | Fix                                                             |\n| ------------------------------------------------------------- | ------------ | --------------------------------------------------------------- |\n| **Divergent change**: one module edited for unrelated reasons | One secret   | Split by reason                                                 |\n| **Shotgun surgery**: one change edits many modules            | One secret   | Gather into one module                                          |\n| Layer-first top level: `controllers\u002F`, `services\u002F`, `models\u002F` | One secret   | Repackage by feature                                            |\n| Generic bucket: `utils\u002F`, `common\u002F`, `helpers\u002F`, `manager`    | One secret   | Move each item to the module it serves                          |\n| **Feature envy**: code mostly uses another module's data      | One secret   | Move it to that module                                          |\n| **Temporal decomposition**                                    | One secret   | Merge by shared knowledge                                       |\n| One model shared by slices that mean different things by it   | One secret   | A model per slice, translated at the interface                  |\n| Pass-through module or wrapper                                | Deep         | Inline it                                                       |\n| **Classitis**: many tiny modules, each with a wide interface  | Deep         | Merge into one deep module                                      |\n| Deep import: `billing\u002Finternal\u002Fstripe`                        | Encapsulated | Import the entry point; widen it if it lacks something          |\n| Infrastructure type in an interface                           | Encapsulated | Map to a domain type at the seam                                |\n| Domain code importing the framework, database or UI           | Directed     | The domain defines a port; infrastructure adapts to it          |\n| Import cycle                                                  | Directed     | Move the shared concept into one module or the kernel, or merge |\n","# Code organisation\n\n## The rule\n\n**Information hiding** (Parnas, 1972): every module owns one **secret**, a design decision\nlikely to change, and hides it behind an interface smaller than the secret.\n\nA **module** is anything with an interface and an implementation, at any size: an app\nslice such as a Nuxt layer or a workspace package, a directory, a file, a class, a\nfunction. The rule is the same at every size; only the zoom changes. Its payoff is\n**locality**: a change, a bug, a test, and the context an agent must load all stay inside\none module.\n\nTo shape one module's interface (depth, seams, adapters), use `\u002Fcodebase-design`.\n\n## The four checks\n\nRun them on every module you create, move or audit. A module is done when it passes all\nfour.\n\n1. **One secret.** Finish \"this changes when ___\" in domain words, without naming a\n   technology. Two answers mean two modules. One answer spread across several modules\n   means they are one module.\n2. **Deep.** The interface is smaller than what it hides. Deletion test: delete the\n   module; if its complexity vanishes instead of reappearing in its callers, it was a\n   pass-through, so inline it.\n3. **Encapsulated.** Callers and tests reach the secret only through the interface. They\n   import the module's entry point, not a file behind it. Interfaces carry domain types,\n   so ORM rows, SDK objects and HTTP responses stay inside. No caller needs to know the\n   order of internal steps. A test that must reach past the interface means the seam is\n   in the wrong place.\n4. **Directed.** Dependencies between modules form an acyclic graph and point toward the\n   more stable module. Coupling is balanced: the closer two modules sit, the more they may\n   know of each other. Files in one module may share internals; separate slices share\n   only narrow interfaces.\n\n## Zoom levels\n\n### App: slices\n\n- Slice the app by business capability, one **bounded context** per slice: `auth`,\n  `billing`, `email`. Each slice owns its UI, logic, data access and tests. A Nuxt layer,\n  a workspace package and a top-level directory are the same move at different tooling\n  cost.\n- A slice publishes one entry point (layer exports, `index.ts`, a package `exports` map)\n  and other slices use only that. A slice owns its tables; other slices ask through its\n  interface.\n- Inside a slice, keep decisions pure and push I\u002FO to the edge: **functional core,\n  imperative shell**. The core is tested without mocks. I\u002FO sits behind **ports and\n  adapters** only where two adapters exist; production plus a test double counts.\n- One word can mean different things in two slices (`Account` in auth and in billing).\n  Give each slice its own model and translate at the interface.\n- A **shared kernel** holds only concepts every slice agrees on and that rarely change,\n  such as money and ids. Keep it tiny.\n\n### Directory: modules\n\n- Group by feature first, by technical role only inside a feature: the tree should\n  scream the domain, not the framework. A slice with its own `components\u002F` and\n  `composables\u002F`, as a Nuxt layer has, is this rule; one top-level `components\u002F` holding\n  every feature's components breaks it.\n- A directory module's entry file is its interface. Every other file in it is private.\n- Split by knowledge, not by execution order. `fetch.ts`, `parse.ts` and `save.ts` that\n  all know the file format are one secret in three files (**temporal decomposition**).\n- When two slices grow similar code, duplicate until a third use shows the real concept\n  (**rule of three**). A wrong shared abstraction couples slices; duplication costs only\n  typing.\n\n### File, class, function\n\n- Split a file when it holds two secrets; merge files that share one. Size is a reason to\n  look, not to split: a long file with one secret behind a small interface is a deep\n  module.\n- A class exports the least it can. A getter and setter per field publishes its\n  representation; give callers the behaviour they need instead (**tell, don't ask**).\n- A function's parameters are its interface. A boolean flag that switches behaviour means\n  two functions. A parameter that only passes through to a callee leaks the callee's\n  secret upward.\n- Layout inside a file (newspaper order, stepdown) belongs to `\u002Fclean-code`.\n\n## Naming\n\nName a module for its secret, in the domain's language: `billing\u002F`, `invoice-pdf\u002F`. A\nname that needs \"and\" marks two secrets.\n\n## Placing new code\n\n1. **Name its secret.** Finish \"this changes when ___\". Done when the answer names a\n   domain concept, not a technology.\n2. **Find the module that owns that secret.** Check siblings at the slice, directory and\n   file zoom, not only the file you are in. Done when you have a home, or have shown none\n   exists.\n3. **Place it, or create a sibling module** named for the secret, with its entry point.\n   Done when its neighbours change on the same trigger as it.\n4. **Run the four checks** on every module you touched. Done when all four pass.\n\n## Enforcing boundaries\n\nA boundary held only by discipline erodes. When a boundary matters, propose a **fitness\nfunction** that fails CI on a violation: an import-boundary lint rule\n(`eslint-plugin-boundaries`, `dependency-cruiser`, `import\u002Fno-cycle`), TypeScript project\nreferences, or a package `exports` map.\n\n## Smells\n\nEach smell is a failed check. Name the secret at stake before moving anything.\n\n| Smell                                                         | Failed check | Fix                                                             |\n| ------------------------------------------------------------- | ------------ | --------------------------------------------------------------- |\n| **Divergent change**: one module edited for unrelated reasons | One secret   | Split by reason                                                 |\n| **Shotgun surgery**: one change edits many modules            | One secret   | Gather into one module                                          |\n| Layer-first top level: `controllers\u002F`, `services\u002F`, `models\u002F` | One secret   | Repackage by feature                                            |\n| Generic bucket: `utils\u002F`, `common\u002F`, `helpers\u002F`, `manager`    | One secret   | Move each item to the module it serves                          |\n| **Feature envy**: code mostly uses another module's data      | One secret   | Move it to that module                                          |\n| **Temporal decomposition**                                    | One secret   | Merge by shared knowledge                                       |\n| One model shared by slices that mean different things by it   | One secret   | A model per slice, translated at the interface                  |\n| Pass-through module or wrapper                                | Deep         | Inline it                                                       |\n| **Classitis**: many tiny modules, each with a wide interface  | Deep         | Merge into one deep module                                      |\n| Deep import: `billing\u002Finternal\u002Fstripe`                        | Encapsulated | Import the entry point; widen it if it lacks something          |\n| Infrastructure type in an interface                           | Encapsulated | Map to a domain type at the seam                                |\n| Domain code importing the framework, database or UI           | Directed     | The domain defines a port; infrastructure adapts to it          |\n| Import cycle                                                  | Directed     | Move the shared concept into one module or the kernel, or merge |\n",{"name":5,"description":7},"main","23304ae178bfb875579dfdaa2dc851ac66d9a5e9",".claude\u002Fskills\u002Fcode-organisation",0,"https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit","https:\u002F\u002Fsyn.horse","https:\u002F\u002Fgithub.com\u002Fsynmux","Want code from one of my retired repositories? See the README in daveio\u002Fboneyard for instructions.","2026-11-12 20:07:00",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add synmux\u002Fclaude-commit --skill code-organisation",{"tool":39,"command":40},"bunx","bunx skills add synmux\u002Fclaude-commit --skill code-organisation",{"tool":42,"command":43},"pnpm","pnpm dlx skills add synmux\u002Fclaude-commit --skill code-organisation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcode-organisation\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M77XWGBE1WRTHTF82HND0Z8F","writing-for-humans","How to write a short document a person has to read and act on - a ticket, a pull request body, a commit message, a handover note. Covers the title, a shape people skim, evidence that survives a refactor, and stripping the AI phrasing out. Call it before drafting any of those.","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.skills\u002Fwriting-for-humans\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M77XWEMJVMH16P0Y7Y4YJ293","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.skills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"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},"01M77XWAWFFNCMRH2CM36N5FBF","node-cli","Patterns and conventions for building Node.js CLI tools — src structure, entry point setup, Commander wiring, and update notifications. Use when creating or modifying a Node.js CLI, adding Commander commands, wiring update-notifier, or asking how to structure a CLI entry point or src directory.","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.skills\u002Fnode-cli\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},"01M77XW4VB02TTKC7WF4KN1P0B","humanizer","Removes traces of AI-generated text. Suitable for editing or reviewing text to make it sound more natural and human-written. Based on the comprehensive Wikipedia guide on \"AI writing characteristics.\" Detects and fixes patterns such as: exaggerated symbolism, promotional language, superficial analysis ending in \"-ing,\" vague attribution, overuse of dashes, the rule of three, AI-typical vocabulary, negative parallelism, and excessive transitional phrases.","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.skills\u002Fhumanizer\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},"01M77XW2AZEFV3VQ08H10Q0B8J","create-ticket","Draft one small, plain ticket as a markdown file, then file it on the project's tracker once the user approves.","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.skills\u002Fcreate-ticket\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},"01M77XVZBJZGKMC1YZKVB5WGCQ","create-pr","Open one pull request as a draft, with a body the reviewer can act on.","https:\u002F\u002Fgithub.com\u002Fsynmux\u002Fclaude-commit\u002Fblob\u002Fmain\u002F.skills\u002Fcreate-pr\u002FSKILL.md",[],[]]