The TypeScript Narrows
sethlivingston/the-typescript-narrows
Elimina ambiguidade do TypeScript com opiniões unificadas para IA e linters
Ver no GitHubSkill para Claude e plugin ESLint que elimina armadilhas do TypeScript ao impor um conjunto coeso de boas práticas. Combina análise de IA com linting automático para padronizar type safety, tratamento de erros e padrões assíncronos, reduzindo ambiguidade e inconsistência na escrita de código TypeScript.
Instalação
npx convez-ai sethlivingston/the-typescript-narrows1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Garantir type safety rigoroso em bases de código TypeScript
- Padronizar padrões de tratamento de erros e promises
- Automatizar revisões de código contra boas práticas TypeScript
- Complementar desenvolvimento assistido por IA com regras de lint consistentes
Veredito

Ferramenta bem estruturada que une dois mundos: assistência de IA via skill e automação via ESLint. Excelente para times que querem opinião consistente sobre TypeScript, eliminando o 'qual é a melhor forma?' do dia a dia. Requer adoção de suas preferências, o que é proposital.
README
A tradução para o português deste README ainda está na fila.
The TypeScript Narrows
The TypeScript Narrows is a Claude Skill and an ESLint plugin that complement each other. Together they help AI agents narrow the "five different ways to do X" to a single, opinionated, best-practice way to do X. Some examples:
- No
any, no!, no type assertions — narrow instead - No
enum— useas constobjects with discriminated unions - No default exports, no barrel files
- No
.forEach(), no.reduce()— usefor...of - No floating promises, no misused promises
return awaitinside try/catch (always)??over||,?.over manual null checks- Exhaustive switch — every union variant handled
- Result types for expected failures,
throwonly for bugs Readonly<T>params,readonlyproperties, no mutable exports- Branded types for domain IDs and value objects
- Early returns to fail fast and avoid deep nesting
strict: trueplusnoUncheckedIndexedAccess- ...and many more
The Claude skill and the ESLint plugin extend @typescript-eslint and cover over 50 opinions on type safety, error handling, async patters, naming conventions, and more.
"The TypeScript Narrows" is a play on "The Deathly Hallows".
Repo Structure
- Opinions -- The source of truth for both the Claude Skill and the ESLint plugin (
docs/opinions/INDEX.md) - Claude Plugin -- All opinions structured for AI-assisted TypeScript development (
plugin/the-typescript-narrows/skills/typescript-narrows/SKILL.md) - ESLint Plugin -- The subset of the opinions that can be enforced with ESLint rules, including typescript-eslint's strict rules and others (
eslint-plugin/)
Getting Started
For AI-assisted development: Install the Claude plugin from the marketplace:
claude plugin add-marketplace github:sethlivingston/claude-marketplace
claude plugin install the-typescript-narrows
The skill triggers automatically when writing or reviewing TypeScript. See the plugin README for details.
For automated enforcement: Install @sethlivingston/eslint-plugin-typescript-narrows to lint against these opinions in CI and your editor:
npm install --save-dev @sethlivingston/eslint-plugin-typescript-narrows
See eslint-plugin README for setup instructions.
Both artifacts work independently, but they're designed to complement each other -- the skill covers opinions that can't be expressed as lint rules.
Coverage
See docs/TRACEABILITY.md for the full traceability matrix mapping all opinions to their enforcement mechanisms.