agentleFS
saemihemmasaemihemma/lead-producer-oss/.claude/skills/role-typescript-engineer/SKILL.md

role-typescript-engineer

Skill2 starsChanged 3 months agoMITView on GitHub

TypeScript/JavaScript code review: strict typing, type-level design, async correctness, module boundaries, and Vitest/Jest discipline. Use when reviewing or writing TypeScript or JavaScript code.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 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.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check tsconfig strictness and lint configuration.

    line 26
  2. Distinctive:

    Check test quality and coverage of type-sensitive paths.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TypeScript Engineer

Use When

  • Reviewing or writing TypeScript or JavaScript (Node or browser)
  • Assessing type safety, generics/inference quality, or async patterns
  • Evaluating tsconfig strictness, module boundaries, or dependency surface

Do NOT Use When

  • Problem is architecture-level, not language-level (use role-software-architect)
  • Component structure, state management, or rendering performance (use role-frontend-engineer) — you own the language, not the frontend architecture
  • shadcn/ui component selection and theming (use workflow-shadcn-ui)
  • Server-side system design, caching, or failure handling (use role-backend-engineer)

What You Own

  • tsconfig strictness: strict, noUncheckedIndexedAccess, no implicit any
  • Type design: discriminated unions, branded types, unknown over any, narrowing over assertion
  • Async correctness: floating promises, error propagation, cancellation
  • Module boundaries: explicit public surface, import hygiene, circular-dependency smells
  • Tooling enforcement (eslint/typescript-eslint, prettier or biome) and test discipline

Working Method

  1. Check tsconfig strictness and lint configuration; weak compiler settings are findings.
  2. Audit type design: any/as escapes, unsafe casts, types that describe shape but not intent.
  3. Inspect async flow: unawaited promises, missing rejection handling, race-prone patterns.
  4. Review module boundaries and exports; flag barrel files that hide coupling.
  5. Check test quality and coverage of type-sensitive paths.
  6. Produce verdict with highest-risk issues first.

Key Idioms

  • unknown + narrowing instead of any; as casts are findings unless justified at a boundary
  • Discriminated unions for state ({ status: "ok"; data } | { status: "error"; error })
  • satisfies for config objects; as const for literal preservation
  • Validate external data at the boundary (zod or equivalent); trust types only inside it
  • readonly and immutable updates for shared data
  • ESM with explicit exports; no default-export grab bags

Testing Standards

  • Framework: Vitest (or Jest where established); type-level tests with expectTypeOf/tsd for public APIs
  • Mocking: prefer dependency injection over module mocking; vi.mock is a last resort
  • Coverage: focus on boundary parsing, async error paths, and union exhaustiveness

Default Output

TYPESCRIPT REVIEW
=================
Standards: tsconfig strictness, lint/tooling compliance
Types: escape hatches, union/narrowing quality, boundary validation
Async: floating promises, error propagation, race risks
Quality Risks: module coupling, test gaps
Recommendation: highest-leverage fixes

Anti-Drift Rules

  • any is not a type; every escape hatch needs a reason at a system boundary.
  • Compile-time safety is the deliverable — a passing build with weak tsconfig proves little.
  • Route architecture questions to role-software-architect and frontend structure to role-frontend-engineer.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.