
Antd
Query offline Ant Design v4/v5/v6 metadata, demos, and migration guides while writing or upgrading antd UI in your app.
Overview
antd is an agent skill for the Build phase that drives @ant-design/cli to query component APIs, demos, tokens, project usage, and version migrations offline.
Install
npx skills add https://github.com/ant-design/ant-design-cli --skill antdWhat is this skill?
- Bundled offline metadata for antd v4, v5, and v6 plus migration guides for v3→v4, v4→v5, and v5→v6
- Look up props with antd info, starter demos with antd demo, and semantic classNames/styles before writing components
- Project analysis and antd bug/upgrade CLI flows with automatic global install via npm when antd is missing
- Skill mandates --format json for structured output the agent can parse
- Triggers on imports from 'antd', antd-related code, or explicit Ant Design questions
- Three documented migration guide paths: v3→v4, v4→v5, v5→v6
Adoption & trust: 1.9k installs on skills.sh; 220 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are coding or upgrading Ant Design components but cannot trust memorized props or migration steps across v4, v5, and v6.
Who is it for?
Solo builders on React + antd who want the agent to verify APIs and migration paths before every component change.
Skip if: Projects that do not use Ant Design, or pure CSS/Tailwind UIs with no imports from 'antd'.
When should I use this skill?
User task involves Ant Design—writing components, debugging antd, querying APIs/props/tokens/demos, migrating versions, or analyzing antd usage—or code imports from 'antd'.
What do I get? / Deliverables
After running antd CLI lookups with JSON output, you get accurate props, demos, and migration guidance grounded in bundled metadata before you edit React files.
- JSON CLI output with props, demos, or migration steps
- Guided antd component or upgrade edits informed by offline metadata
Recommended Skills
Journey fit
antd work sits squarely in Build when you implement or fix React UI that imports from the antd package. frontend is the canonical shelf because the CLI answers component props, demos, tokens, and version migrations—not backend or DevOps concerns.
How it compares
Prefer this CLI-backed skill over generic React docs when the task explicitly mentions antd versions, tokens, or @ant-design/cli.
Common Questions / FAQ
Who is antd for?
Indie developers and small teams building React interfaces with Ant Design who want offline, version-aware CLI answers in the agent loop.
When should I use antd?
During Build frontend work when writing antd components, debugging antd issues, analyzing antd usage in a repo, or migrating between antd major versions.
Is antd safe to install?
The skill may run npm global installs and antd bug commands locally—review allowed Bash patterns and the Security Audits panel on this Prism page before use on sensitive repos.
SKILL.md
READMESKILL.md - Antd
# Ant Design CLI You have access to `@ant-design/cli` — a local CLI tool with bundled antd metadata for v4/v5/v6 (plus migration guides for v3 → v4, v4 → v5, 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: ```bash which antd || npm install -g @ant-design/cli ``` After running any command, if the output contains an "Update available" notice, run `antd upgrade` 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. ```bash # 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): ```bash 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: ```bash # Collect full environment snapshot (system, deps, browsers, build tools) antd env --format json # 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 env` → capture full environment → `antd doctor` → check configuration → `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., v3 → v4 or v4 → v5): ```bash # Get full migration checklist antd migrate 3 4 --format json # v3 → v4 antd migrate 4 5 --format json # v4 → v5 # Check migration for a specific component antd migrate 4 5 --component Select --format json # Generate agent-friendly auto-migration prompt (does not modify files) antd migrate 4 5 --apply ./src --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: ```bash # 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 a