Agent skill

Antfu

by oyjt in oyjt/uniapp-vue3-template

Anthony Fu's {Opinionated} preferences and best practices for web development

MITAuto-check passedDevelopment

Install Antfu

skills CLI
$ npx skills add oyjt/uniapp-vue3-template --skill antfu -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oyjt/uniapp-vue3-template antfu --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oyjt/uniapp-vue3-template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.trae/skills/antfu .claude/skills/antfu && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
antfu
GitHub stars
627
Token cost
~1.3k tokens
SKILL.md length
432 words
Files
8 (incl. references)
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Anthony Fu's {Opinionated} preferences and best practices for web development

  • Tasks that involve Linting and formatting
  • SKILL.md covers Quick Summary, Core Stack, Code Quality and Project Setup, plus 1 more section
  • Calls pnpm
  • Tasks that involve Unit testing

What it does

Antfu is an agent skill from oyjt/uniapp-vue3-template. Anthony Fu's {Opinionated} preferences and best practices for web development

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/antfu-eslint-config.md`, `references/app-development.md` and `references/github-actions.md`).

It sits in Development, covering Linting and formatting and Unit testing. It works with ESLint, pnpm, TypeScript and Git. The repository describes itself as: 使用uniapp+vite+vue3+typescript+uview-plus+unocss 搭建的适合团队协作的快速开发模版. The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting
  • Tasks that involve Unit testing

Example prompts

  • “/antfu”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 4d7f307. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Antfu loads about 1.3k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 21 tokens; SKILL.md has 432 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oyjt/uniapp-vue3-template at commit 4d7f307, republished under its MIT licence (© oyjt). 432 words, ~1,343 tokens.

Download SKILL.mdSave it as .claude/skills/antfu/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
antfu
description
Anthony Fu's {Opinionated} preferences and best practices for web development
metadata.author
Anthony Fu
metadata.version
2026.1.28

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

CategoryPreference
Package Managerpnpm
LanguageTypeScript (strict mode)
Module SystemESM ("type": "module")
Linting & Formatting@antfu/eslint-config (no Prettier)
TestingVitest
Git Hookssimple-git-hooks + lint-staged
DocumentationVitePress (in docs/)

Core Stack

Package Manager (pnpm)

Use pnpm as the package manager.

For monorepo setups, use pnpm workspaces:

yaml
# pnpm-workspace.yaml
packages:
  - 'packages/*'

Use pnpm named catalogs in pnpm-workspace.yaml to manage dependency versions:

CatalogPurpose
prodProduction dependencies
inlinedDependencies inlined by bundler
devDevelopment tools (linter, bundler, testing, dev-server)
frontendFrontend 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.

CommandDescription
niInstall dependencies
ni <pkg>Add dependency
ni -D <pkg>Add dev dependency
nr <script>Run script
nuUpgrade dependencies
nun <pkg>Uninstall dependency
nciClean 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.

json
{
  "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:

js
// @ts-check
import antfu from '@antfu/eslint-config'

export default antfu()

Add script to package.json:

json
{
  "scripts": {
    "lint": "eslint ."
  }
}

When getting linting errors, try to fix them with nr lint --fix. Don't add lint:fix script.

Show full SKILL.md (177 more words)Show less
Git Hooks (simple-git-hooks + lint-staged)

Use simple-git-hooks with lint-staged for pre-commit linting:

json
{
  "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.

json
{
  "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 describe and it API (not test)
  • Use expect API for assertions
  • Use assert only for TypeScript null assertions
  • Use toMatchSnapshot for complex output assertions
  • Use toMatchFileSnapshot with 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:

json
{
  "scripts": {
    "release": "bumpp -r"
  }
}
Documentation (VitePress)

Use VitePress for documentation. Place docs under docs/ directory.

docs/
├── .vitepress/
│   └── config.ts
├── index.md
└── guide/
    └── getting-started.md

Add script to package.json:

json
{
  "scripts": {
    "docs:dev": "vitepress dev docs",
    "docs:build": "vitepress build docs"
  }
}

References

Project Setup
TopicDescriptionReference
@antfu/eslint-configESLint flat config for formatting and lintingantfu-eslint-config
GitHub ActionsPreferred workflows using sxzz/workflowsgithub-actions
.gitignorePreferred .gitignore for JS/TS projectsgitignore
VS Code ExtensionsRecommended extensions for developmentvscode-extensions
Development
TopicDescriptionReference
App DevelopmentPreferences for Vue/Vite/Nuxt/UnoCSS web applicationsapp-development
Library DevelopmentPreferences for bundling and publishing TypeScript librarieslibrary-development
Monorepopnpm workspaces, centralized alias, Turborepomonorepo

© oyjt, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in .trae/skills/antfu of oyjt/uniapp-vue3-template.

  • SKILL.md
  • references/antfu-eslint-config.md
  • references/app-development.md
  • references/github-actions.md
  • references/gitignore.md
  • references/library-development.md
  • references/monorepo.md
  • references/vscode-extensions.md

Open the folder on GitHubat commit 4d7f307

Compare with similar skills

Antfu next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Antfu compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Antfu this skilloyjt/uniapp-vue3-template627—~1.3kAutomated safety check: PassMIT
Create Saleor Packagesaleor/apps162—~608Automated safety check: PassCustom licence
npm Packagejwynia/agent-skills169—~2.1kAutomated safety check: PassNone
Npx CLIjwynia/agent-skills169—~2.4kAutomated safety check: PassNone
Implementing Lint Rulesflint-fyi/flint312—~857Automated safety check: PassMIT
Igniteui Angular LintingIgniteUI/igniteui-angular599—~614Automated safety check: PassCustom licence

Similar skills

  • Scaffold a new shared package in the saleor-apps monorepo under ./packages/.

    162 GitHub stars~608 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • npm Package

    jwynia/agent-skills

    Build and publish npm packages using Bun as the primary toolchain with npm-compatible output.

    169 GitHub stars~2.1k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Npx CLI

    jwynia/agent-skills

    Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.

    169 GitHub stars~2.4k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Implements ESLint-style lint rules with proper AST handling, targeted reporting, and comprehensive unit tests.

    312 GitHub stars~857 tokensUpdated today
    DevelopmentAuto-check passed
  • Igniteui Angular Linting

    IgniteUI/igniteui-angular

    Quick-reference for linting the core Ignite UI for Angular library.

    599 GitHub stars~614 tokensUpdated today
    DevelopmentAuto-check passed
  • Add Plugin Rule

    eslint-config/airbnb-extended

    Fix the "<Plugin Updated with <rule" build error from script/checkUpdates.ts by adding a new or deprecated plugin rule to the right rules/ file.

    130 GitHub stars~646 tokensUpdated today
    DevelopmentAuto-check passed

More from oyjt/uniapp-vue3-template

  • Vite

    oyjt/uniapp-vue3-template

    Vite next-generation frontend build tool with fast HMR and optimized builds.

    627 GitHub starsUsed in 1 repo~780 tokens
    Auto-check: notes
  • Vue

    oyjt/uniapp-vue3-template

    Vue.js progressive JavaScript framework. An agent skill from oyjt/uniapp-vue3-template.

    627 GitHub starsUsed in 1 repo~783 tokens
    Auto-check passed
  • Vue Best Practices

    oyjt/uniapp-vue3-template

    Vue 3 and Vue.js best practices for TypeScript, vue-tsc, and Volar.

    627 GitHub starsUsed in 3 repos~667 tokens
    Auto-check passed

Categories

Questions about Antfu

What does Antfu do?

Anthony Fu's {Opinionated} preferences and best practices for web development. Antfu is an agent skill from oyjt/uniapp-vue3-template.

When should I use Antfu?

Antfu fits situations like: tasks that involve Linting and formatting; tasks that involve Unit testing.

How do I install Antfu in Claude Code?

Run `npx skills add oyjt/uniapp-vue3-template --skill antfu -a claude-code`. Or copy the skill folder (.trae/skills/antfu in oyjt/uniapp-vue3-template) into .claude/skills/antfu in your project. Claude Code loads it when a task matches its description.

How do I install Antfu in Codex?

Run `npx skills add oyjt/uniapp-vue3-template --skill antfu -a codex`. Or copy the skill folder (.trae/skills/antfu in oyjt/uniapp-vue3-template) into .agents/skills/antfu in your project. Codex loads it when a task matches its description.

Can I use Antfu in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oyjt/uniapp-vue3-template --skill antfu -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/antfu, .gemini/skills/antfu, .github/skills/antfu and .opencode/skills/antfu in your project.

What does Antfu need to run?

Going by SKILL.md and its folder, Antfu needs the command-line tools its instructions call (pnpm). Our summary lists: Node.js.

Does Antfu access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Antfu safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Antfu use?

Antfu is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Antfu use?

About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.

What are the alternatives to Antfu?

Skills that share tags, products or a category with Antfu: Create Saleor Package (saleor/apps, 162 stars), npm Package (jwynia/agent-skills, 169 stars), Npx CLI (jwynia/agent-skills, 169 stars) and Implementing Lint Rules (flint-fyi/flint, 312 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Antfu?

oyjt (a GitHub user) maintains it in oyjt/uniapp-vue3-template, which has 627 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on June 4, 2026.

Source: oyjt/uniapp-vue3-template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.