typescript-development
Skill0 starsChanged 8 months agoMITView on GitHub
Create, modify, refactor, or review TypeScript snippets, scripts, libraries, browser applications, Node.js services, and CLIs. Use for modular class-first design, strict boundary-safe typing, linting, testing, and portable package/runtime configuration.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- govuk-one-login/agent-skillstheir own version, first seen Nov 8, 2026
- salasebas/skillstheir own version, first seen Nov 8, 2026
- hiromaily/go-crypto-wallettheir own version, first seen Oct 9, 2026
- sammcj/agentic-codingtheir own version, first seen Oct 8, 2026
- CODE-SAURABH/OpenSkillstheir own version, first seen Jul 25, 2026
- carloss765/agent-skillstheir own version, first seen Jan 15, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- sammcj/agentic-coding★ 169same name
- hiromaily/go-crypto-wallet★ 128same name
- govuk-one-login/agent-skills★ 3same name
- CODE-SAURABH/OpenSkills★ 2same name
- carloss765/agent-skills★ 1same name
- salasebas/skills★ 1same 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 repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-generationSkill
- bash-scriptingSkill
- browser-controlSkill
- github-actionsSkill
- gitignore-standardsSkill
- git-operationsSkill
- html-reportSkill
- java-developmentSkill
- mermaid-diagramsSkill
- meta-workspaceSkill
- powershell-scriptingSkill
- project-backlogSkill
- project-documentationSkill
- project-setupSkill
- python-developmentSkill
- refinement-tribunalSkill
- skill-cli-developmentSkill
- technical-writingSkill
- testing-standardsSkill
- web-auth-bridgeSkill
- worktree-isolationSkill
- writing-ai-instructionsSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 26
Keep imports free of startup, network, and filesystem side effects.
- Very specific: line 34
Avoid any, unsafe assertions, and non-null assertions.
- Very specific: line 35
Prefer string unions or as const objects over new enums.
- Very specific: line 41
Keep lint, format checking, type checking, tests, and build independently runnable.
- Very specific: line 42
Default builds: Vite for bundled browser applications.
- Distinctive: line 44
Use local tools and cross-platform scripts.
- Distinctive: line 48
Use conventional naming: kebab-case files, PascalCase types/classes, camelCase members.
- Distinctive: line 51
Test public behavior, invalid inputs, and boundaries.
- Distinctive: line 57
Run frozen install when a lockfile already exists, then typecheck, lint, format check, tests, and build using the project's scripts.
- Distinctive: line 59
Follow the repository's existing asynchronous mutation-main/release policy with threshold alerts.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript Development
Deliver cohesive modules, explicit contracts, and reproducible checks. Preserve the repository's supported consumers and established tooling; use the defaults below for new work.
Select scope
| Mode | Use when | Deliver |
| OneOff | Inline answer or quick expression | Short typed snippet, no scaffold |
| Script | Reusable single-file utility | Checked script and pinned repository-local dependencies when needed |
| FullProject | Library, application, CLI, or multiple modules | Source in src/, tests, package metadata, lockfile, runnable checks |
Infer the smallest sufficient mode and target: Library, Browser, Service, or CLI. Inspect existing scripts, lockfile, runtime support, module format, framework, and public API before changing configuration. A narrow edit does not authorize a toolchain migration.
Core rules
Design
- Strongly prefer classes for stateful services and application orchestration; use readonly value objects and narrow injected interfaces. Pure functions are appropriate for stateless transformations, parsers, and framework callbacks. Avoid artificial utility classes.
- Group by cohesive domain or feature. Keep domain logic independent of transport, filesystem, CLI, and framework adapters; wire implementations at the entry point. Prefer composition over inheritance.
- Keep imports free of startup, network, and filesystem side effects. No shared module-level mutable state. Use early guards and shallow control flow; split a method before nesting exceeds three levels.
- Validate external data once at each trust boundary, then enforce domain invariants where they belong. Keep parsing, I/O, and business logic separate.
Types
- Enable
strict,noUncheckedIndexedAccess,exactOptionalPropertyTypes,noImplicitOverride, andnoFallthroughCasesInSwitchfor new projects. Check tests and configuration as well as source. - Annotate public signatures and non-contextual parameters/returns; allow clear local inference and contextually typed callbacks. Prefer readonly data, discriminated unions with exhaustive handling, and generics that preserve real relationships.
- Receive JSON, environment, user input, and untyped dependencies as
unknown; validate to domain types. A genericfetch<T>, assertion, orsatisfiesdoes not validate runtime data. - Avoid
any, unsafe assertions, and non-null assertions. Isolate unavoidable external unsafety behind a typed adapter with a reason and tests. Use described@ts-expect-erroronly for a specific known diagnostic or a negative type test; never blanket-disable checks. - Prefer string unions or
as constobjects over new enums. Prefer named exports, type-only imports, and explicit public exports; preserve framework-required defaults and existing compatible API forms.
Tooling and portability
- New package-managed projects: prefer pnpm with an exact
packageManagerversion and committedpnpm-lock.yaml; preserve npm/Yarn in existing repositories. Pin the development runtime separately from the supportedenginesrange. - New comprehensive lint profile: ESLint flat config + typescript-eslint typed rules; Prettier owns formatting,
tscowns type checking. Preserve a working Biome profile when its rules meet the project requirements; do not claim that the compiler fills every typed-lint gap. - Keep lint, format checking, type checking, tests, and build independently runnable. Expose one non-mutating
checktask. Fix commands are separate; never weaken checks to obtain a pass. - Default builds: Vite for bundled browser applications;
tscfor ordinary Node.js libraries/services/CLIs. Use tsx only when useful for development. These runners/bundlers do not replace type checking. - Choose module format, resolution, extensions, runtime APIs, and output target together. Prefer ESM for new compatible projects; retain or explicitly design CommonJS/dual support when consumers require it. See profiles.
- Use local tools and cross-platform scripts. Review lifecycle scripts and dependency-build permissions for the selected manager version; do not silently enable all scripts, install global tools, or add credentials/network permissions.
Behavior and documentation
- Use conventional naming: kebab-case files, PascalCase types/classes, camelCase members; keep framework conventions. Document public contracts with concise TSDoc, especially invariants, failure modes, units, and side effects.
- Catch as
unknown, narrow deliberately, preserve causes, and use specific application error categories when callers need to distinguish them. Never silently suppress errors. - Separate machine output (stdout) from diagnostics (stderr); use an injected structured logger for services. Configure logging once and redact secrets.
- Test public behavior, invalid inputs, and boundaries; inject fake I/O and use temporary directories. Test the built artifact and package exports, not only development execution.
Work and verify
- Select mode/profile; inspect compatibility and read only the relevant references.
- Implement a cohesive vertical slice, including validation and behavior tests.
- Run frozen install when a lockfile already exists, then typecheck, lint, format check, tests, and build using the project's scripts.
- Exercise emitted code or packed consumers on the advertised runtime/module formats. Report exact commands and failures/unverified platforms; do not equate transpilation with successful checks.
- Follow the repository's existing asynchronous mutation-main/release policy with threshold alerts. These quality checks do not establish a new PR gate or authorize publication.
References
| Read | When |
| modes.md | Runtime, package management, module format, browser, workspace, or library decisions |
| standards.md | Module boundaries, naming, typing, errors, documentation, and tests |
| templates.md | New strict Node.js compiler/linter/task configuration and profile adaptations |
| cli-patterns.md | Testable parsing, asynchronous entry points, CLI streams and exit codes |
| examples.md | Validated boundary decoder, generic API, and refactoring examples |
Generic project setup, documentation structure, and release workflows belong to their existing skills; this skill owns TypeScript-specific decisions.
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.

