用途:该技能面向 Strapi v5 插件开发、自定义 API 与 CMS 架构,目标是按官方约定编写生产级代码。
主要能力:强调数据操作一律使用 Document Service API(strapi.documents),并列出与已弃用 Entity Service 的对应关系,如 findMany、findOne、create、update、delete,以及 v5 新增的 publish、unpublish。覆盖插件目录结构、package.json 中 strapi.kind 为 plugin 的要求、content-api 与 admin 两类路由、控制器、服务、策略、内容类型 schema 与 UID 格式(api::、plugin::)。后台部分涉及 @strapi/design-system、插件注册、菜单链接、翻译、内容管理器注入区与 React Query 数据获取。还给出工厂模式(createCoreService、createCoreController、createCoreRouter)、服务层分层、隐藏插件内容类型、常见反模式与排错表。
使用方式:按资料中的结构组织 server 与 admin 目录,使用 Document Service 进行 CRUD 与发布操作,路由区分 content-api 与 admin,控制器委托服务处理业务逻辑。开发命令包括 npx @strapi/sdk-plugin@latest init my-plugin、npm run build、npm run watch、npm run watch:link、npx @strapi/sdk-plugin@latest verify,以及 strapi ts:generate-types。
适用场景:构建或重构 Strapi v5 插件、扩展后台面板、接入内容管理器、实现自定义 API 与权限策略。
限制:资料未提供收费、价格、平台支持范围与效果数据;具体版本兼容性以 peerDependencies 声明为准,实际使用需结合项目环境验证。