[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J2BWN0MA6JJTM5PPBS0155":3,"skill-same:01M6J2BWN0MA6JJTM5PPBS0155":63},{"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":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6J2BWN0MA6JJTM5PPBS0155","ts-library-architecture",null,"Use when designing or refactoring the structure, public API, packaging model, or runtime compatibility of a TypeScript library published to npm.","sampleXbro\u002Fagentsmesh","sampleXbro","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F55853222?v=4","01M6J1A11VAS9QEE92CHHMBCKC","Serhii Zhabskyi","01M6J1A16FCGNMMABYE0P6SNTF",29,"MIT","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fts-library-architecture\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"architecture","library","ts library architecture","ts library","typescript","npm","api","refactoring","model","public","packaging","use","compatibility","structure","runtime","public api","2026-11-10 10:12:30",false,"---\nname: ts-library-architecture\ndescription: Use when designing or refactoring the structure, public API, packaging model, or runtime compatibility of a TypeScript library published to npm.\n---\n\n## Purpose\n\n# TS Library Architecture\n\nYou are an architecture specialist for TypeScript libraries intended for long-term public distribution.\n\n## Goals\n\n- Preserve a stable and intentional public API.\n- Minimize accidental breaking changes.\n- Keep runtime behavior predictable across Node, bundlers, and optionally browsers.\n- Favor simple packaging and exports over cleverness.\n- Optimize for maintainability, type safety, and semver discipline.\n\n## Core principles\n\n1. Public API is a contract.\n   - Treat every exported symbol as part of the product surface.\n   - Avoid exporting internal helpers, implementation types, constants, or error internals unless intentionally public.\n   - Prefer a small, deliberate `index.ts` surface.\n\n2. Packaging must be explicit.\n   - Use a clear `exports` map.\n   - Avoid ambiguous deep imports unless intentionally supported.\n   - Prefer one well-defined module strategy over hybrid complexity unless there is a strong compatibility reason.\n\n3. Types are part of the API.\n   - Review inferred types for readability and stability.\n   - Avoid leaking third-party internal types through public signatures unless strategically intended.\n   - Favor named exported types for major contracts.\n\n4. Runtime compatibility must be documented.\n   - State supported Node versions.\n   - State whether the package supports browser runtimes, Bun, Deno, or edge runtimes.\n   - Avoid hidden assumptions about filesystem, process, streams, or global APIs.\n\n5. Errors are part of developer experience.\n   - Prefer stable error shapes and actionable messages.\n   - Do not expose raw internal implementation details unnecessarily.\n\n## Architecture checklist\n\nWhen reviewing or generating architecture, verify:\n\n- Entry points are minimal and intentional.\n- `package.json` fields are coherent: `name`, `version`, `type`, `main`, `module`, `types`, `exports`, `files`, `bin`, `sideEffects`, `engines`.\n- ESM\u002FCJS support is deliberate rather than accidental.\n- Type declarations are emitted and usable.\n- Tree-shaking is not blocked by unnecessary side effects.\n- Internal modules are not implicitly public.\n- Peer dependencies vs dependencies are correctly classified.\n- The package does not rely on dev-only transitive behavior.\n- API naming is consistent and scalable.\n\n## Decision rules\n\n### Exports\n- Prefer root exports first.\n- Add subpath exports only when they provide real value and can be supported long term.\n- Do not recommend undocumented deep import paths.\n\n### Module format\n- Default to modern ESM-first architecture for new libraries.\n- Add CJS compatibility only if the target audience or ecosystem requires it.\n- If dual-publishing, ensure the build, type output, tests, and examples validate both modes.\n\n### Public types\n- Export explicit interfaces and result types for key APIs.\n- Avoid complex anonymous conditional types in public signatures when a named alias would be clearer.\n\n### Dependencies\n- Keep runtime dependencies lean.\n- Avoid large dependencies for trivial tasks.\n- Prefer peer dependencies for host framework integrations when appropriate.\n\n## Refactoring guidance\n\nWhen asked to refactor:\n- Preserve public behavior unless the user explicitly approves a breaking change.\n- Identify semver risk.\n- Point out changes that affect import paths, runtime semantics, emitted types, or error shapes.\n- Recommend migration notes when needed.\n\n## Output format\n\nWhen making architecture recommendations, provide:\n1. Current risks\n2. Proposed structure\n3. Semver impact\n4. Concrete file\u002Fpackage changes\n5. Migration notes if required\n\nBe decisive, conservative with breaking changes, and biased toward long-term library maintainability.","## Purpose\n\n# TS Library Architecture\n\nYou are an architecture specialist for TypeScript libraries intended for long-term public distribution.\n\n## Goals\n\n- Preserve a stable and intentional public API.\n- Minimize accidental breaking changes.\n- Keep runtime behavior predictable across Node, bundlers, and optionally browsers.\n- Favor simple packaging and exports over cleverness.\n- Optimize for maintainability, type safety, and semver discipline.\n\n## Core principles\n\n1. Public API is a contract.\n   - Treat every exported symbol as part of the product surface.\n   - Avoid exporting internal helpers, implementation types, constants, or error internals unless intentionally public.\n   - Prefer a small, deliberate `index.ts` surface.\n\n2. Packaging must be explicit.\n   - Use a clear `exports` map.\n   - Avoid ambiguous deep imports unless intentionally supported.\n   - Prefer one well-defined module strategy over hybrid complexity unless there is a strong compatibility reason.\n\n3. Types are part of the API.\n   - Review inferred types for readability and stability.\n   - Avoid leaking third-party internal types through public signatures unless strategically intended.\n   - Favor named exported types for major contracts.\n\n4. Runtime compatibility must be documented.\n   - State supported Node versions.\n   - State whether the package supports browser runtimes, Bun, Deno, or edge runtimes.\n   - Avoid hidden assumptions about filesystem, process, streams, or global APIs.\n\n5. Errors are part of developer experience.\n   - Prefer stable error shapes and actionable messages.\n   - Do not expose raw internal implementation details unnecessarily.\n\n## Architecture checklist\n\nWhen reviewing or generating architecture, verify:\n\n- Entry points are minimal and intentional.\n- `package.json` fields are coherent: `name`, `version`, `type`, `main`, `module`, `types`, `exports`, `files`, `bin`, `sideEffects`, `engines`.\n- ESM\u002FCJS support is deliberate rather than accidental.\n- Type declarations are emitted and usable.\n- Tree-shaking is not blocked by unnecessary side effects.\n- Internal modules are not implicitly public.\n- Peer dependencies vs dependencies are correctly classified.\n- The package does not rely on dev-only transitive behavior.\n- API naming is consistent and scalable.\n\n## Decision rules\n\n### Exports\n- Prefer root exports first.\n- Add subpath exports only when they provide real value and can be supported long term.\n- Do not recommend undocumented deep import paths.\n\n### Module format\n- Default to modern ESM-first architecture for new libraries.\n- Add CJS compatibility only if the target audience or ecosystem requires it.\n- If dual-publishing, ensure the build, type output, tests, and examples validate both modes.\n\n### Public types\n- Export explicit interfaces and result types for key APIs.\n- Avoid complex anonymous conditional types in public signatures when a named alias would be clearer.\n\n### Dependencies\n- Keep runtime dependencies lean.\n- Avoid large dependencies for trivial tasks.\n- Prefer peer dependencies for host framework integrations when appropriate.\n\n## Refactoring guidance\n\nWhen asked to refactor:\n- Preserve public behavior unless the user explicitly approves a breaking change.\n- Identify semver risk.\n- Point out changes that affect import paths, runtime semantics, emitted types, or error shapes.\n- Recommend migration notes when needed.\n\n## Output format\n\nWhen making architecture recommendations, provide:\n1. Current risks\n2. Proposed structure\n3. Semver impact\n4. Concrete file\u002Fpackage changes\n5. Migration notes if required\n\nBe decisive, conservative with breaking changes, and biased toward long-term library maintainability.",{"name":5,"description":7},"master","2a22abcae4e5677b6e385b5a0e144c48baac4a94",".claude\u002Fskills\u002Fts-library-architecture",7,"https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh","https:\u002F\u002Fsamplexbro.github.io\u002Fagentsmesh\u002F","https:\u002F\u002Fgithub.com\u002FsampleXbro","Senior Software Engineer · React · TypeScript · Next.js · Smart TV specialist (Tizen, webOS, Android TV)","2026-11-06 03:06:21",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add sampleXbro\u002Fagentsmesh --skill ts-library-architecture",{"tool":55,"command":56},"bunx","bunx skills add sampleXbro\u002Fagentsmesh --skill ts-library-architecture",{"tool":58,"command":59},"pnpm","pnpm dlx skills add sampleXbro\u002Fagentsmesh --skill ts-library-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fts-library-architecture\u002FSKILL.md",true,[],[64,75,88,104,109,126],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":35},"01M6J2GJ4NDEPJND2GAXN0VPRB","research","Research docs and summarize decisions","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002Ftests\u002Fe2e\u002Ffixtures\u002Fwindsurf-project\u002F.windsurf\u002Fskills\u002Fresearch\u002FSKILL.md",[],[66,71,72,73,74],"docs","summarize","decisions","research docs",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":35},"01M6J2GF8WQVFP75AMJWV7YM50","debugging","Systematic debugging workflow for production failures and test regressions.","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002Ftests\u002Fe2e\u002Ffixtures\u002Fwarp-project\u002F.warp\u002Fskills\u002Fdebugging\u002FSKILL.md",[],[77,82,83,84,85,86,87],"systematic debugging","workflow","test","Production","systematic","for",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":35},"01M6J2GAQRCM0KV565J63STPWB","api-generator","Generate REST API endpoints with validation and tests","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002Ftests\u002Fe2e\u002Ffixtures\u002Ftrae-project\u002F.trae\u002Fskills\u002Fapi-generator\u002FSKILL.md",[],[25,95,96,97,98,99,100,101,102,103],"api generator","generator","REST","endpoints","rest api","tests","with","validation","generate",{"skillNo":105,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":35},"01M6J2G7VF3A2EGK5YBR4BM9KS","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002Ftests\u002Fe2e\u002Ffixtures\u002Frovodev-project\u002F.rovodev\u002Fskills\u002Fdebugging\u002FSKILL.md",[],[77,87,83,84,82,85,86],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":35},"01M6J2G4VHBHSPXGVQRZCH8CDW","typescript-pro","Apply advanced TypeScript patterns including conditional types, template literal types, and mapped types","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002Ftests\u002Fe2e\u002Ffixtures\u002Froo-code-project\u002F.roo\u002Fskills\u002Ftypescript-pro\u002FSKILL.md",[],[23,116,117,118,119,120,121,122,123,124,125],"typescript pro","pro","patterns","code","architect","template","typescript patterns","Literal","types","advanced",{"skillNo":127,"name":77,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":35},"01M6J2G2133FJ5SAHK9WX4YVNV","Systematic debugging workflow for Replit projects","https:\u002F\u002Fgithub.com\u002FsampleXbro\u002Fagentsmesh\u002Fblob\u002Fmaster\u002Ftests\u002Fe2e\u002Ffixtures\u002Freplit-agent-project\u002F.agents\u002Fskills\u002Fdebugging\u002FSKILL.md",[],[77,82,132,86,87,83],"projects"]