antfu
Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.
npx skills add antfu/skills --skill antfu --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## 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: ```ts // @env node // @env browser ``` ### TypeScript - **Explicit return types**: Declare return types explicitly when possible - **Avoid complex inline types**: Extract complex types into dedicated `type` or `interface` declarations ### Explicitness Favor explicit, traceable code over implicit "magic". A reader (human or agent) should be able to follow where every name comes from without running tooling. - **Explicit imports**: Prefer explicit `import` statements. Avoid auto-imports — when a framework provides them (e.g. Nuxt/Nitro), turn them off for new p
- Coding Practices
- Code Organization
- Runtime Environment
- TypeScript
- Explicitness
- Comments
- Testing (Vitest)
- Tooling Choices
- @antfu/ni Commands
- Checking npm Package Versions
- TypeScript Config
- ESLint Setup
- Git Hooks
- pnpm Catalogs
nlx fast-npm-meta version vite # 7.3.1 nlx fast-npm-meta version "nuxt@^3.5" # 3.5.22 — range-aware nlx fast-npm-meta version vite nuxt vue # multiple at once nlx fast-npm-meta version vite --json # JSON for scripting nlx fast-npm-meta full vite # full version list + dist-tags
What does the antfu skill do?
Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.
How do I install it?
Run `npx skills add antfu/skills --skill antfu --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From antfu/skills, a repository with 5,709 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
