Uses @ant-design/cli to query antd APIs/props/tokens/demos, write components, debug issues, lint projects, analyze usage, and guide v4-v5-v6 migrations.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-2 --plugin ant-design-antd-skillThis skill is limited to using the following tools:
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.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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.
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.
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.
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
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.
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.
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
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
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
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
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:
antd info Button shows wrong props, missing props, or props from the wrong version)--format json returns non-JSON, --version X is ignored)antd demo Button returns no demos, antd token Button returns no tokens for v5+)antd list shows a component but antd info says it doesn't exist)Workflow:
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 output includes props that don't exist in that version" \
--steps "1. Run: antd info Button --version 5.12.0 --format json" \
--expected "Props matching antd 5.12.0 Button API" \
--actual "Props include 'classNames' which was added in 5.16.0" \
--format json
antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
--description "..." \
--steps "..." \
--expected "..." \
--actual "..." \
--submit
Key principle: You are a quality feedback loop for the CLI. Don't silently work around CLI issues — report them so they get fixed. Always confirm with the user before submitting.
If working in an IDE that supports MCP (Claude Desktop, Cursor, etc.), the CLI can also run as an MCP server, exposing all knowledge-query tools directly:
{
"mcpServers": {
"antd": {
"command": "antd",
"args": ["mcp", "--version", "5.20.0"]
}
}
}
This provides 7 tools (antd_list, antd_info, antd_doc, antd_demo, antd_token, antd_semantic, antd_changelog) and 2 prompts (antd-expert, antd-page-generator) via MCP protocol.
| Flag | Purpose |
|---|---|
--format json | Structured output — always use this |
--version <v> | Target a specific antd version (e.g. 5.20.0) |
--lang zh | Chinese output (default: en) |
--detail | Include extra fields (description, since, deprecated, FAQ) |
antd info first.--version 4.24.0. The CLI auto-detects from node_modules if no flag is given.--format json — Every command supports it. Parse the JSON output rather than regex-matching text output.antd changelog <v1> <v2> and antd migrate before advising on version upgrades.antd lint on the changed files to catch deprecated or problematic usage.antd bug to report it. Always preview first, get user confirmation, then submit.antd command crashes, returns wrong data, or behaves inconsistently, proactively use antd bug-cli to report it. You are the quality feedback loop for the CLI — don't silently work around issues.