Token导航 LogoToken导航TokenDH.com
运维和基础设施操作浏览器github未标认证来源可访问clear审计通过

antfuantfu 测试

Agent Skill

antfu 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

214,032

周安装

9,081

GitHub Stars

4,781

下载量

74,984
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:antfu(antfu 测试)
来源仓库:https://github.com/antfu/skills
仓库路径:skills/antfu
安装命令:
npx skills add https://github.com/antfu/skills --skill antfu
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/antfu/skills --skill antfu

简介

针对现代项目的固定 TypeScript/JavaScript 约定和工具设置。

  • 涵盖代码组织(单一责任、类型分离、常量提取)、运行时实践(具有环境标记的同构代码)和显式 TypeScript 类型
  • 通过 @antfu/eslint-config 包含 ESLint 配置
  • 、Vitest 测试模式和带有 lint-staged 的 Git 挂钩,用于自动代码格式化
  • 提供@antfu/ni
  • 用于跨包管理器进行依赖项管理的命令快捷方式,以及用于 monorepos 的基于 pnpm 目录的版本管理
  • 参考 ESLint 设置、项目初始化、Vue/Nuxt 应用程序开发、库发布和 monorepo 模式的详细指南

SKILL.md

name
antfu
description
Anthony Fu's {Opinionated} preferences and best practices for web development
metadata
author
Anthony Fu
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:

# 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.

{
  "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.tsfoo.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:

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

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.68%
按下载量换算21,505

Cursor

23.51%
按下载量换算17,629

OpenCode

19.62%
按下载量换算14,712

Gemini CLI

11.57%
按下载量换算8,676

Antigravity

7.38%
按下载量换算5,534

trae

3.53%
按下载量换算2,647

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills