Antfu Coding Style
Opinionated coding style and tooling preferences by Anthony Fu.
Install
npx skills add Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill antfu-coding-stylegit clone --depth 1 https://github.com/Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI.git /tmp/Agent-Skills-4-Vibe-Coding-CLI
mkdir -p ~/.claude/skills
cp -r /tmp/Agent-Skills-4-Vibe-Coding-CLI/.agent/skills/antfu-coding-style ~/.claude/skills/antfu-coding-stylePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Antfu Coding Style & Philosophy
> **Goal**: Maximal Developer Experience (DX) through minimalism and smart defaults. "Works out of the box."
## 1. Code Organization
- **Single Responsibility**: Keep files small. If you scroll too much, split it.
- **Export**: Use Named Exports for libraries, Default Exports for components.
- **Constants**: Extract magic strings/numbers to `constants.ts`.
## 2. TypeScript Preferences
- **Implicit over Explicit**: Let TS infer types when obvious.
- *Bad*: `const count: number = 0`
- *Good*: `const count = 0`
- **Return Types**: Explicitly type return values for library limits (public API), infer for internal functions.
- **No Enums**: Use `const assertion` object or String Unions.
- `type Mode = 'dark' | 'light'` > `enum Mode { ... }`
## 3. Tooling Stack
- **Package Manager**: `pnpm` (Fast, disk efficient).
- **Runner**: `ni` (NPM/Yarn/PNPM/Bun Agnostic runner).
- `ni` -> install
- `nr dev` -> run dev
- `nu` -> upgrade
- **Testing**: `Vitest` (Fast, Jest compatible, Native ESM).
- Naming: `*.test.ts`.
- Verification: Use `toMatchSnapshot()` sparingly, prefer `toMatchInlineSnapshot()`.
## 4. CSS / Styling
- **UnoCSS**: Atomic CSS engine.
- **Attributify**: Use attributes for styles to keep clean class strings.
- `<div text="red 4xl" hover="text-blue">` (Controversial but preferred by Antfu for clean template).
## 5. Vue.js Specifics
- **Script Setup**: `<script setup lang="ts">`.Details
- Skill name
antfu-coding-style- Repository
- Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI
- Path
.agent/skills/antfu-coding-style/SKILL.md- Repo updated
- 11 June 2026
FAQ
What does the Antfu Coding Style skill do?
Opinionated coding style and tooling preferences by Anthony Fu.
How do I install the Antfu Coding Style skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill antfu-coding-style. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Antfu Coding Style popular?
It lives in Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI, which has 514 GitHub stars and 146 forks.
Related skills
Address Github Comments
514Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI
Use when you need to address review or issue comments on an open GitHub Pull Request using the gh CLI.
Agent Memory MCP
514Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI
A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).
API Documentation Generator
514Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI
Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices
Backend Dev Guidelines
514Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI
Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod validation, unifiedConfig, Sentry error tracking, async safety, and testing discipline.
Agent Coding Standards
514Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
Beautiful Mermaid
302intellectronica/agent-skills
Render Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.