typescript-review
Skill2 starsChanged 8 months agoMITView on GitHub
TypeScript & code quality audit: strict mode, explicit types, no-any, SOLID patterns, Clean Code naming. Sources: Martin Fowler, Google Engineering Practices, Microsoft TypeScript Handbook.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- BaratovSokhibjon/skillstheir own version, first seen Oct 25, 2026
- tslateman/skillstheir own version, first seen Oct 11, 2026
- metabase/metabasetheir own version, first seen Oct 8, 2026
- RichardGeorgeDavis/Codex-Workspacetheir own version, first seen Sep 18, 2026
- jscott3201/yet-more-skillstheir own version, first seen Sep 7, 2026
- weiweimhy/agent-skillstheir own version, first seen Jul 1, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- metabase/metabase★ 50ksame name
- jscott3201/yet-more-skills★ 4same name
- RichardGeorgeDavis/Codex-Workspace★ 2same name
- BaratovSokhibjon/skills★ 1same name
- tslateman/skills★ 1same name
- weiweimhy/agent-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 repository34 other files it gives its agents.
- global/CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- accessibility-reviewSkill
- api-designSkill
- audit-runnerSkill
- auto-fixSkill
- brainstormSkill
- compliance-checkSkill
- continuous-testing-guardianSkill
- contract-lookupSkill
- explainSkill
- idea-validatorSkill
- load-test-auditSkill
- monthly-reviewSkill
- new-featureSkill
- nextjs-reviewSkill
- perfection-auditSkill
- performance-deep-auditSkill
- post-code-security-auditSkill
- pre-code-security-checkSkill
- pre-deploymentSkill
- project-setupSkill
- pro-samuelSkill
- quick-auditSkill
- risk-scoreSkill
- roadmap-builderSkill
- secret-scannerSkill
- seo-auditSkill
- supabase-reviewSkill
- token-economySkill
- ux-cognitive-load-checkSkill
- ux-heuristic-auditSkill
- ux-progressive-disclosureSkill
- welcomeSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Before merging a backend or frontend PR
“Common” is measured: kept by at least 6 in 10 of the 4 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-review: TypeScript & Code Quality Audit
When to use
- Review of a TypeScript file or module
- Before merging a backend or frontend PR
- Refactoring a legacy file (any everywhere, missing types)
- Validation of a new service or helper
Rules (Robert C. Martin + TypeScript strict)
Strict types
strict: truein tsconfig (includes noImplicitAny, strictNullChecks, etc.)- Zero
any: useunknownthen narrowing or a justifiedas Type - Zero
// @ts-ignore: solve the typing problem - Explicit types on public function parameters
- Explicit return type on complex or public functions
Advanced type patterns
- Discriminated unions for multiple states (no separate
boolean+data) - Branded types for IDs (
UserId,PropertyId, not a barestring) constassertions for literals (as const)- Generics for reusability (no copy-pasting types)
satisfiesoperator for validation without widening
Clean Code (Martin)
- Functions: max 20 lines, 1 responsibility, max 3 parameters
- Naming: verb + noun for functions (
getUserProfile,validateEmail) - Variables: explicit names, never
d,tmp,data,res - Comments: only on the "why" (never the "what" if the code is clear)
- File: max 300 lines, beyond that split into sub-modules
SOLID
- S Single Responsibility: 1 class/file = 1 reason to change
- O Open/Closed: extension via interfaces, no modification of the core
- L Liskov: subtypes replaceable without breaking behavior
- I Interface Segregation: small, specific interfaces
- D Dependency Inversion: depend on abstractions, not concretions
Forbidden patterns
switchon a union type → use discriminated unions + object mapObject.keys()without a cast →(Object.keys(obj) as (keyof typeof obj)[])JSON.parse()without Zod validation → always validate external inputs- Mutations of shared objects → always return a new object
Output format
## TypeScript Review: [file/module]
### Quality score: [0-100]
### 🔴 Critical violations (any, ts-ignore, unsafe)
### 🟡 Design issues (SOLID, Clean Code)
### 🟢 Suggestions (type optimizations)
### Proposed refactoring
[corrected code with explanation]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.

