antfu
Skill628 starsChanged 34 days agoMITView on GitHub
Anthony Fu's {Opinionated} preferences and best practices for web development
- Installs packages
11 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- antfu/skillstheir own version, first seen Nov 10, 2026
- Contentrain/studioedited, first seen Nov 8, 2026
- KIMJINWOO4/vue-skillstheir own version, first seen Oct 15, 2026
- rockcookies/skillstheir own version, first seen Oct 13, 2026
- liangmiQwQ/skillstheir own version, first seen Oct 11, 2026
- victorgarciaesgi/regleedited, first seen Oct 8, 2026
Used with
Projects with it also use antfu-design, nitro and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
wltn7810-dotcomSkillantfu-design
antfu-style design conventions, broadened. UnoCSS-first, class-based semantic tokens with dual light/dark for tooling and devtools UIs, plus design-read, anti-slop, and micro-interaction polish for landing pages and product surfaces. Use when building or refactoring any interface with UnoCSS.
Also in 3 projects that use this
SentrySkillnitro
Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.
Also in 3 projects that use this
GoogleSkillsetup-matt-pocock-skills
Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
Also in 3 projects that use this
GoogleSkillimprove-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Also in 4 projects that use this
MicrosoftSkillcaveman
Ultra-compressed response style that reduces output token count while preserving technical accuracy, with intensity levels and auto-clarity safety rules
Also in 3 projects that use this
MicrosoftSkillgrill-with-docs
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
Also in 3 projects that use this
- +1 more from google
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- victorgarciaesgi/regle★ 50821% same
- JetBrains/skills★ 38620% same
- Contentrain/studio★ 421% same
- huangzida/skills★ 221% same
- ElyzeSolutions/skills★ 114% same
- heamlk/Python-Skill★ 121% same
- wltn7810-dotcom/claude-skill★ 014% same
Wrote their own version · 4
- antfu/skills★ 6.1ksame name
- KIMJINWOO4/vue-skills★ 28same name
- liangmiQwQ/skills★ 1same name
- rockcookies/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- piniaSkill
- pnpmSkill
- unocssSkill
- uview-plusSkill
- viteSkill
- vue-best-practicesSkill
- vueSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 3 are distinctive, and 15 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Use pnpm as the package manager.
- Very specific: line 42
Use pnpm named catalogs in pnpm-workspace.yaml to manage dependency versions:
- Very specific: line 55
Use @antfu/ni for unified package manager commands.
- Distinctive: line 72
Always use TypeScript with strict mode enabled.
- Very specific: line 92
Always work in ESM mode. Set "type": "module" in package.json.
- Very specific: line 100
Use @antfu/eslint-config for both formatting and linting.
- Very specific: line 102
Create eslint.config.js with // @ts-check comment:
- Very specific: line 111
Add script to package.json:
- Very specific: line 121
When getting linting errors, try to fix them with nr lint --fix.
- Very specific: line 125
Use simple-git-hooks with lint-staged for pre-commit linting:
- Distinctive: line 143
Use Vitest for unit testing.
- Very specific: line 155
Place test files next to source files: foo.ts → foo.test.ts (same directory)
- Very specific: line 157
Use describe and it API (not test)
- Very specific: line 158
Use expect API for assertions
- Very specific: line 159
Use assert only for TypeScript null assertions
- Very specific: line 160
Use toMatchSnapshot for complex output assertions
- Very specific: line 161
Use toMatchFileSnapshot with explicit file path and extension for language-specific output (exclude those files from linting)
- Very specific: line 181
Use VitePress for documentation.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Anthony Fu's Preferences
This skill covers Anthony Fu's preferred tooling, configurations, and best practices for web development. This skill is opinionated.
Quick Summary
| Category | Preference |
| Package Manager | pnpm |
| Language | TypeScript (strict mode) |
| Module System | ESM ("type": "module") |
| Linting & Formatting | @antfu/eslint-config (no Prettier) |
| Testing | Vitest |
| Git Hooks | simple-git-hooks + lint-staged |
| Documentation | VitePress (in docs/) |
Core Stack
Package Manager (pnpm)
Use pnpm as the package manager.
For monorepo setups, use pnpm workspaces:
# pnpm-workspace.yaml
packages:
- 'packages/*'Use pnpm named catalogs in pnpm-workspace.yaml to manage dependency versions:
| Catalog | Purpose |
prod | Production dependencies |
inlined | Dependencies inlined by bundler |
dev | Development tools (linter, bundler, testing, dev-server) |
frontend | Frontend libraries bundled into frontend |
Catalog names are not limited to the above and can be adjusted based on needs. Avoid using default catalog.
@antfu/ni
Use @antfu/ni for unified package manager commands. It auto-detects the package manager (pnpm/npm/yarn/bun) based on lockfile.
| Command | Description |
ni | Install dependencies |
ni <pkg> | Add dependency |
ni -D <pkg> | Add dev dependency |
nr <script> | Run script |
nu | Upgrade dependencies |
nun <pkg> | Uninstall dependency |
nci | Clean install (like pnpm i --frozen-lockfile) |
nlx <pkg> | Execute package (like npx) |
Install globally with pnpm i -g @antfu/ni if the commands are not found.
TypeScript (Strict Mode)
Always use TypeScript with strict mode enabled.
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
}ESM (ECMAScript Modules)
Always work in ESM mode. Set "type": "module" in package.json.
Code Quality
ESLint (@antfu/eslint-config)
Use @antfu/eslint-config for both formatting and linting. This eliminates the need for Prettier.
Create eslint.config.js with // @ts-check comment:
// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu()Add script to package.json:
{
"scripts": {
"lint": "eslint ."
}
}When getting linting errors, try to fix them with nr lint --fix. Don't add lint:fix script.
Git Hooks (simple-git-hooks + lint-staged)
Use simple-git-hooks with lint-staged for pre-commit linting:
{
"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"
}
}Unit Testing (Vitest)
Use Vitest for unit testing.
{
"scripts": {
"test": "vitest"
}
}Conventions:
- Place test files next to source files:
foo.ts→foo.test.ts(same directory) - High-level tests go in
tests/directory in each package - Use
describeanditAPI (nottest) - Use
expectAPI for assertions - Use
assertonly for TypeScript null assertions - Use
toMatchSnapshotfor complex output assertions - Use
toMatchFileSnapshotwith explicit file path and extension for language-specific output (exclude those files from linting)
Project Setup
Publishing (Library Projects)
For library projects, publish through GitHub Releases triggered by bumpp:
{
"scripts": {
"release": "bumpp -r"
}
}Documentation (VitePress)
Use VitePress for documentation. Place docs under docs/ directory.
docs/
├── .vitepress/
│ └── config.ts
├── index.md
└── guide/
└── getting-started.mdAdd script to package.json:
{
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs"
}
}References
Project Setup
| Topic | Description | Reference |
| @antfu/eslint-config | ESLint flat config for formatting and linting | antfu-eslint-config |
| GitHub Actions | Preferred workflows using sxzz/workflows | github-actions |
| .gitignore | Preferred .gitignore for JS/TS projects | gitignore |
| VS Code Extensions | Recommended extensions for development | vscode-extensions |
Development
| Topic | Description | Reference |
| App Development | Preferences for Vue/Vite/Nuxt/UnoCSS web applications | app-development |
| Library Development | Preferences for bundling and publishing TypeScript libraries | library-development |
| Monorepo | pnpm workspaces, centralized alias, Turborepo | monorepo |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

