Skip to content

antfu

Opinionated TypeScript/JavaScript conventions and tooling setup for modern projects.

— (0 ratings) 17.6K downloads antfu
$ npx skills add https://github.com/antfu/skills --skill antfu

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Summary

Opinionated TypeScript/JavaScript conventions and tooling setup for modern projects.

  • Covers code organization (single responsibility, type separation, constants extraction), runtime practices (isomorphic code with environment markers), and explicit TypeScript typing
  • Includes ESLint configuration via @antfu/eslint-config, Vitest testing patterns, and Git hooks with lint-staged for automated code formatting
  • Provides @antfu/ni command shortcuts for dependency management across package managers, and pnpm catalog-based version management for monorepos
  • References detailed guides for ESLint setup, project initialization, Vue/Nuxt app development, library publishing, and monorepo patterns

Reference template: antfu/starter-ts. When scaffolding a new TypeScript project, mirror its package.json scripts, eslint.config.js, knip.json, tsdown.config.ts and workflows rather than inventing a new layout.

Coding Practices

Code Organization

  • Single responsibility: Each source file should have a clear, focused scope/purpose
  • Split large files: Break files when they become large or handle too many concerns
  • Type separation: Always separate types and interfaces into types.ts or types/*.ts
  • Constants extraction: Move constants to a dedicated constants.ts file

Runtime Environment

  • Prefer isomorphic code: Write runtime-agnostic code that works in Node, browser, and workers whenever possible
  • Clear runtime indicators: When code is environment-specific, add a comment at the top of the file:

Installs: 17.6K | GitHub stars: 6.1K | First seen: Jan 28, 2026

Related skills

New

Coding & dev tools

hyperframes-cli

CLI toolkit for scaffolding, validating, previewing, and rendering HyperFrames video compositions.

New • 1.8M
New

Design & UI

design-mobile-apps

Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.

New • 1.7M
New

Coding & dev tools

improve-codebase-architecture

Analyze codebases for architectural friction and propose module-deepening refactors as testability improvements.

New • 1.3M