antfu
Skill by antfu
Provides Anthony Fu's opinionated coding conventions and tooling choices for JavaScript and TypeScript projects. Use it when setting up new projects, configuring linting, monorepos, or library publishing.
Install antfu
Built from the published package, never by AI.
git clone --depth 1 https://github.com/antfu/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/antfu ~/.claude/skills/antfuRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/antfu/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/antfu ~/.gemini/antigravity-cli/skills/antfuAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill sets out Anthony Fu's opinionated coding practices and tooling choices for JavaScript and TypeScript projects. It covers code organization, runtime environment comments, TypeScript return types, explicit imports, and Vitest test file conventions. It also lists the @antfu/ni command set, a recommended ESLint config with antislop enabled, Knip for unused code, a ci script gate, git hooks, npm Trusted Publishing, and pnpm catalogs.
The skill points to antfu/starter-ts as a reference template for new projects and links to reference files on ESLint, project setup, app development, library development, and monorepos. It is aimed at developers and coding agents who want to follow these conventions when scaffolding or maintaining a project.
Written from the project's SKILL.md and checked against it.
What it can do
- Project scaffoldingMirrors the antfu/starter-ts template for package.json scripts, ESLint, Knip, tsdown config and workflows.
- Coding conventionsGuides code organization, explicit imports, relative paths, return types and comment style.
- ESLint setupShows an eslint.config.js using @antfu/eslint-config with antislop enabled.
- Knip checksFinds unused files, exports and dependencies and recommends deleting what Knip reports.
- CI gateDefines a ci script that runs lint, typecheck, Knip and tests in one command.
- Git hooksSets up simple-git-hooks and nano-staged with a pre-commit run of the ci gate.
- Agent skills installUses skills-npm to link agent skills shipped inside installed npm packages.
- npm publishingRecommends npm Trusted Publishing over NPM_TOKEN secrets, with releases from v* tags.
- Version lookupUses fast-npm-meta to check the latest package versions without downloading full metadata.
- pnpm catalogsRecommends named catalogs such as prod, inlined, dev and frontend in pnpm-workspace.yaml.
What you need
- pnpm
- GitHub Actions for the release workflow
Try asking
- Scaffold a new TypeScript project using the antfu conventions
- Set up ESLint with antislop enabled for this library
- Add Knip and a ci script to check unused exports
Good to know
- Antislop requires eslint-plugin-slop and eslint-plugin-sonarjs as dev dependencies.
- Path aliases are used only when already configured in the project.
- The default pnpm catalog should be avoided.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/antfu/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/antfu-eslint-config.md7 KB -
references/app-development.md3 KB -
references/library-development.md5 KB -
references/monorepo.md3 KB
Show all 6 files
-
references/setting-up.md3 KB
Alternatives to antfu
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
antfu: common questions
Does this skill require path aliases?
No. It says to use relative imports and to add path aliases only when they are already configured in the project.
What does antislop do?
It flags redundant or duplicated AI-style code and bans explicit any. It requires eslint-plugin-slop and eslint-plugin-sonarjs as dev dependencies.
How does npm publishing work with this skill?
It recommends npm Trusted Publishing over NPM_TOKEN secrets. Releases run on CI from a v* tag through release.yml with id-token write permission.
How do I install antfu?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is antfu free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is antfu safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to antfu?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
