Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alinaqi avatar

Typescript

  • 3 installs
  • 706 repo stars
  • Updated July 14, 2026
  • alinaqi/maggy

This is a copy of typescript by alinaqi - installs and ranking accrue to the original listing.

typescript is a Claude Code skill that enforces TypeScript strict mode with eslint, Jest, CI quality gates, and pre-commit hooks.

About

This skill sets TypeScript quality standards for a project: strict-mode tsconfig, strict eslint config, Jest testing, a GitHub Actions quality gate with an 80% coverage threshold, and Husky/lint-staged pre-commit hooks. It also lists recommended type patterns and anti-patterns like avoiding any and default exports. A developer uses it when working on TypeScript files to enforce consistent, type-safe code.

  • Enforces TypeScript strict mode with a non-negotiable tsconfig and strict eslint rules
  • Sets up Jest testing, a GitHub Actions quality gate, and Husky/lint-staged pre-commit hooks
  • Lists type patterns (discriminated unions, branded types, Zod) and anti-patterns to avoid

Typescript by the numbers

  • 3 all-time installs (skills.sh)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

typescript capabilities & compatibility

Free; no external keys required.

Capabilities
code review · testing · ci cd
Works with
github
Use cases
code review · testing · ci cd
IDEs
vscode
Runs
Runs locally
Pricing
Free
From the docs

What typescript says it does

TypeScript strict mode with eslint and jest
SKILL.md
Coverage Threshold (80%)
SKILL.md
npx skills add https://github.com/alinaqi/maggy --skill typescript

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3
repo stars706
Last updatedJuly 14, 2026
Repositoryalinaqi/maggy

What it does

Enforce TypeScript strict mode, linting, testing, and pre-commit gates across a project.

Who is it for?

Setting up or enforcing strict, tested, linted TypeScript in a project.

When should I use this skill?

When working on TypeScript files.

What you get

A strict-mode TypeScript setup with eslint, Jest coverage gates, and pre-commit checks.

  • strict tsconfig.json
  • eslint config
  • Jest tests

By the numbers

  • Enforces an 80% coverage threshold in CI
  • Lists 7 TypeScript anti-patterns to avoid

Files

SKILL.mdMarkdownGitHub ↗

TypeScript Skill

---

Strict Mode (Non-Negotiable)

// tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  }
}

---

Project Structure

project/
├── src/
│   ├── core/               # Pure business logic
│   │   ├── types.ts        # Domain types/interfaces
│   │   ├── services/       # Pure functions
│   │   └── index.ts        # Public API
│   ├── infra/              # Side effects
│   │   ├── api/            # HTTP handlers
│   │   ├── db/             # Database operations
│   │   └── external/       # Third-party integrations
│   └── utils/              # Shared utilities
├── tests/
│   ├── unit/
│   └── integration/
├── package.json
├── tsconfig.json
└── CLAUDE.md

---

Tooling (Required)

// package.json scripts
{
  "scripts": {
    "lint": "eslint src/ --ext .ts,.tsx",
    "typecheck": "tsc --noEmit",
    "test": "jest",
    "test:coverage": "jest --coverage",
    "format": "prettier --write 'src/**/*.ts'"
  }
}
// eslint.config.js
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  eslint.configs.recommended,
  ...tseslint.configs.strictTypeChecked,
  {
    rules: {
      '@typescript-eslint/no-explicit-any': 'error',
      '@typescript-eslint/explicit-function-return-type': 'error',
      'max-lines-per-function': ['error', 20],
      'max-depth': ['error', 2],
      'max-params': ['error', 3],
    }
  }
);

---

Testing with Jest

// tests/unit/services/user.test.ts
import { calculateTotal } from '../../../src/core/services/pricing';

describe('calculateTotal', () => {
  it('returns sum of item prices', () => {
    // Arrange
    const items = [{ price: 10 }, { price: 20 }];

    // Act
    const result = calculateTotal(items);

    // Assert
    expect(result).toBe(30);
  });

  it('returns zero for empty array', () => {
    expect(calculateTotal([])).toBe(0);
  });

  it('throws on invalid item', () => {
    expect(() => calculateTotal([{ invalid: 'item' }])).toThrow();
  });
});

---

GitHub Actions

name: TypeScript Quality Gate

on: [push, pull_request]

jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          
      - name: Install dependencies
        run: npm ci
        
      - name: Lint
        run: npm run lint
        
      - name: Type Check
        run: npm run typecheck
        
      - name: Test with Coverage
        run: npm run test:coverage
        
      - name: Coverage Threshold (80%)
        run: npm run test:coverage -- --coverageThreshold='{"global":{"branches":80,"functions":80,"lines":80,"statements":80}}'

---

Pre-Commit Hooks

Using Husky + lint-staged:

npm install -D husky lint-staged
npx husky init
// package.json
{
  "lint-staged": {
    "*.{ts,tsx}": [
      "eslint --fix",
      "prettier --write"
    ]
  }
}
# .husky/pre-commit
npx lint-staged
npx tsc --noEmit
npm run test -- --onlyChanged --passWithNoTests

This runs on every commit: 1. ESLint + Prettier on staged files 2. Type check entire project 3. Tests for changed files only

---

Type Patterns

Discriminated Unions for Results

type Result<T> =
  | { ok: true; value: T }
  | { ok: false; error: string };

function parseUser(data: unknown): Result<User> {
  // Type-safe error handling without exceptions
}

Branded Types for IDs

type UserId = string & { readonly brand: unique symbol };
type OrderId = string & { readonly brand: unique symbol };

// Can't accidentally pass UserId where OrderId expected
function getOrder(orderId: OrderId): Order { ... }

Const Assertions for Literals

const STATUSES = ['pending', 'active', 'closed'] as const;
type Status = typeof STATUSES[number]; // 'pending' | 'active' | 'closed'

Zod for Runtime Validation

import { z } from 'zod';

const UserSchema = z.object({
  email: z.string().email(),
  name: z.string().min(1).max(100),
});

type User = z.infer<typeof UserSchema>;

---

TypeScript Anti-Patterns

  • any type - use unknown and narrow
  • ❌ Type assertions (as) - use type guards
  • ❌ Non-null assertions (!) - handle null explicitly
  • @ts-ignore without explanation
  • ❌ Enums - use const objects or union types
  • ❌ Classes for data - use interfaces/types
  • ❌ Default exports - use named exports

Related skills

FAQ

What testing framework does this skill use?

Jest, with a GitHub Actions step enforcing an 80% coverage threshold.

What TypeScript anti-patterns does it flag?

any, type assertions, non-null assertions, @ts-ignore, enums, classes for data, and default exports.

Code Review & Qualityfrontendtesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.