[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CY0BYJP3CYWN376GJDMDYT":3,"skill-same:01M7CY0BYJP3CYWN376GJDMDYT":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":6,"updatedAt":35,"install":36,"resources":48},"01M7CY0BYJP3CYWN376GJDMDYT","typescript-best-practices",null,"TypeScript best practices. Use when reading or editing any .ts or .tsx file.","BotHarness\u002FDeepSeekBot","BotHarness","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F330270786?v=4","01M7CX37EXWM53FHAQ28JNKZTZ","01M7CX37FHA8NY5D2KXFZWV63Y",852,"MIT","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: typescript-best-practices\ndescription: TypeScript best practices. Use when reading or editing any .ts or .tsx file.\npaths: [\"**\u002F*.ts\", \"**\u002F*.tsx\"]\ndisable-model-invocation: true\n---\n\n# TypeScript best practices\n\nApply the **type-system-discipline** principle skill first.\n\n| Rule | Summary |\n|------|---------|\n| Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |\n| Branded types | Brand primitives with `& { readonly __brand: \"X\" }` so they can't be mixed up. Validate once at the boundary. A brand comes from a verifying type guard (`input is AgentId`), never from `as`. |\n| Constructive modeling | Build the shape so the illegal value can't be constructed. `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |\n| Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to `NonEmpty\u003CT>` only where the loose type forces `!`, a cast, or a \"should never happen\" throw. |\n| `unknown` over `any` | External data is `unknown`. |\n| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as `z.infer`. |\n| No `as` casts | Every `as` is a runtime crash waiting. Cast only after validation. |\n| Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`\u002F`instanceof` > user-defined type guard > `as`. |\n| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |\n| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |\n| `satisfies` over `as` | Validates the value without widening literal types. |\n| Boundary validation | Parse where data crosses in, into a named domain type. `Record\u003Cstring, unknown>` (however spelled) stops at that parse. Trust types inside. See the **boundary-discipline** principle skill. |\n| Schema-derived types | Reach for `Pick`\u002F`Omit`\u002F`Parameters`\u002F`ReturnType`\u002F`Awaited`\u002F`typeof` before declaring a new interface. |\n| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |\n| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak\u002Fdisposable checks, and verify UI in a running build. Mock only what you can't run locally. |\n| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |\n\nExamples: `references\u002Fpatterns.md`.\n","# TypeScript best practices\n\nApply the **type-system-discipline** principle skill first.\n\n| Rule | Summary |\n|------|---------|\n| Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |\n| Branded types | Brand primitives with `& { readonly __brand: \"X\" }` so they can't be mixed up. Validate once at the boundary. A brand comes from a verifying type guard (`input is AgentId`), never from `as`. |\n| Constructive modeling | Build the shape so the illegal value can't be constructed. `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |\n| Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to `NonEmpty\u003CT>` only where the loose type forces `!`, a cast, or a \"should never happen\" throw. |\n| `unknown` over `any` | External data is `unknown`. |\n| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as `z.infer`. |\n| No `as` casts | Every `as` is a runtime crash waiting. Cast only after validation. |\n| Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`\u002F`instanceof` > user-defined type guard > `as`. |\n| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |\n| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |\n| `satisfies` over `as` | Validates the value without widening literal types. |\n| Boundary validation | Parse where data crosses in, into a named domain type. `Record\u003Cstring, unknown>` (however spelled) stops at that parse. Trust types inside. See the **boundary-discipline** principle skill. |\n| Schema-derived types | Reach for `Pick`\u002F`Omit`\u002F`Parameters`\u002F`ReturnType`\u002F`Awaited`\u002F`typeof` before declaring a new interface. |\n| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |\n| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak\u002Fdisposable checks, and verify UI in a running build. Mock only what you can't run locally. |\n| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |\n\nExamples: `references\u002Fpatterns.md`.\n",{"name":5,"paths":23,"description":7,"disable-model-invocation":26},[24,25],"**\u002F*.ts","**\u002F*.tsx",true,"main","d922e716d0801fbdf6c27f023b245c8da7e4c804",".agents\u002Fskills\u002Ftypescript-best-practices",63,"https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot","https:\u002F\u002Ftobs.app","https:\u002F\u002Fgithub.com\u002FBotHarness","https:\u002F\u002Fdeepseekbot.app\u002F","2026-11-15 06:17:31",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":26},[38,41,44],{"tool":39,"command":40},"npx","npx skills add BotHarness\u002FDeepSeekBot --skill typescript-best-practices",{"tool":42,"command":43},"bunx","bunx skills add BotHarness\u002FDeepSeekBot --skill typescript-best-practices",{"tool":45,"command":46},"pnpm","pnpm dlx skills add BotHarness\u002FDeepSeekBot --skill typescript-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[49],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fpatterns.md","REFERENCE","参考文档",9287,"https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypescript-best-practices\u002Freferences\u002Fpatterns.md",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7CY5WHFGASZATK5CQF05G0A","slide-authoring","Technical reference for writing or editing open-slide pages — file contract, 1920×1080 canvas, type scale, layout, palette\u002Fvisual direction, assets, speaker notes, stepped reveals, page transitions, and morph transitions. Consult this whenever you are about to write or modify any file under `slides\u002F\u003Cid>\u002F`, including from inside the `create-slide` or `apply-comments` workflows, or for any ad-hoc slide edit. Triggers on phrases like \"edit slide\", \"tweak this page\", \"fix the layout\", \"change the palette\", \"reveal one by one\", \"add a transition\", \"morph transition\", \"write the speaker notes\", \"generate the script \u002F talk track\", \"investigate the slide framework\", \"how do slides work here\".","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002Fapps\u002Fpresentations\u002F.agents\u002Fskills\u002Fslide-authoring\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7CY5NMS099ZRH9ECYS47ZKG","current-slide","Resolve which slide, page, and (optionally) selected element the user is currently viewing in the open-slide dev server. Consult this whenever the user references \"this page\", \"this slide\", \"this element\", \"the slide I'm on\", \"the current page\", or any deictic reference to slide content without naming it. Re-read `node_modules\u002F.open-slide\u002Fcurrent.json` at the start of every such turn — the user navigates between turns, so a value you read earlier in the conversation is almost certainly stale.","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002Fapps\u002Fpresentations\u002F.agents\u002Fskills\u002Fcurrent-slide\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7CY5G6XHNY7Y8KVGGKF654E","create-theme","Use this skill when the user wants to create, draft, author, or extract a slide theme in this open-slide repo. Triggers on phrases like \"create a theme\", \"make a theme called X\", \"extract a theme from \u003Cslide>\", \"build a theme from these images\". Produces two paired files under `themes\u002F` — `\u003Cid>.md` (palette, typography, layout, fixed Title\u002FFooter components, motion) and `\u003Cid>.demo.tsx` (a runnable demo slide that the dev-UI Themes panel previews). Do NOT use for editing real slides — only for authoring the theme bundle.","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002Fapps\u002Fpresentations\u002F.agents\u002Fskills\u002Fcreate-theme\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7CY5B0DZNEVRY95X3QEKW3C","create-slide","Use this skill when the user wants to create, draft, author, or generate new slides \u002F a presentation in this open-slide repo. Triggers on phrases like \"make slides about X\", \"make a deck about X\", \"create a presentation\", \"draft slides for\", \"new slide\", \"a deck with speaker notes \u002F a script\", or when the user asks to add content under `slides\u002F`. Do NOT use for editing the framework itself — only for authoring content inside `slides\u002F\u003Cid>\u002F`.","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002Fapps\u002Fpresentations\u002F.agents\u002Fskills\u002Fcreate-slide\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7CY57ED279GA6QC3BFMPXG5","apply-comments","Apply pending @slide-comment markers written by the open-slide inspector tool. Use when the user asks to \"apply comments\", \"process slide comments\", \"apply the inspector comments\", or references markers left inside `slides\u002F\u003Cid>\u002Findex.tsx`.","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002Fapps\u002Fpresentations\u002F.agents\u002Fskills\u002Fapply-comments\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M7CY53ZCYB0P3GYM2V3MEN1N","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","https:\u002F\u002Fgithub.com\u002FBotHarness\u002FDeepSeekBot\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[],[]]