typescript-dev
Skill7 starsChanged 4 months agoApache-2.0View on GitHub
Use when the TypeScript language or compiler layer is the work in any TypeScript or JSDoc-checked JavaScript project on any runtime — type design (unknown/any, narrowing, discriminated unions, generics, satisfies), tsconfig and strict migration, module resolution and ESM/CJS types, declaration files and library type publishing, project references, type-check and typed-lint gates, type tests, compiler upgrades, typing untrusted input. Triggers include "TypeScript 类型怎么写", "tsconfig 怎么配", "moduleResolution 选哪个", "库的类型声明怎么发", "开 strict 迁移". Compose with the runtime owner (nodejs-service-dev, web-react-dev, app-cross-platform-dev, miniapp-product-dev); failures → defect-diagnosis; test layers → testing-strategy; architecture → software-architecture.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- tenequm/skillstheir own version, first seen Nov 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- tenequm/skills★ 39same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- eval/AGENTS.mdAGENTS.md
- hooks/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/code-review/scripts/AGENTS.mdAGENTS.md
- skills/multi-perspective-research/scripts/AGENTS.mdAGENTS.md
- skills/product-rd-workflow/scripts/AGENTS.mdAGENTS.md
- skills/skill-extraction-workflow/scripts/AGENTS.mdAGENTS.md
- skills/test-artifact-management/references/AGENTS.mdAGENTS.md
- skills/testing-strategy/scripts/AGENTS.mdAGENTS.md
- skills/tighten-doc/scripts/AGENTS.mdAGENTS.md
- skills/worktree-isolation/scripts/AGENTS.mdAGENTS.md
- agents-file-coverage-gateSkill
- app-cross-platform-devSkill
- code-reviewSkill
- defect-diagnosisSkill
- feature-risk-routerSkill
- go-microservice-devSkill
- grill-meSkill
- llm-inference-integrationSkill
- miniapp-product-devSkill
- multi-agent-delegationSkill
- multi-perspective-researchSkill
- nodejs-service-devSkill
- platform-observabilitySkill
- platform-release-engineeringSkill
- platform-service-connectivitySkill
- product-rd-workflowSkill
- product-ui-ux-designSkill
- python-service-devSkill
- release-coordinationSkill
- release-doc-writerSkill
- requirement-baselineSkill
- requirement-doc-writerSkill
- requirement-intentSkill
- requirement-scopeSkill
- skill-extraction-workflowSkill
- software-architectureSkill
- terminal-cli-devSkill
- test-artifact-managementSkill
- testing-strategySkill
- tighten-docSkill
- web-react-devSkill
- worktree-isolationSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Read the nearest AGENTS.md, then package.json (typescript version, type, exports, scripts), every tsconfig*.json in the extends and …
- Very specific: line 39
Read modules-and-publishing.md when the change touches module resolution, ESM/CJS output, path aliases, exports, declaration files, a …
- Distinctive: line 46
Keep declaration output stable: annotate exported function return types and public object shapes so a dependency upgrade or an inference …
- Very specific: line 55
Do not weaken strict, add skipLibCheck to hide a first-party error, or widen include/exclude to make an error disappear.
- Distinctive: line 58
Do not adopt a new compiler major, a native compiler, or a deprecated-option removal by editing versions alone.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript Development
- Code/test changes require self-checks; invoke
code-reviewautomatically before completion.
Skill Routing
- This skill owns the TypeScript language and compiler layer on every runtime: type design,
tsconfig, module resolution as the compiler models it, declaration output, type-check and typed-lint gates, type tests, compiler upgrades, and the typed boundary for untrusted input. Plain JavaScript checked through JSDoc andcheckJsis in scope. - Load it together with the runtime or framework owner, never instead of one.
nodejs-service-devowns Node.js execution (type stripping, loaders,package.json#type, event loop, lifecycle);web-react-devowns React components and browser behavior;app-cross-platform-devowns React Native and native apps;miniapp-product-devowns mini-program frameworks and hosts. Bun, Deno, edge, and browser runtimes keep their runtime-specific APIs and permission models outside this skill; confirm them in that runtime's own documentation. testing-strategychooses test layers, whether type tests gate CI, and coverage policy. This skill owns the mechanics: the type-check command, type-test files and assertions, and typed-lint configuration.test-artifact-managementowns testcase traceability; its TypeScript helper must still pass the project's type-check gate.- An active failure — a type-check that broke, a module that fails to resolve at run time, a declaration a consumer cannot load — enters
defect-diagnosis; the verified repair returns here. - Architecture, service boundaries, shared-package ownership, and contract source of truth go to
software-architecture; new capabilities and multi-stage migrations enterproduct-rd-workflow; release gates and registry publication go toplatform-release-engineering; the user-facing command contract of a CLI goes toterminal-cli-dev.
Generalization Discipline
- Implement the repository in front of you. Do not carry product nouns, package names, path aliases, or a prior project's
tsconfiginto a reusable rule. - A rule that depends only on the TypeScript compiler or type system lands here. A rule that depends on one runtime or framework stays in that owner and points here for the type layer. When a sibling skill states a language-layer rule, replace the copy with a pointer rather than keeping two versions.
Workflow
1. Recover the compiler contract
Read the nearest AGENTS.md, then package.json (typescript version, type, exports, scripts), every tsconfig*.json in the extends and references chains, lint configuration, and the build or bundler that emits JavaScript. Record:
- the installed TypeScript major and whether any tool still needs the compiler API;
- which tool type-checks, which emits JavaScript and which emits declarations — often three different tools;
- the module system per environment and the
module/moduleResolutionpair that models it; - the type-check command CI runs, and whether it covers every
tsconfigin the repository.
Preserve those choices unless a migration is explicit. Read compiler-config-and-checking.md before changing a compiler option, a version, or a gate.
2. Model the environment, then the types
- Choose
module/moduleResolutionfrom where the emitted code runs, not from what makes the editor quiet:nodenextfor code Node.js loads directly and for published libraries,bundler(withmodule: esnextorpreserve) when a bundler resolves every import. Onetsconfigmodels one environment; split it when server, browser, worker, and test code see different globals or module rules. - Read modules-and-publishing.md when the change touches module resolution, ESM/CJS output, path aliases,
exports, declaration files, a published package, or monorepo project references. - Static types do not exist at run time. Every value that crosses a trust or process boundary — network, storage, environment, files,
postMessage, third-party callbacks,JSON.parse,catchvariables — enters asunknownand is parsed once at that boundary into a precise type. Read type-design-and-boundaries.md when designing types, removinganyor assertions, or typing external input.
3. Implement with the compiler as a checker
- Make illegal states unrepresentable: discriminated unions with exhaustive handling, branded identifiers where swapping two ids would cross a permission or cache boundary,
satisfiesto check a value without widening it. - Fix the type, not the report. A cast, a non-null
!,any,// @ts-ignore, or a loosened flag needs a stated reason and the narrowest scope. Prefer// @ts-expect-error <reason>, which fails once the error disappears. - Keep declaration output stable: annotate exported function return types and public object shapes so a dependency upgrade or an inference change cannot silently change a published type.
4. Verify narrow to broad
Run, with repository commands: the type-check for the touched project (tsc --noEmit or tsc -b with references) → typed lint → type tests, when the repository has them → runtime tests → build → for a published package, a check of the packed artifact. A bundler, transpiler, or type-stripping runtime that ran successfully proves only that the syntax was erasable or transformable; it is never type-check evidence.
Hard Rules
- A real type-check gate runs in CI and covers every
tsconfigthat owns source, tests, and scripts. Executing TypeScript (type stripping,tsx,ts-node --transpileOnly, esbuild, SWC, Babel, a bundler) is not type checking. - Do not weaken
strict, addskipLibCheckto hide a first-party error, or wideninclude/excludeto make an error disappear. Turning a check off is a recorded decision with an owner and a removal condition. - Untrusted data is
unknownuntil a runtime parse proves its shape.as SomeTypeon external input is a defect, not a type. - A published package's types are a public contract: verify them from the packed tarball for every entry point and module format it promises.
- Do not adopt a new compiler major, a native compiler, or a deprecated-option removal by editing versions alone; check every tool that imports the compiler API before switching.
Output Contract
Report the TypeScript version and toolchain split (check / emit / declarations), compiler options changed and why, type-level behavior preserved or changed, exact commands run with results, skipped checks, and residual risk.
Technical claims and their sources are recorded in source-map.md; ordinary work loads only the reference whose decision surface it reaches.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

