antfu-coding-style
БесплатноБез исполняемых скриптовНе проверенOpinionated coding style and tooling preferences by Anthony Fu.
от Dokhacgiakhoa★ 513 звёзд на GitHubОб этом скилле
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
- Bad:
- Return Types: Explicitly type return values for library limits (public API), infer for internal functions.
- No Enums: Use
const assertionobject 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-> installnr dev-> run devnu-> upgrade
- Testing:
Vitest(Fast, Jest compatible, Native ESM).- Naming:
*.test.ts. - Verification: Use
toMatchSnapshot()sparingly, prefertoMatchInlineSnapshot().
- Naming:
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">. - ReactivityTransform: Previously experimental, now prefer
refwith.valueor explicit.valuemacros if configured. - Structure:
definePropsanddefineEmitsat the top.watch/computedgrouped together.
The "Antfu" Vibe:
- Delete dead code immediately.
- If it can be automated, write a script.
- Aesthetics matter: Code should look beautiful.
Установить antfu-coding-style в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл antfu-coding-style?
Opinionated coding style and tooling preferences by Anthony Fu.
Как установить скилл antfu-coding-style?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл antfu-coding-style запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic