Agent skill

Typescript

by alinaqi in alinaqi/maggy

TypeScript strict mode with eslint and jest. An agent skill from alinaqi/maggy.

MITAuto-check passedTesting & QA

Install Typescript

skills CLI
$ npx skills add alinaqi/maggy --skill typescript -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alinaqi/maggy typescript --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/typescript .claude/skills/typescript && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
typescript
GitHub stars
707
Token cost
~1.3k tokens
SKILL.md length
98 words
Files
1
Skills in repo
71
Repo updated
First seen
Licence
MIT

At a glance

TypeScript strict mode with eslint and jest. An agent skill from alinaqi/maggy.

  • Works in 3 steps: ESLint + Prettier on staged files → Type check entire project → Tests for changed files only
  • Tasks that involve Linting and formatting
  • SKILL.md covers Strict Mode (Non-Negotiable), Project Structure, Tooling (Required) and Testing with Jest, plus 4 more sections
  • Calls npx and npm

What it does

Typescript is an agent skill from alinaqi/maggy. TypeScript strict mode with eslint and jest

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Linting and formatting and Unit testing. It works with TypeScript, Jest and ESLint. The repository describes itself as: What started as an opinionated Claude Code setup kit is now an autonomous AI engineering command center. The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting
  • Tasks that involve Unit testing

Example prompts

  • “/typescript”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. ESLint + Prettier on staged files
  2. Type check entire project
  3. Tests for changed files only

What it can do on your machine

Read from SKILL.md and the folder at commit 72a456e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript loads about 1.3k tokens when it runs. Until then it costs about 14 tokens; SKILL.md has 98 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~14
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alinaqi/maggy at commit 72a456e, republished under its MIT licence (© alinaqi). 98 words, ~1,258 tokens.

Download SKILL.mdSave it as .claude/skills/typescript/SKILL.md (or your agent's skills folder).
name
typescript
description
TypeScript strict mode with eslint and jest
when-to-use
When working on TypeScript files
user-invocable
false
paths
**/*.ts, **/*.tsx, tsconfig*.json
effort
medium

TypeScript Skill


Strict Mode (Non-Negotiable)

json
// 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)

json
// package.json scripts
{
  "scripts": {
    "lint": "eslint src/ --ext .ts,.tsx",
    "typecheck": "tsc --noEmit",
    "test": "jest",
    "test:coverage": "jest --coverage",
    "format": "prettier --write 'src/**/*.ts'"
  }
}
javascript
// 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

typescript
// 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

yaml
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:

bash
npm install -D husky lint-staged
npx husky init
json
// package.json
{
  "lint-staged": {
    "*.{ts,tsx}": [
      "eslint --fix",
      "prettier --write"
    ]
  }
}
bash
# .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
typescript
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
typescript
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
typescript
const STATUSES = ['pending', 'active', 'closed'] as const;
type Status = typeof STATUSES[number]; // 'pending' | 'active' | 'closed'
Zod for Runtime Validation
typescript
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

© alinaqi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/typescript of alinaqi/maggy.

Open the folder on GitHubat commit 72a456e

Compare with similar skills

Typescript next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Typescript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript this skillalinaqi/maggy707—~1.3kAutomated safety check: PassMIT
Typescript Rulessoftspark/ai-toolkit179—~2.7kAutomated safety check: NotesApache-2.0
Typescript ToolingHoangNguyen0403/agent-skills-standard571—~688Automated safety check: PassMIT
Eslint Vitest Rule Testerantfu-collective/eslint-vitest-rule-tester142—~1.3kAutomated safety check: PassMIT
Run Pre Commit Checksmicrosoft/vscode-python-environments141—~898Automated safety check: PassMIT
Implementing Lint Rulesflint-fyi/flint312—~857Automated safety check: PassMIT

Similar skills

  • Typescript Rules

    softspark/ai-toolkit

    TypeScript/JavaScript coding rules: style, patterns, security, testing.

    179 GitHub stars~2.7k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Typescript Tooling

    HoangNguyen0403/agent-skills-standard

    Development tools, linting, and build config for TypeScript.

    571 GitHub stars~688 tokensUpdated today
    DevelopmentAuto-check passed
  • Eslint Vitest Rule Tester

    antfu-collective/eslint-vitest-rule-tester

    Help users test ESLint rules with Vitest, supporting snapshot testing and custom assertions

    142 GitHub stars~1.3k tokensUpdated 28 days ago
    Testing & QAAuto-check passed
  • Run Pre Commit Checks

    microsoft/vscode-python-environments

    Official

    Run the mandatory pre-commit checks before committing code. An agent skill from microsoft/vscode-python-environments.

    141 GitHub stars~898 tokensUpdated today
    Testing & QAAuto-check passed
  • Implements ESLint-style lint rules with proper AST handling, targeted reporting, and comprehensive unit tests.

    312 GitHub stars~857 tokensUpdated today
    DevelopmentAuto-check passed
  • Npx CLI

    jwynia/agent-skills

    Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.

    166 GitHub stars~2.4k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed

More from alinaqi/maggy

All 71 skills in this repo
  • AI Models

    alinaqi/maggy

    Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate

    707 GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed
  • Azure Cosmosdb

    alinaqi/maggy

    Azure Cosmos DB partition keys, consistency levels, change feed, SDK patterns

    707 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • LLM Patterns

    alinaqi/maggy

    AI-first application patterns, LLM testing, prompt management

    707 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Woocommerce

    alinaqi/maggy

    WooCommerce REST API - products, orders, customers, webhooks

    707 GitHub starsUsed in 1 repo~4.4k tokens
    Auto-check: notes
  • Aeo Optimization

    alinaqi/maggy

    AI Engine Optimization - semantic triples, page templates, content clusters for AI citations

    707 GitHub stars~3.7k tokensUpdated 14 days ago
    Auto-check passed
  • Agent Teams

    alinaqi/maggy

    Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement

    707 GitHub stars~5k tokensUpdated 14 days ago
    Auto-check: notes

Categories

Questions about Typescript

What does Typescript do?

TypeScript strict mode with eslint and jest. An agent skill from alinaqi/maggy. Typescript is an agent skill from alinaqi/maggy.

When should I use Typescript?

Typescript fits situations like: tasks that involve Linting and formatting; tasks that involve Unit testing.

How do I install Typescript in Claude Code?

Run `npx skills add alinaqi/maggy --skill typescript -a claude-code`. Or copy the skill folder (skills/typescript in alinaqi/maggy) into .claude/skills/typescript in your project. Claude Code loads it when a task matches its description.

How do I install Typescript in Codex?

Run `npx skills add alinaqi/maggy --skill typescript -a codex`. Or copy the skill folder (skills/typescript in alinaqi/maggy) into .agents/skills/typescript in your project. Codex loads it when a task matches its description.

Can I use Typescript in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alinaqi/maggy --skill typescript -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript, .gemini/skills/typescript, .github/skills/typescript and .opencode/skills/typescript in your project.

What does Typescript need to run?

Going by SKILL.md and its folder, Typescript needs the command-line tools its instructions call (npx and npm). Our summary lists: Node.js.

Does Typescript access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Typescript safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Typescript use?

Typescript is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Typescript?

Skills that share tags, products or a category with Typescript: Typescript Rules (softspark/ai-toolkit, 179 stars), Typescript Tooling (HoangNguyen0403/agent-skills-standard, 571 stars), Eslint Vitest Rule Tester (antfu-collective/eslint-vitest-rule-tester, 142 stars) and Run Pre Commit Checks (microsoft/vscode-python-environments, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript?

alinaqi (a GitHub user) maintains it in alinaqi/maggy, which has 707 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on September 24, 2026.

Source: alinaqi/maggy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.