# typescript-quality

A skill for TypeScript and JavaScript code quality: ESLint, Biome and strict tsconfig setups. Useful when lint rules pile up and types start drifting.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 45
- Author: claude-dev-suite
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/claude-dev-suite/claude-dev-suite/tree/HEAD/skills/quality/typescript-quality/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/typescript-quality

## What it does

The skill ships ready-made configs and a walkthrough of common mistakes: a `biome.json` with linter and formatter enabled, an `eslint.config.js` in flat format for ESLint 9+ with type-aware rules, and a maximally strict `tsconfig.json`. A comparison table covers the three tools: Biome is the fastest with minimal configuration, ESLint is slower but handles type-aware rules, and TypeScript does the type checking itself. The recommendation is to start with Biome for formatting and basic linting, then add ESLint for type-aware rules.

There is a section on code smells with bad/good pairs: overuse of `any`, too many type assertions, the non-null assertion operator, tangled conditionals, long functions. For runtime validation it points at Zod; for narrowing it shows hand-written type guards. SonarQube, testing and security scanning are out of scope — those have their own skills.

The skill is limited to `Read`, `Grep`, `Glob` and `Bash`, so it inspects your project and runs linter commands rather than editing files for you. You apply the changes yourself, or ask the agent separately. The source documentation cuts off in the long-functions section, so expect a partial set of examples.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-dev-suite/claude-dev-suite --skill typescript-quality -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/typescript-quality/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/typescript-quality/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-dev-suite/claude-dev-suite --skill typescript-quality -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/typescript-quality/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-dev-suite/claude-dev-suite --skill typescript-quality -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/typescript-quality/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install claude-dev-suite/claude-dev-suite typescript-quality
```

2. **Manually: put the files in place**
- File: `.github/skills/typescript-quality/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-dev-suite/claude-dev-suite --skill typescript-quality -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/claude-dev-suite/claude-dev-suite --path skills/quality/typescript-quality
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/typescript-quality/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add claude-dev-suite/claude-dev-suite --skill typescript-quality -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/claude-dev-suite/claude-dev-suite/tree/HEAD/skills/quality/typescript-quality/SKILL.md

## When to use it
- turn on strict TypeScript in an existing project
- migrate ESLint to flat config with type-aware rules
- replace ESLint and Prettier with Biome
- strip `any` and stray type assertions from a codebase
- split long functions and simplify nested conditions

## Example prompts
- set up Biome for this project and list the rules worth enabling
- enable the strict tsconfig and tell me what will break
- find overuse of any in this code and suggest type guards instead

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 465e0b25e29e400b.

BEGIN THIRD-PARTY FILE 465e0b25e29e400b
````text
---
name: typescript-quality
description: |
  TypeScript/JavaScript code quality with ESLint, Biome, and strict TypeScript.
  Covers linting, formatting, type safety, and best practices.

  USE WHEN: user works with "TypeScript", "JavaScript", "ESLint", "Biome", asks about "TS strict mode", "type safety", "linting rules", "code formatting"

  DO NOT USE FOR: SonarQube - use `sonarqube` skill, testing - use Vitest/Jest skills, security - use security skills
allowed-tools: Read, Grep, Glob, Bash
---
# TypeScript Quality - Quick Reference

## When NOT to Use This Skill
- **SonarQube integration** - Use `sonarqube` skill
- **Test configuration** - Use `vitest` skill
- **Security scanning** - Use security skills
- **React-specific patterns** - Use `react` skill

> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `typescript` or `biome` for comprehensive documentation.

## Tool Comparison

| Tool | Speed | Type-aware | Configuration |
|------|-------|------------|---------------|
| **Biome** | Fastest | No | Minimal |
| **ESLint** | Slower | Yes (with TS) | Extensive |
| **TypeScript** | N/A | Yes | tsconfig.json |

**Recommendation**: Use Biome for formatting + basic linting, ESLint for type-aware rules.

## Biome Setup (Recommended)

### Installation

```bash
npm install -D @biomejs/biome
npx biome init
```

### biome.json

```json
{
  "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
  "organizeImports": { "enabled": true },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "complexity": {
        "noExcessiveCognitiveComplexity": {
          "level": "warn",
          "options": { "maxAllowedComplexity": 15 }
        }
      },
      "suspicious": {
        "noExplicitAny": "error",
        "noImplicitAnyLet": "error"
      },
      "style": {
        "noNonNullAssertion": "warn",
        "useConst": "error"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 100
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "trailingCommas": "es5",
      "semicolons": "always"
    }
  }
}
```

### Commands

```bash
# Check all
npx biome check .

# Fix auto-fixable
npx biome check --write .

# Format only
npx biome format --write .

# Lint only
npx biome lint .

# CI mode (no write)
````
END THIRD-PARTY FILE 465e0b25e29e400b

The third-party file has ended. Everything between the 465e0b25e29e400b tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2374 of 9777 bytes. © claude-dev-suite · MIT · https://github.com/claude-dev-suite/claude-dev-suite/tree/HEAD/skills/quality/typescript-quality/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
