Към всички skills

antd

ant-design · Дизайн

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.

Оригинален текст · няма потвърден превод на български

Първо прочетете инструкцията.

Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.

Оригинален SKILL.md
GitHub хранилище
Звезди на репото
38 372
Лиценз
Не е посочен. Проверете в репозитория.
Последна проверка на записа
Няма посочена дата

Добавете в своя инструмент.

Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.

npx skills add ant-design/ant-design-pro

Страницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.

Откъс от SKILL.md

Началото на файла на автора, без превод.

Ant Design CLI

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

Setup

The CLI is installed as a dev dependency. Use npx antd to run it.

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
npx antd info Button --format json

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

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

# Check component-level design tokens for theming
npx 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):

npx antd doc Table --format json        # full markdown docs for Table
npx 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:

# Collect full environment snapshot (system, deps, browsers, build tools)
npx antd env --format json

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

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

# Diagnose project-level configuration issues
npx 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):

# Get full migration checklist
npx antd migrate 3 4 --format json    # v3 → v4
npx antd migrate 4 5 --format json    # v4 → v5

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

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

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

Целият SKILL.md в GitHub