Skip to content
Frontend
Skill

/antd

Use when the user's task involves Ant Design (antd) — writing antd components, debugging antd issues, querying antd APIs/props/tokens/demos, migrating between antd versions, or analyzing antd usage in a project. Triggers on antd-related code, imports from 'antd', or explicit

BOOST
From plugin
antd-skill
1362 skills
Install
$ npx -y skills add ant-design/antd-skill --skill antd --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/antd

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use when the user's task involves Ant Design (antd) — writing antd components, debugging antd issues, querying antd APIs/props/tokens/demos, migrating between antd versions, or analyzing antd usage in a project. Triggers on antd-related code, imports from 'antd', or explicit

SKILL.md

antd.SKILL.md
name: antd
description: >
  Use when the user's task involves Ant Design (antd) — writing antd components,
  debugging antd issues, querying antd APIs/props/tokens/demos, migrating between
  antd versions, or analyzing antd usage in a project. Triggers on antd-related
  code, imports from 'antd', or explicit antd questions.
allowed-tools:
  - Bash(antd *)
  - Bash(antd bug*)
  - Bash(antd bug-cli*)
  - Bash(npm install -g @ant-design/cli*)
  - Bash(which antd)

Ant Design CLI

You have access to `@ant-design/cli` — a local CLI tool with bundled antd metadata for v4/v5/v6. Use it to query component knowledge, analyze projects, and guide migrations. All data is offline, no network needed.

Setup

Before first use, check if the CLI is installed. If not, install it automatically:

which antd || npm install -g @ant-design/cli

After running any command, if the output contains an "Update available" notice, run `npm install -g @ant-design/cli` to update before continuing.

**Always use `--format json` for structured output you can parse programmatically.**

Scenarios

1. Writing antd component code

Before writing any antd component code, look up its API first — don't rely on memory.

# Check what props are available
antd info Button --format json

# Get a working demo as starting point
antd demo Button basic --format json

# Check semantic classNames/styles for custom styling
antd semantic Button --format json

# Check component-level design tokens for theming
antd token Button --format json

**Workflow:** `antd info` → understand props → `antd demo` → grab a working example → write code.

2. Looking up full documentation

When you need comprehensive component docs (not just props):

antd doc Table --format json        # full markdown docs for Table
antd doc Table --lang zh            # Chinese docs

3. Debugging antd issues

When code isn't working as expected or the user reports an antd bug:

# Check if the prop exists for the user's antd version
antd info Select --version 5.12.0 --format json

# Check if the prop is deprecated
antd lint ./src/components/MyForm.tsx --format json

# Diagnose project-level configuration issues
antd doctor --format json

**Workflow:** `antd doctor` → check environment → `antd info --version X` → verify API against the user's exact version → `antd lint` → find deprecated or incorrect usage.

4. Migrating between versions

When the user wants to upgrade antd (e.g., v4 → v5):

# Get full migration checklist
antd migrate 4 5 --format json

# Check migration for a specific component
antd migrate 4 5 --component Select --format json

# See what changed between two versions
antd changelog 4.24.0 5.0.0 --format json

# See changes for a specific component
antd changelog 4.24.0 5.0.0 Select --format json

**Workflow:** `antd migrate` → get full checklist → `antd changelog <v1> <v2>` → understand breaking changes → apply fixes → `antd lint` → verify no deprecated usage remains.

5. Analyzing project antd usage

When the user wants to understand how antd is used in their project:

# Scan component usage statistics
antd usage ./src --format json

# Filter to a specific component
antd usage ./src --filter Form --format json

# Lint for best practice violations
antd lint ./src --format json

# Check only specific rule categories
antd lint ./src --only deprecated --format json
antd lint ./src --only a11y --format json
antd lint ./src --only performance --format json

6. Checking changelogs and version history

When the user asks about what changed in a version:

# Specific version changelog
antd changelog 5.22.0 --format json

# Version range (both ends inclusive)
antd changelog 5.21.0..5.24.0 --format json

7. Exploring available components

When the user is choosing which component to use:

# List all components with categories
antd list --format json

# List components for a specific antd version
antd list --version 5.0.0 --format json

8. Reporting antd bugs

When you encounter a confirmed antd component bug that can't be resolved locally:

# Step 1: Preview for user review
antd bug --title "DatePicker crashes when selecting date" \
  --reproduction "https://codesandbox.io/s/xxx" \
  --steps "1. Open DatePicker 2. Click a date" \
  --expected "Date is selected" \
  --actual "Component crashes with error" \
  --format json

# Step 2: Show to user, ask for confirmation

# Step 3: Submit after user confirms
antd bug --title "DatePicker crashes when selecting date" \
  --reproduction "https://codesandbox.io/s/xxx" \
  --steps "1. Open DatePicker 2. Click a date" \
  --expected "Date is selected" \
  --actual "Component crashes with error" \
  --submit

9. Auto-reporting CLI issues

**IMPORTANT: Whenever you use any `antd` CLI command and notice something wrong, you should proactively initiate a bug report using `antd bug-cli`.**

Trigger conditions — report a CLI bug when you observe any of these:

  • A command **crashes or exits with an unexpected error**
  • A command **returns clearly incorrect data** (e.g. `antd info Button` shows wrong props, missing props, or props from the wrong version)
  • A command's **output doesn't match its documented behavior** (e.g. `--format json` returns non-JSON, `--version X` is ignored)
  • A command **returns empty or missing data** when it shouldn't (e.g. `antd demo Button` returns no demos, `antd token Button` returns no tokens for v5+)
  • **Inconsistencies between commands** (e.g. `antd list` shows a component but `antd info` says it doesn't exist)

**Workflow:** 1. You notice something wrong while using the CLI 2. Gather evidence: the exact command you ran, what was returned, and what you expected 3. Preview the bug report for the user:

antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
  --description "When querying Button props for version 5.12.0, the o
Read more
Ships withantd-skill

A curated collection of Agent Skills for the Ant Design ecosystem.

Get the whole plugin
Stats
136
Stars
12
Forks
Quiet
Maintenance
MIT
License
7mo ago
Last commit
8mo ago
Created
1d ago
Added

Repo: ant-design/antd-skill

Other skills on antd-skill.