/antfu:antfufrom antfu
Applies Anthony Fu's conventions for JavaScript/TypeScript projects: code organization, Vitest testing, @antfu/ni tooling, ESLint config, git hooks, pnpm workspaces. For new project setup, monorepos, library publishing.
Ships in antfu. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
types.ts or types/*.tsconstants.ts file// @env node
// @env browser
type or interface declarationsfoo.ts → foo.test.ts (same directory)describe/it API (not test)toMatchSnapshot for complex outputstoMatchFileSnapshot with explicit path for language-specific snapshots| Command | Description |
|---|---|
ni | Install dependencies |
ni <pkg> / ni -D <pkg> | Add dependency / dev dependency |
nr <script> | Run script |
nu | Upgrade dependencies |
nun <pkg> | Uninstall dependency |
nci | Clean install (pnpm i --frozen-lockfile) |
nlx <pkg> | Execute package (npx) |
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
}
// eslint.config.mjs
import antfu from '@antfu/eslint-config'
export default antfu()
When completing tasks, run pnpm run lint --fix to format the code and fix coding style.
For detailed configuration options: antfu-eslint-config
{
"simple-git-hooks": {
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
},
"lint-staged": { "*": "eslint --fix" },
"scripts": {
"prepare": "npx simple-git-hooks"
}
}
Use named catalogs in pnpm-workspace.yaml for version management:
| Catalog | Purpose |
|---|---|
prod | Production dependencies |
inlined | Bundler-inlined dependencies |
dev | Dev tools (linter, bundler, testing) |
frontend | Frontend libraries |
Avoid the default catalog. Catalog names can be adjusted per project needs.
| Topic | Description | Reference |
|---|---|---|
| ESLint Config | Framework support, formatters, rule overrides, VS Code settings | antfu-eslint-config |
| Project Setup | .gitignore, GitHub Actions, VS Code extensions | setting-up |
| App Development | Vue/Nuxt/UnoCSS conventions and patterns | app-development |
| Library Development | tsdown bundling, pure ESM publishing | library-development |
| Monorepo | pnpm workspaces, centralized alias, Turborepo | monorepo |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
antfu, project-setup, code-conventions, monorepo, eslint-config, pnpm-tooling
Other plugins' skills for the same job
17 skills in this plugin
/nuxtNuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid rendering./piniaPinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patterns in Vue apps./pnpmNode.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides./slidevCreate and present web-based slides for developers using Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, or teaching materials./tsdownBundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup./turborepoTurborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines,
dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment
variables, internal packages, monorepo structure/best practices, and boundaries.
Use when user: configures tasks/workflows/pipelines, creates packages, sets up
monorepo, shares code between apps, runs changed/affected packages, debugs cache,
or has apps/packages directories.
npx claudepluginhub ulpi-io/plugin-marketplace --plugin antfu