typescript-developer
Skill1 starsChanged 3 months agoMITView on GitHub
Generates modern TypeScript and provides architectural guidance, deriving from the Google TypeScript Style Guide and extending it to current practice. Trigger when writing or reviewing TypeScript, or for guidance on tsconfig and strictness flags, imports and exports, ES modules, classes and private fields, functions, control flow, error handling, the type system (inference, satisfies, nullability, interfaces vs type aliases, generics, any vs unknown, branded types, discriminated unions), replacing enums with literal unions and as const objects, decorators, async and promises, resource management with using, naming, JSDoc, testing, or migrating between TypeScript 5.x, 6.0 and 7.0.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- nainishshafi/developer-productivity-skillstheir own version, first seen Nov 8, 2026
- edilson-silva/codridetheir own version, first seen Oct 15, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- edilson-silva/codride★ 2same name
- nainishshafi/developer-productivity-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 repository11 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Every reference carries a ## Version notes section stating what differs across TypeScript 5.x, 6.0 and 7.0, and a ## Gotchas list of the …
- Very specific: line 32
Step 1: Read typescript in package.json devDependencies, not a global install.
- Very specific: line 34
Step 2: Read the whole tsconfig.json, following extends.
- Very specific: line 36
Step 3: Check for erasableSyntaxOnly, and whether the project runs .ts directly under Node.
- Very specific: line 38
Step 4: Check the module format - module, type in package.json, and whether imports carry .js extensions.
- Distinctive: line 47
Google Style Deltas: Every point where this skill departs from the Google guide, with the expired rationale that justifies each.
- Very specific: line 60
Errors and Exceptions: Only throw Error, unknown in catch, custom error classes and cause, empty catch blocks, keeping try focused, and …
- Distinctive: line 94
Best Practices Checklist: Every rule in one scannable list, plus the ones that cause the most damage.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Developer Guidelines
Derived from the Google TypeScript Style Guide, which is the baseline for every rule here. Where Google's stated rationale has since expired - usually because it rested on ES5 downlevel emit, which no longer exists - this skill takes the current position instead and says so. Every such departure is listed in google-style-deltas.md; nothing is changed silently.
- Always determine the TypeScript version and the tsconfig before giving guidance. 6.0 changed the defaults (
strict,module,types) and removed the ES5 target; 7.0 removed more and ships without a programmatic API. What compiles on one line will not on another. Read typescript-versions.md. strictis the floor, not the target.strict: truealone leavesnoUncheckedIndexedAccess,exactOptionalPropertyTypesandverbatimModuleSyntaxoff, and each of those catches a class of bug the strict family does not. Read tsconfig.md.- Never widen a type to make an error go away. No
any, noasto silence a mismatch, no!to dismiss a null, no@ts-ignore. Each converts a compile error into a runtime one. Narrow, guard, or fix the type. Read any-and-unknown.md. - Never generate an
enum. Notconst enum, not a string enum, not a numeric one. Use a literal union, or anas constobject when the values are needed at runtime. Enums are the one TypeScript type construct that emits JavaScript, which makes them non-erasable, and numeric enums are not even type-safe. enums-and-constants.md carries the replacement for every enum shape. If the codebase already uses enums, match it and raise it rather than silently mixing. - Prefer the construct that emits nothing. The same erasability rule bans
namespaceand makes parameter properties conditional - Node's type stripper anderasableSyntaxOnlyboth reject anything that is not a pure annotation. - Match the surrounding code and raise the conflict. These rules apply to new code. In a codebase that consistently does otherwise, follow the local convention and say so rather than silently mixing styles.
- After generating code, type-check it and run the tests.
tsc --noEmitplus the project's test command. Do not skip this - inference, generic constraints and exhaustiveness all fail in ways that are not obvious by reading.
Every reference carries a ## Version notes section stating what differs across TypeScript 5.x, 6.0 and 7.0, and a ## Gotchas list of the specific mistakes agents make in that area. Read the gotchas even when skimming.
Determining the Version and Configuration
Step 1. Read typescript in package.json devDependencies, not a global install. Confirm with npx tsc --version.
Step 2. Read the whole tsconfig.json, following extends. The strictness flags decide what advice is even applicable - noUncheckedIndexedAccess changes what every array access returns.
Step 3. Check for erasableSyntaxOnly, and whether the project runs .ts directly under Node. Either one bans enums, namespaces and parameter properties.
Step 4. Check the module format - module, type in package.json, and whether imports carry .js extensions. This decides import style before anything else.
Step 5. New projects: TypeScript 6.0. Read typescript-versions.md for why 7.0 is not yet the default recommendation.
Foundations
- TypeScript Versions: The 6.0 baseline, what 6.0 removed and redefaulted, the 7.0 Go-native compiler and its missing programmatic API, running 6 and 7 side by side, and the 5.x → 6 → 7 path. Read typescript-versions.md
- tsconfig: The recommended configuration flag by flag - the strict family and what it misses,
noUncheckedIndexedAccess,exactOptionalPropertyTypes,verbatimModuleSyntax,isolatedModules,isolatedDeclarations,erasableSyntaxOnly. Read tsconfig.md - Enforcement: Which rules a linter can enforce and which only review catches, the typescript-eslint mapping, formatter setup, and what breaks on TypeScript 7. Read enforcement.md
- Google Style Deltas: Every point where this skill departs from the Google guide, with the expired rationale that justifies each. Read google-style-deltas.md
Source Files
- File Structure: Encoding, the required order of copyright,
@fileoverview, imports and implementation, escape sequences, and non-ASCII characters. Read file-structure.md - Imports and Exports: The four import forms and when each applies, named versus namespace imports, why default exports are banned, mutable exports, container classes,
import type, ES modules,.jsextensions and packageexports. Read imports-and-exports.md
Language
- Variables and Literals:
constoverletover nevervar, one declaration per statement, array and object literals, spread, destructuring, string quoting, template literals, number literals, and type coercion. Read variables-and-literals.md - Functions: Declarations versus expressions versus arrows,
thisand why rebinding is banned, callbacks, arrow properties, event handlers, parameter defaults, rest and spread, and overloads. Read functions.md - Classes:
#privateoverprivate,readonly, field initializers, why parameter properties are now conditional, visibility, accessors, static members, and the prototype rules. Read classes.md - Control Flow: Braces, assignment in conditions, iterating arrays and objects,
switchand exhaustiveness,===, and grouping parentheses. Read control-flow.md - Errors and Exceptions: Only throw
Error,unknownincatch, custom error classes andcause, empty catch blocks, keepingtryfocused, and when aResulttype beats throwing. Read errors-and-exceptions.md
Type System
- Type Inference and satisfies: What to annotate and what to leave inferred, return types, annotating structural implementations at the declaration, and
satisfiesas the first choice before any assertion. Read type-inference.md - Nullability:
undefinedversusnull, why nullability never belongs in a type alias, optional properties versus| undefined,exactOptionalPropertyTypes, and narrowing. Read nullability.md - Interfaces and Type Aliases: Interfaces for object shapes, aliases for unions and computed types, declaration merging, and what Google's rule actually says. Read interfaces-and-type-aliases.md
- Arrays and Collections:
T[]versusArray<T>,readonly, index signatures,MapandSetandRecord, and whatnoUncheckedIndexedAccesschanges. Read arrays-and-collections.md - any and unknown: Why
anyis banned,unknownand narrowing,{}versusobjectversusunknown, and the discipline for the rare suppression. Read any-and-unknown.md - Generics: Constraints, why return-type-only generics are banned,
consttype parameters,NoInfer, variance annotations, and when not to reach for a generic. Read generics.md - Advanced Types: Mapped and conditional types and Google's restraint rule, template literal types, discriminated unions, branded types for nominal typing, type predicates and assertion functions. Read advanced-types.md
Modern Syntax
- Enums and Constants: Why
as constobjects and literal unions replaceenum, theconst enumban, and the erasability rule behind both. Read enums-and-constants.md - Decorators: Standard stage-3 decorators versus
experimentalDecorators, why the two cannot be mixed, the framework-only rule, and theaccessorkeyword. Read decorators.md
Async
- Async and Promises: Floating promises,
async/awaitover.then, concurrency withPromise.allandallSettled, cancellation withAbortSignal, and async error handling. Read async-and-promises.md - Resource Management:
usingandawait using,Symbol.disposeandSymbol.asyncDispose,DisposableStack, and where they replacetry/finally. Read resource-management.md
Conventions
- Naming: The casing table, descriptive names, acronyms as words, type parameters, test names, the underscore ban, what counts as a constant, and aliases. Read naming.md
- Comments and JSDoc: JSDoc versus line comments, form and markdown, which tags are banned because TypeScript already says it, and documenting parameters and returns. Read comments-and-jsdoc.md
- Disallowed Features: Wrapper objects, semicolons and ASI,
debugger,with,eval, non-standard syntax, namespaces, and modifying builtins. Read disallowed-features.md
Testing
- Testing: Structure and naming, what to assert, type-level testing, why
anyin a test is still a bug, and test doubles. Read testing.md
Checklist
- Best Practices Checklist: Every rule in one scannable list, plus the ones that cause the most damage. Use this for a review pass over existing code. Read checklist.md
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.

