[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KM3NZCZ86VJ91RSVTRGTJW":3,"skill-same:01M6KM3NZCZ86VJ91RSVTRGTJW":129},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6KM3NZCZ86VJ91RSVTRGTJW","typescript-style",null,"Opinionated style guide for strict, portable TypeScript. Use when writing, designing, or reviewing TypeScript: type design, boundary validation, error handling, module architecture, and review discipline.","nseng-ai\u002Fns","nseng-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273792438?v=4","01M6KKN105A07WPV2TZKZXZGQF","nseng.ai","01M6KKN14MDSR9VF9739AWXG8M",2,"MIT","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"typescript style","typescript","style","use","for","style guide","case-study","error","module","study","error-handling","design","README","Rules","system","error handling","core","architecture","review","writing","2026-11-10 10:12:30",false,"---\nname: typescript-style\ndescription: \"Opinionated style guide for strict, portable TypeScript. Use when writing, designing, or reviewing TypeScript: type design, boundary validation, error handling, module architecture, and review discipline.\"\nreferences:\n  - core-rules\n  - idioms\n  - checklist\n  - references\u002FREADME\n  - references\u002Fphilosophy\n  - references\u002Ftype-system\n  - references\u002Ferror-handling\n  - references\u002Fcase-study-backend-neutrality\n  - references\u002Fcase-study-context-management\n  - references\u002Fcase-study-extension-system\n  - references\u002Fcase-study-tui\n  - references\u002Freview-taste-and-process\n---\n\n# typescript-style\n\nAn opinionated TypeScript style guide for strict, maintainable projects. It sets portable code-level\nand compiler-level defaults. Project-specific choices such as package managers, formatters, CI\nwiring, test runners, and import suffixes belong in the local repository or a project overlay skill.\n\nKeep Zod as the default runtime validation library for new external boundaries unless the project has\nalready chosen otherwise.\n\n## Scope\n\nUse this as a reference for:\n\n- strict type design with Zod boundary schemas, string-literal unions, discriminated unions, generics,\n  and `satisfies`;\n- choosing `interface` vs. `type`, `throw` vs. returned errors, and core vs. plugin\u002Fadapter boundaries;\n- designing backend-neutral abstractions, stateful runtimes, extension\u002Fplugin APIs, and terminal UIs;\n- reviewing TypeScript for needless machinery, incoherent types, hidden globals, and unowned complexity.\n\n## Core knowledge\n\nRead **`core-rules.md`** first. It contains the default rules and when to bend them for project-local\nconstraints.\n\nFor copy-paste idioms while coding, read **`idioms.md`**. Before finishing implementation or review,\nrun **`checklist.md`**.\n\n## One-paragraph version\n\nWrite strict, erasable TypeScript: no `enum`, no `namespace`, and no parameter properties in new code.\nClosed sets are **string-literal unions**; runtime variants are **discriminated unions** using `type` by\ndefault, with domain\u002Fexternal tags only when they better express the model. Use `unknown` at boundaries\nand avoid `any` except isolated, commented library-forced seams. Validate external boundaries with Zod\nschemas and derive types with `z.infer`. Encode expected failure as returned data at async\u002Fsystem\nboundaries (`Result\u003CT,E>`, terminal error events); throw only for programmer errors and broken\ninvariants. Top-level module logic uses `function` declarations; callbacks and expression-position\nfactories can use arrows. Prefer guard clauses and nullish operators for nullish semantics. Keep a\nsmall, clearly ordered set of required core data and dependencies as direct inputs; use named options\nobjects for behavioral configuration and long input lists. Respect ownership-boundary immutability: do\nnot mutate inputs, returned values, or shared\u002Fpublic state in place. Keep the core minimal: optional behavior lives behind\nplugins, adapters, or capability flags. Functions do logic; classes coordinate state. Inline one-use\nhelpers. Suppressions and empty catches explain why. Be direct in reviews and comments; explain why, not\nmechanics.\n\n## Conditional loading\n\nTop-level files (`core-rules.md`, `idioms.md`, `checklist.md`) are optimized for everyday work. The\n`references\u002F` folder holds deeper rationale and worked examples. Load only the relevant reference.\n\n| Situation                                                                          | Read                                          |\n| ---------------------------------------------------------------------------------- | --------------------------------------------- |\n| Need the rationale behind a rule, or to justify a review comment                   | `references\u002Fphilosophy.md`                    |\n| Designing types: unions, generics, `satisfies`, declaration merging, why no enums  | `references\u002Ftype-system.md`                   |\n| Designing failure handling: errors-as-values, `Result`, typed errors, cancellation | `references\u002Ferror-handling.md`                |\n| Building a backend\u002Fprovider abstraction or anything multi-backend                  | `references\u002Fcase-study-backend-neutrality.md` |\n| Building a stateful workflow, context manager, compaction, or scheduling loop      | `references\u002Fcase-study-context-management.md` |\n| Building an extension\u002Fplugin system, tool registry, or SDK surface                 | `references\u002Fcase-study-extension-system.md`   |\n| Building a TUI, renderer, component model, or keybinding system                    | `references\u002Fcase-study-tui.md`                |\n| Reviewing a PR or writing terse implementation feedback                            | `references\u002Freview-taste-and-process.md`      |\n\n`references\u002FREADME.md` is the index of the reference folder.\n\n## How to apply this skill\n\n1. Load `core-rules.md` before changing code.\n2. If the project has an established convention that conflicts with this guide, follow the project and\n   mention the deviation only if it matters.\n3. When a domain matches, load the matching reference before designing the abstraction.\n4. When making a judgment call, prefer the smallest coherent design that keeps types honest end to end.\n5. Run `checklist.md` before declaring the work done.\n","# typescript-style\n\nAn opinionated TypeScript style guide for strict, maintainable projects. It sets portable code-level\nand compiler-level defaults. Project-specific choices such as package managers, formatters, CI\nwiring, test runners, and import suffixes belong in the local repository or a project overlay skill.\n\nKeep Zod as the default runtime validation library for new external boundaries unless the project has\nalready chosen otherwise.\n\n## Scope\n\nUse this as a reference for:\n\n- strict type design with Zod boundary schemas, string-literal unions, discriminated unions, generics,\n  and `satisfies`;\n- choosing `interface` vs. `type`, `throw` vs. returned errors, and core vs. plugin\u002Fadapter boundaries;\n- designing backend-neutral abstractions, stateful runtimes, extension\u002Fplugin APIs, and terminal UIs;\n- reviewing TypeScript for needless machinery, incoherent types, hidden globals, and unowned complexity.\n\n## Core knowledge\n\nRead **`core-rules.md`** first. It contains the default rules and when to bend them for project-local\nconstraints.\n\nFor copy-paste idioms while coding, read **`idioms.md`**. Before finishing implementation or review,\nrun **`checklist.md`**.\n\n## One-paragraph version\n\nWrite strict, erasable TypeScript: no `enum`, no `namespace`, and no parameter properties in new code.\nClosed sets are **string-literal unions**; runtime variants are **discriminated unions** using `type` by\ndefault, with domain\u002Fexternal tags only when they better express the model. Use `unknown` at boundaries\nand avoid `any` except isolated, commented library-forced seams. Validate external boundaries with Zod\nschemas and derive types with `z.infer`. Encode expected failure as returned data at async\u002Fsystem\nboundaries (`Result\u003CT,E>`, terminal error events); throw only for programmer errors and broken\ninvariants. Top-level module logic uses `function` declarations; callbacks and expression-position\nfactories can use arrows. Prefer guard clauses and nullish operators for nullish semantics. Keep a\nsmall, clearly ordered set of required core data and dependencies as direct inputs; use named options\nobjects for behavioral configuration and long input lists. Respect ownership-boundary immutability: do\nnot mutate inputs, returned values, or shared\u002Fpublic state in place. Keep the core minimal: optional behavior lives behind\nplugins, adapters, or capability flags. Functions do logic; classes coordinate state. Inline one-use\nhelpers. Suppressions and empty catches explain why. Be direct in reviews and comments; explain why, not\nmechanics.\n\n## Conditional loading\n\nTop-level files (`core-rules.md`, `idioms.md`, `checklist.md`) are optimized for everyday work. The\n`references\u002F` folder holds deeper rationale and worked examples. Load only the relevant reference.\n\n| Situation                                                                          | Read                                          |\n| ---------------------------------------------------------------------------------- | --------------------------------------------- |\n| Need the rationale behind a rule, or to justify a review comment                   | `references\u002Fphilosophy.md`                    |\n| Designing types: unions, generics, `satisfies`, declaration merging, why no enums  | `references\u002Ftype-system.md`                   |\n| Designing failure handling: errors-as-values, `Result`, typed errors, cancellation | `references\u002Ferror-handling.md`                |\n| Building a backend\u002Fprovider abstraction or anything multi-backend                  | `references\u002Fcase-study-backend-neutrality.md` |\n| Building a stateful workflow, context manager, compaction, or scheduling loop      | `references\u002Fcase-study-context-management.md` |\n| Building an extension\u002Fplugin system, tool registry, or SDK surface                 | `references\u002Fcase-study-extension-system.md`   |\n| Building a TUI, renderer, component model, or keybinding system                    | `references\u002Fcase-study-tui.md`                |\n| Reviewing a PR or writing terse implementation feedback                            | `references\u002Freview-taste-and-process.md`      |\n\n`references\u002FREADME.md` is the index of the reference folder.\n\n## How to apply this skill\n\n1. Load `core-rules.md` before changing code.\n2. If the project has an established convention that conflicts with this guide, follow the project and\n   mention the deviation only if it matters.\n3. When a domain matches, load the matching reference before designing the abstraction.\n4. When making a judgment call, prefer the smallest coherent design that keeps types honest end to end.\n5. Run `checklist.md` before declaring the work done.\n",{"name":5,"references":44,"description":7},[45,46,47,48,49,50,51,52,53,54,55,56],"core-rules","idioms","checklist","references\u002FREADME","references\u002Fphilosophy","references\u002Ftype-system","references\u002Ferror-handling","references\u002Fcase-study-backend-neutrality","references\u002Fcase-study-context-management","references\u002Fcase-study-extension-system","references\u002Fcase-study-tui","references\u002Freview-taste-and-process","master","44a56f0d543f274b42239091b35fe4d23855f6b3","skills\u002Finternal\u002Ftypescript\u002Ftypescript-style",0,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns","https:\u002F\u002Fgithub.com\u002Fnseng-ai","Keeping the clankers in check: Nonslop Engineering for AI","2026-10-02 12:48:53",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add nseng-ai\u002Fns --skill typescript-style",{"tool":71,"command":72},"bunx","bunx skills add nseng-ai\u002Fns --skill typescript-style",{"tool":74,"command":75},"pnpm","pnpm dlx skills add nseng-ai\u002Fns --skill typescript-style","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002FSKILL.md",true,[79,85,89,93,97,101,105,109,113,117,121,125],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"checklist.md","REFERENCE","参考文档",7846,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Fchecklist.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"core-rules.md",22987,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Fcore-rules.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"idioms.md",9395,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Fidioms.md",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fcase-study-backend-neutrality.md",4417,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Fcase-study-backend-neutrality.md",{"path":98,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fcase-study-context-management.md",4082,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Fcase-study-context-management.md",{"path":102,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fcase-study-extension-system.md",3979,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Fcase-study-extension-system.md",{"path":106,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fcase-study-tui.md",4226,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Fcase-study-tui.md",{"path":110,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Ferror-handling.md",7823,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Ferror-handling.md",{"path":114,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":115,"sourceHtmlUrl":116},"references\u002Fphilosophy.md",5583,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Fphilosophy.md",{"path":118,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":119,"sourceHtmlUrl":120},"references\u002FREADME.md",1857,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002FREADME.md",{"path":122,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":123,"sourceHtmlUrl":124},"references\u002Freview-taste-and-process.md",6294,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Freview-taste-and-process.md",{"path":126,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":127,"sourceHtmlUrl":128},"references\u002Ftype-system.md",6602,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002Freferences\u002Ftype-system.md",[130,152,172,195,206,229],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":39},"01M6KM3VZ7JC4S6R4KATJ368EH","pr-make-accountable","Interview a PR author to establish shared understanding of intent and design decisions, then co-author the What \u002F Why \u002F Changes PR body with opt-in Requested reviewer focus.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Fpublic\u002Fprs\u002Fpr-make-accountable\u002FSKILL.md",[],[137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,30],"pr","pr make accountable","make","interview","pr body","changes","true","with","co","shared","focus","intent","decisions","reviewer","why",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":39},"01M6KM3HNY4WY42KMYRPS6KEJZ","typescript-fake-driven-testing","TypeScript fake-driven testing architecture. Use when writing or reviewing TS code with external dependencies, gateway interfaces, real adapters, in-memory fakes, or CLI scenario tests.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-fake-driven-testing\u002FSKILL.md",[],[20,159,160,161,162,163,36,164,165,22,166,167,38,168,169,144,170,171],"driven","fake driven testing","typescript fake driven testing","testing","code","gateway","memory","dependencies","cli","tests","in-memory","Adapters","scenario",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":39},"01M6KM3AXC2539PENYVZJYKCP9","ns-typescript","TypeScript overlay for ns-style projects. Use when editing or reviewing TS in this repo: tsconfig baseline, pnpm\u002FVitest\u002Foxlint\u002Foxfmt\u002Fnative tsc commands, relative .ts imports, workspace subpath exports, and the exactOptionalPropertyTypes spread idiom. Repo-specific enforcement (test lanes, time seams, style guard) lives in the host repo's AGENTS.md.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Fns-typescript\u002FSKILL.md",[],[20,179,23,180,181,182,183,184,185,21,186,187,188,22,189,190,191,192,193,194],"ns typescript","imports","alternatives","time","projects","import","oxlint","host","references","enforcement","repo","editing","native","vitest","guard","test",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":201,"publishedAt":39},"01M6KM36Y5KZ5V48M58MT42AHM","ns-typescript-style-tripwire","Invoke the ns TypeScript style Tripwire against a supplied diff or current branch.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Fns-typescript-style-tripwire\u002FSKILL.md",[],[21,202,203,20,143,204,205],"ns typescript style tripwire","tripwire","diff","branch",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":210,"categories":211,"keywords":212,"publishedAt":39},"01M6KM313HANS0AV181X37ZM45","skill-management","Manage skills with `npx skills`: add, edit, remove, rename, update, or list skills (local or GitHub), and the nested `skills\u002F\u003Cdisposition>\u002F...\u002F\u003Cname>\u002F` \u002F flat `.agents\u002Fskills\u002F` layout conventions.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Fskill-system\u002Fskill-management\u002FSKILL.md",[],[213,214,215,216,217,218,219,220,144,221,222,68,223,224,204,225,226,227,228,143],"skill management","management","manage","readlink","mv","mkdir","ls","ln","cat","local","rg","nested","remove","Bash","github","lock",{"skillNo":230,"name":231,"nameZh":6,"description":232,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":233,"categories":234,"keywords":235,"publishedAt":39},"01M6KM2XHJFVATD95A6QSWPM51","review-thermonuclear-review","Invoke the Thermonuclear Review review against a supplied diff or current branch.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Freview-system\u002Freview-thermonuclear-review\u002FSKILL.md",[],[236,237,37,143,204,205],"thermonuclear","review thermonuclear review"]