antfu-coding-style

Enforce Anthony Fu's opinionated coding style and tooling preferences.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/ntuan2502/piggy --skill antfu-coding-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: antfu-coding-style
Source: https://github.com/ntuan2502/piggy/tree/main/.agent/skills/antfu-coding-style
Command: npx skills add https://github.com/ntuan2502/piggy --skill antfu-coding-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a consistent, opinionated coding style and tooling preference, aiming to maximize developer experience through minimalism and smart defaults, ensuring code "works out of the box."

Core Features & Use Cases

  • Code Organization: Promotes single responsibility, clear export strategies, and constant extraction.
  • TypeScript Preferences: Favors implicit typing, explicit return types for public APIs, and avoids enums in favor of const assertions or string unions.
  • Tooling Stack: Recommends pnpm for package management, ni for agnostic running, and Vitest for fast testing.
  • Styling: Advocates for UnoCSS with Attributify for atomic CSS.
  • Vue.js Specifics: Encourages <script setup>, explicit .value usage, and a structured component layout.

Quick Start

Apply the Antfu coding style guidelines to the current project's codebase.

Frequently Asked Questions about antfu-coding-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the Antfu coding style for Vue.js and TypeScript projects?

The Antfu coding style is an opinionated convention for Vue.js and TypeScript projects that maximizes developer experience through minimalism, smart defaults, and specific tooling choices like pnpm and Vitest.

How do I configure UnoCSS with Attributify for atomic CSS styling?

To configure UnoCSS with Attributify, you apply atomic CSS classes directly as attributes on HTML elements, adhering to the Antfu styling guidelines that promote minimalism and developer experience out of the box.

Does the Antfu coding style recommend using TypeScript enums?

No, the Antfu TypeScript preferences avoid enums entirely, favoring const assertions or string unions instead to ensure type safety while maintaining minimalism and clear code organization.

Can I use pnpm and ni for package management in a Vue.js project following this style?

Yes, the Antfu tooling stack explicitly recommends pnpm for package management and ni for agnostic running, ensuring Vue.js projects work out of the box with smart defaults.

What are the Vue.js specific patterns for component layout in this coding style?

Vue.js specific patterns include using the script setup syntax, explicit .value usage for refs, and a structured component layout that promotes single responsibility and clear export strategies.

How do I apply Vitest for fast testing within this TypeScript tooling stack?

You apply Vitest for fast testing by integrating it into the recommended TypeScript tooling stack, leveraging pnpm for package management and ni for agnostic running to execute tests efficiently.