# Role Typescript Engineer

> 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.

- **Type:** Skill
- **Install:** `agentstack add skill-saemihemma-lead-producer-oss-role-typescript-engineer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [saemihemma](https://agentstack.voostack.com/s/saemihemma)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [saemihemma](https://github.com/saemihemma)
- **Source:** https://github.com/saemihemma/lead-producer-oss/tree/main/.claude/skills/role-typescript-engineer

## Install

```sh
agentstack add skill-saemihemma-lead-producer-oss-role-typescript-engineer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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
```text
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`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [saemihemma](https://github.com/saemihemma)
- **Source:** [saemihemma/lead-producer-oss](https://github.com/saemihemma/lead-producer-oss)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-saemihemma-lead-producer-oss-role-typescript-engineer
- Seller: https://agentstack.voostack.com/s/saemihemma
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
