antfu Skill: Anthony Fu's JavaScript and TypeScript Conventions for Your Agent
Makes your agent set up and write JavaScript and TypeScript projects the way Anthony Fu does, from ESLint and pnpm to tests and release.
- Installs
- 17K
- on skills.sh
- Stars
- 6K
- on GitHub
- Files
- 5
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
The skill gives the agent a fixed set of preferences: split types and constants into their own files, explicit imports, Vitest tests next to the source, the @antfu/eslint-config linter, Knip for unused code, pnpm catalogs and one ci script that must pass before every commit. It loads when you start a new project, set up linting or a monorepo, publish a library, or mention Anthony Fu's preferences.
It is opinionated. If you do not want pnpm, those choices and the commit gate, pick another skill. The author's README calls the repo a proof of concept and says he has not fully tested how well the skills perform.
Good for
- Developers starting a new TypeScript app or library who want a ready layout
- Teams that already use antfu's ESLint config, pnpm or Vitest
- Maintainers setting up monorepos or npm releases with trusted publishing
Install antfu
Claude Code
- 1
Copy this prompt.
Install the antfu skill in Claude Code. Run this command: npx skills add https://github.com/antfu/skills --skill antfu Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- Coding Practices
- Code Organization
- Runtime Environment
- TypeScript
- Explicitness
- Comments
- Testing (Vitest)
- Tooling Choices
- @antfu/ni Commands
- Checking npm Package Versions
- TypeScript Config
- ESLint Setup
- Knip
- Scripts and the ci Gate
- Git Hooks
- skills-npm
Key facts
- Author
- Anthony Fu
- License
- MIT (repo README)
- Installs on skills.sh
- 17,036 (Nov 2, 2026)
- GitHub stars
- 6,032 (Nov 2, 2026), whole repo
- Last commit
- Oct 30, 2026 (repo)
- Skill version
- 2026.09.30 in the SKILL.md frontmatter
- Template it mirrors
- antfu/starter-ts
What it includes
One purpose per file, types and constants in their own files, explicit return types
Rules for code organization, runtime-agnostic code, comments that explain why, and Vitest layout (foo.test.ts next to foo.ts).
Coding practicesExplicit imports, no new path aliases, no auto-imports in new projects
Tells the agent to prefer traceable code over framework magic.
Explicit code@antfu/ni commands, fast-npm-meta version lookup, strict tsconfig
Uses ni, nr, nu and nlx instead of raw package manager commands. Runs fast-npm-meta through nlx to look up the latest package version.
Runs code ·
Tooling choicesEnable @antfu/eslint-config with antislop and run Knip
Sets up eslint.config.js with antfu(), always turns antislop on (needs eslint-plugin-slop and eslint-plugin-sonarjs as dev dependencies), and adds a knip.json.
Write ·
ESLint and KnipRun lint --fix and a ci script before every commit
Defines lint, typecheck, knip and test scripts chained into ci, and says never to commit with a failing ci.
Runs code ·
ci gatesimple-git-hooks, nano-staged and skills-npm in prepare
Adds a pre-commit hook that runs the ci gate and a prepare script that also links agent skills from npm packages.
Runs code ·
Git hooks and skills-npmnpm Trusted Publishing from a v* tag via CI
Prefers OIDC trusted publishing over NPM_TOKEN secrets; the bump command only bumps, tags and pushes.
Write ·
PublishingNamed catalogs: prod, inlined, dev, frontend
Version management in pnpm-workspace.yaml; avoids the default catalog.
Write ·
pnpm catalogsFive bundled guides
ESLint config, project setup, app development (Vue, Nuxt, UnoCSS), library development (tsdown, publint) and monorepo (pnpm workspaces, Turborepo).
References
From the official docs
Permissions
Low risk
The skill makes the agent edit project config, add git hooks and run npm packages. Review the changes to package.json and the hooks before you commit.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It adds a pre-commit hook and a prepare script
The skill sets up simple-git-hooks so every commit runs your full ci script, and a prepare script that runs skills-npm. Check package.json and .githooks after the agent sets up a project. github.com
It runs packages through nlx
The version lookup runs fast-npm-meta through nlx, which downloads and runs an npm package. Dev dependencies such as eslint-plugin-slop are added too. github.com
Technical details
| Talks to | npm registry lookups through fast-npm-meta |
|---|
Questions
What does the antfu skill do?
It makes your agent follow Anthony Fu's conventions for JavaScript and TypeScript projects. Those cover file layout, ESLint, Vitest, Knip, pnpm catalogs, git hooks and npm publishing. It starts when you set up a project or mention his preferences.
How do I install it?
Use the install box above. The skill is one folder with five reference guides and needs no other skill. The author also recommends his @antfu/skills pack through skills-npm, which adds curated skills from other authors.
Do I need pnpm and Anthony Fu's ESLint config?
The skill is written around both. SKILL.md tells the agent to use ni and nr commands, pnpm catalogs and @antfu/eslint-config (with the pnpm option on in the sample config). It does not say what the agent should do when your project uses npm or another linter, so expect to tell it whether to switch.
Is it safe?
It is mostly instructions, but it tells the agent to run package commands and edit project files. That includes dev dependencies, a pre-commit hook that runs your full ci script, and a prepare script. Review the diff before you commit.
Does it work in the Claude app or Codex?
The README says the skills follow the Agent Skills format and installs them with the skills CLI. It names no specific client list. The Claude app takes a ZIP of the folder; Codex reads .agents/skills.
How is it different from antfu-query or the vue skill?
antfu-query is a separate skill in the same repo that interviews you about a plan. The vue, nuxt, vite and vitest skills are generated from official docs. This one holds Anthony Fu's own opinions and tooling choices.
Information
updated Nov 2, 2026
- Repository
- antfu/skills
- Folder
skills/antfu
Sources
Docs, issue trackers and discussions this page is built from.
Show all 2Hide
- antfu SKILL.md · github.com
- antfu/skills README · github.com