
Description
typescript is an agent skill from the LobeHub repository with a style guide for TypeScript and TSX code. It covers types and type safety, and async patterns, and the rules apply when editing TS, TSX and MTS files. On types, the guide asks for inference where TypeScript can infer a type and for explicit types only where needed, avoids implicit any and prefers Record<PropertyKey, unknown> over object or any. It says to use interface for object shapes such as React props and type for unions and intersections, to write as const satisfies a given interface, and to prefer @ts-expect-error over @ts-ignore over as any. It favors ES module augmentation over namespaces, and when a type needs to be extended it asks for a small mergeable interface at the source, with each feature adding its own fields. On async code, the guide asks that new input and output code use promise-based APIs by default, such as readFile from fs/promises, and it allows synchronous calls in only a few cases where a synchronous contract is already fixed. It is for contributors writing or reviewing TypeScript in the LobeHub codebase, and it is a convention rather than a linter, so it works alongside the project's own checks. The skill passes Gen Agent Trust Hub, Socket and Snyk on skills.sh. Install it with npx skills add https://github.com/lobehub/lobehub --skill typescript.…
Highlights
- Rules for inference, any and explicit types
- Prefers interface for object shapes and type for unions
- Asks for async APIs in new input and output code
- Warns against namespaces in favor of ES module augmentation
Ratings & Reviews
No ratings yet
Be the first to rate typescript.
People also visit

typescript-pro
Implements advanced TypeScript type systems, creates custom type guards

principle-type-system-discipline
Apply when designing types, reviewing a function signature

migrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn
typescript FAQ
Which files does the guide cover?
TypeScript files, TSX, and MTS files in the LobeHub repository.
Should I use @ts-ignore?
The guide prefers @ts-expect-error over @ts-ignore, and it advises against as any.
What does it say about sync code?
New input and output code should use async APIs by default. Synchronous calls are accepted only where a synchronous contract is already fixed.
How do I install it?
Run npx skills add https://github.com/lobehub/lobehub --skill typescript.
Which security audits does it have?
On skills.sh, Gen Agent Trust Hub, Socket and Snyk all pass.
What are the best typescript alternatives?
Popular alternatives to typescript include typescript-review, typescript-write and typescript-pro. See all typescript alternatives




