typescript-standards
Skill104 starsChanged 3 days agoApache-2.0View on GitHub
TypeScript coding standards for this project. Use when writing TypeScript code, defining types, or working with type safety.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 2 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use strict TypeScript with proper typing
- Very specific: line 11
Prefer explicit types over any (only use any when absolutely necessary)
- Very specific: line 12
Use interface for object shapes, type for unions/primitives
- Very specific: line 13
Follow existing patterns for type definitions in src/types/
- Very specific: line 17
Don't use type assertions (as) unless absolutely necessary.
- Very specific: line 36
Use the generated API client in src/api/
- Very specific: line 37
Prefer domain types: Use types from src/utils/componentSpec.ts, src/types/, etc.
- Very specific: line 38
Use generated API types: Only use src/api/types.gen.ts when directly interfacing with APIs or when domain types don't exist
- Very specific: line 39
Follow existing service patterns in src/services/
- Distinctive: line 40
Use proper error handling with try/catch
“Common” is measured: kept by at least 6 in 10 of the 9 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 Standards
Core Rules
- Use strict TypeScript with proper typing
- Prefer explicit types over
any(only useanywhen absolutely necessary) - Use
interfacefor object shapes,typefor unions/primitives - Follow existing patterns for type definitions in
src/types/
Avoid Unsafe Type Casting
Don't use type assertions (as) unless absolutely necessary. Instead prefer:
- Type guards and runtime validation
- Proper typing from the source
- Union types and type narrowing
- Schema validation libraries (e.g., zod) for external data
// Bad
const something: string = myjson as string;
// Good - use type guards or validate the data
function isString(value: unknown): value is string {
return typeof value === "string";
}API & Data Types
- Use the generated API client in
src/api/ - Prefer domain types: Use types from
src/utils/componentSpec.ts,src/types/, etc. for core business logic - Use generated API types: Only use
src/api/types.gen.tswhen directly interfacing with APIs or when domain types don't exist - Follow existing service patterns in
src/services/ - Use proper error handling with try/catch
Naming Conventions
- Components: PascalCase
- Files: PascalCase for components, camelCase for utilities
- Variables/functions: camelCase
- Constants: SCREAMING_SNAKE_CASE
- Types/Interfaces: PascalCase
- Directories: Follow the existing convention in the surrounding directory. The codebase uses both camelCase and PascalCase for folders — match what's already there
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- BTMuli/TeyvatGuide★ 428same name
- AlemTuzlak/skills★ 45same name
- LiorCohen/sdd★ 43same name
- jackleekopij/claude-skills★ 3same name
- motola10/claude-code-base★ 1same name
- rkdxodud-tyk/SKILLS★ 1same name
- sapientsai/panel-mcp-server★ 1same name
- alexander-zuev/agent-skills★ 0same name
- gerardbalaoro/skills★ 0same 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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- address-pr-commentsSkill
- analytics-trackingSkill
- audit-ticketsSkill
- docs-updateSkill
- e2e-testingSkill
- gardeningSkill
- list-skillsSkill
- open-sourceSkill
- project-conventionsSkill
- react-patternsSkill
- reviewSkill
- tangle-domainSkill
- tanstack-querySkill
- tanstack-routerSkill
- ui-primitivesSkill
- validateSkill
- vitest-testingSkill
- playwright-testingSkill
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.

