[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AFK4H05EHQ87PNRF7D1KC7":3,"skill-same:01M7AFK4H05EHQ87PNRF7D1KC7":57},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7AFK4H05EHQ87PNRF7D1KC7","trove-typescript",null,"TypeScript type-system discipline for any .ts\u002F.tsx file: make illegal states unrepresentable, validate at boundaries, avoid as\u002Fany. Use when reading or editing TypeScript that isn't covered by a framework-specific skill. Defers to trove-react \u002F trove-react-best-practices on .tsx component work.","bravew\u002Ftrove","bravew","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10855844?v=4","01M7ACJ91JZSQYHT81XPVYR7VA","Yong","01M7AFERNR92HDPGNGP5QA16DM",10,"MIT","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fplugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-typescript\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: trove-typescript\ndescription: \"TypeScript type-system discipline for any .ts\u002F.tsx file: make illegal states unrepresentable, validate at boundaries, avoid as\u002Fany. Use when reading or editing TypeScript that isn't covered by a framework-specific skill. Defers to trove-react \u002F trove-react-best-practices on .tsx component work.\"\npaths:\n  - \"**\u002F*.ts\"\n  - \"**\u002F*.tsx\"\nmetadata:\n  trove-category: code\n  trove-category-label: Code\n---\n\u003C!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->\n\u003C!-- Regenerate: bun run build:skills -->\n\n## Session Init\n\nThis skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.\n\nIf a sibling skill in this plugin matches the request more directly, defer to it. See `AGENTS.md` (or `docs\u002Frouting.md` in the marketplace) for the per-plugin routing index.\n\n# TypeScript Type-System Discipline\n\nThe type checker is a proof assistant. Model the domain so wrong states don't compile. On `.tsx`, defer to `trove-react` \u002F `trove-react-best-practices` for component patterns; this skill owns the plain type discipline underneath them.\n\n## Core rules\n\n| Rule | Do | Not |\n|---|---|---|\n| Illegal states | Discriminated union with a `kind`\u002F`status` tag | `boolean` + optional field pairs |\n| Identity | Branded primitives (`string & { readonly __brand: 'UserId' }`) | bare `string` for ids |\n| External data | `unknown` + parse at the boundary | `any` |\n| Casts | `satisfies` to check shape while keeping literals | `as SomeType` |\n| Exhaustiveness | `const _exhaustive: never = x` in the default branch | unhandled union members |\n| Type guards | Guards that actually narrow and are verified | `x as Foo` inside the guard |\n| Derive | Types derived from a schema (Zod\u002Fvalibot `infer`) | hand-kept parallel types |\n\n## The canonical example\n\n```ts\n\u002F\u002F BAD — admits the meaningless { completed: true, completedAt: undefined }\ntype Task = { completed: boolean; completedAt?: Date };\n\n\u002F\u002F GOOD — the bad state cannot be constructed\ntype Task =\n  | { status: 'open' }\n  | { status: 'done'; completedAt: Date };\n```\n\n## Boundaries\n\nValidate once, at the edge (network, config, user input). Past the boundary, trust your domain types and keep logic pure. \"Parse, don't validate\": a parser returns a more precise type or fails; it doesn't just check and discard what it learned.\n\n```ts\nfunction parseUser(raw: unknown): User {\n  return UserSchema.parse(raw); \u002F\u002F unknown -> User, or throws at the boundary\n}\n```\n\nSee [references\u002Fpatterns.md](references\u002Fpatterns.md) for the full pattern set with worked examples.\n\n## AI Gotchas\n\n- **`as` to silence an error** hides the bug you'll debug next week. Reach for narrowing or `satisfies` first.\n- **`any` on external data** erases the boundary. Use `unknown` and parse.\n- **Non-exhaustive `switch`** over a union compiles today and breaks when a variant is added. Add the `never` guard.\n- **Parallel hand-maintained types** drift. Derive from the schema.\n","\u003C!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->\n\u003C!-- Regenerate: bun run build:skills -->\n\n## Session Init\n\nThis skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.\n\nIf a sibling skill in this plugin matches the request more directly, defer to it. See `AGENTS.md` (or `docs\u002Frouting.md` in the marketplace) for the per-plugin routing index.\n\n# TypeScript Type-System Discipline\n\nThe type checker is a proof assistant. Model the domain so wrong states don't compile. On `.tsx`, defer to `trove-react` \u002F `trove-react-best-practices` for component patterns; this skill owns the plain type discipline underneath them.\n\n## Core rules\n\n| Rule | Do | Not |\n|---|---|---|\n| Illegal states | Discriminated union with a `kind`\u002F`status` tag | `boolean` + optional field pairs |\n| Identity | Branded primitives (`string & { readonly __brand: 'UserId' }`) | bare `string` for ids |\n| External data | `unknown` + parse at the boundary | `any` |\n| Casts | `satisfies` to check shape while keeping literals | `as SomeType` |\n| Exhaustiveness | `const _exhaustive: never = x` in the default branch | unhandled union members |\n| Type guards | Guards that actually narrow and are verified | `x as Foo` inside the guard |\n| Derive | Types derived from a schema (Zod\u002Fvalibot `infer`) | hand-kept parallel types |\n\n## The canonical example\n\n```ts\n\u002F\u002F BAD — admits the meaningless { completed: true, completedAt: undefined }\ntype Task = { completed: boolean; completedAt?: Date };\n\n\u002F\u002F GOOD — the bad state cannot be constructed\ntype Task =\n  | { status: 'open' }\n  | { status: 'done'; completedAt: Date };\n```\n\n## Boundaries\n\nValidate once, at the edge (network, config, user input). Past the boundary, trust your domain types and keep logic pure. \"Parse, don't validate\": a parser returns a more precise type or fails; it doesn't just check and discard what it learned.\n\n```ts\nfunction parseUser(raw: unknown): User {\n  return UserSchema.parse(raw); \u002F\u002F unknown -> User, or throws at the boundary\n}\n```\n\nSee [references\u002Fpatterns.md](references\u002Fpatterns.md) for the full pattern set with worked examples.\n\n## AI Gotchas\n\n- **`as` to silence an error** hides the bug you'll debug next week. Reach for narrowing or `satisfies` first.\n- **`any` on external data** erases the boundary. Use `unknown` and parse.\n- **Non-exhaustive `switch`** over a union compiles today and breaks when a variant is added. Add the `never` guard.\n- **Parallel hand-maintained types** drift. Derive from the schema.\n",{"name":5,"paths":24,"metadata":27,"description":7},[25,26],"**\u002F*.ts","**\u002F*.tsx",{"trove-category":28,"trove-category-label":29},"code","Code","main","f88db1f1cf0e0703dd962051ebc142db961d7799","plugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-typescript",1,"https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove","https:\u002F\u002Fgithub.com\u002Fbravew","2026-11-12 07:56:32",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add bravew\u002Ftrove --skill trove-typescript",{"tool":43,"command":44},"bunx","bunx skills add bravew\u002Ftrove --skill trove-typescript",{"tool":46,"command":47},"pnpm","pnpm dlx skills add bravew\u002Ftrove --skill trove-typescript","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fplugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-typescript\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fpatterns.md","REFERENCE","参考文档",3035,"https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fplugins\u002Ftrove-dev\u002F.agents\u002Fskills\u002Ftrove-typescript\u002Freferences\u002Fpatterns.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7AGJDHTQAS1VK6P7VJAV79G","using-trove","Skill discipline anchor for the Trove marketplace. Loaded once per session; routes the agent to the right trove-* skill before code, planning, review, or git actions.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fusing-trove\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7AGJAS4V4TXE6TV6F839BGZ","trove-write-skill","Skill authoring workflow. Use when creating or updating a Codex or Trove skill, including rubrics, tasks, metadata, and validation.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-write-skill\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7AGJ87K41ZAC8DDBAV17QFW","trove-worktree","Git worktree workflow for spikes, risky experiments, and broad refactors that should not disturb the user's current branch.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-worktree\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7AGJ32V58VYBFYMS9EMHRY4","trove-why","Reconstruct design rationale and decision history from evidence — source control, issue tracker (Linear), docs (Notion), chat (Slack), error tracking (Sentry) — with calibrated confidence. Use for \"why does X work this way\", \"why did we pick Y\", regressions, and postmortems. Use trove-explain for how it works now.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-why\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7AGJ0FHJSRR8MMXC3V8XNHF","trove-verify","Completion verification workflow. Use before claiming done, fixed, complete, ready, or shipped.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-verify\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7AGHWV4B9SDS60RH5W0B0K5","trove-unslop","Cut AI tells from writing — PR descriptions, release notes, specs, commit bodies, and replies. Use before finalizing prose, or when the user asks to clean up, de-slop, or make text sound human.","https:\u002F\u002Fgithub.com\u002Fbravew\u002Ftrove\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftrove-unslop\u002FSKILL.md",[],[]]