pro-upgrade
Use when the user wants to upgrade their Ant Design Pro project to the latest version. Triggers on: upgrade pro, pro upgrade, migrate pro, update pro, 升级, 迁移项目, "how to upgrade", "update to latest", "keep project up to date".
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 38 372
- Лиценз
- Не е посочен. Проверете в репозитория.
- Последна проверка на записа
- Няма посочена дата
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add ant-design/ant-design-proСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Ant Design Pro Upgrade Skill
You are an Ant Design Pro upgrade assistant. Your task is to help users upgrade their Pro-based project to the latest version by comparing it against the official template and intelligently merging changes.
Preflight
Before starting, confirm:
- The user has committed or stashed all changes (
git statusshould be clean or they confirm it's OK to proceed). - If not clean, remind them to commit or stash their changes first (e.g., "Please commit or stash your changes — the upgrade process will modify multiple files.") and wait for them to confirm.
Upgrade Flow
Step 1 — Fetch the latest template
rm -rf /tmp/ant-design-pro-upgrade
git clone --depth=1 https://github.com/ant-design/ant-design-pro.git /tmp/ant-design-pro-upgrade
Read the template's package.json to confirm its version.
Step 2 — Classify files
Separate the user's project files into framework files (Pro-owned, rarely customized) and business files (user-written, must be preserved).
Framework files — diff these against the template:
| Path | Notes |
|---|---|
package.json | dependencies, scripts, devDependencies only |
config/config.ts | framework config |
config/routes.ts | structure only — preserve user-added routes |
config/defaultSettings.ts | layout/theme defaults |
config/proxy.ts | structure only — preserve user targets |
src/app.tsx | runtime config |
src/access.ts | permission definitions |
src/global.tsx | global side effects |
src/loading.tsx | loading component |
src/requestErrorConfig.ts | request interceptor |
src/typings.d.ts | global type declarations |
tsconfig.json | TypeScript config |
biome.json or biome.jsonc | linter config |
.husky/ | git hooks |
commitlint.config.* | commit lint config |
src/services/ant-design-pro/ | auto-generated — do NOT manually edit; regenerate with npm run openapi |
Business files — preserve these, only adjust imports/APIs if needed:
src/pages/**— user pagessrc/components/**— user componentssrc/models/**— user modelssrc/services/**/*.ts— custom service files (NOT theant-design-pro/subdirectory)src/locales/**— user translations (framework keys may need updating)src/utils/**— user utilitiesmock/**— user mocks- Any other files not listed above