- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nocobase/nocobase --skill nocobase-app-plugin-development -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nocobase/nocobase --skill nocobase-app-plugin-development -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nocobase/nocobase --skill nocobase-app-plugin-development -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nocobase/nocobase --skill nocobase-app-plugin-development -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/nocobase/nocobase/tree/HEAD/packages/app/app-skills/skills/nocobase-app-plugin-development來自發布者
Use this Skill to develop a plugin in the user’s existing NocoBase 3 App. Read that App’s AGENTS.md, relevant installed Skills, and the plugin before editing. An App created by create-app identifies itself with nocobase.templateKind: "app" in package.json; its local plugins belong in packages/. Start from an installed App with working dependencies. If no App exists, use the available nocobase-create-app Skill first, then return here. Do not download the NocoBase source repository as a prerequisite.
This Skill ships with the App's installed @nocobase/app-skills; update it through a compatible App upgrade and pnpm nocobase skills sync, not by editing the generated copy or installing a global copy. Read it by its project path when an older global entry has the same name. The upgrade Skill describes retiring that global installation after a project replacement is verified.
For work explicitly in the NocoBase source repository, the repository links this same maintained Skill locally. Read .agents/rules/plugin-development.md from that repository root for source-only creation, registration and validation commands. An App does not need those repository files. Source paths in references are optional lookup locations; use installed exports, declarations and synchronized Skills to verify APIs for the App's version. Do not apply the legacy Plugin class, src/client-v2/ or nb scaffold plugin protocol. If the creation tool or App CLI lacks App-workspace support, report the incompatible packages instead of hand-building a scaffold or downloading the source repository.
These English references adapt the plugin development guide into task-specific instructions. Read the rows relevant to the task; do not load the entire reference set by default.
For Realtime changes, check whether the target workspace or application provides a version-matched nocobase-realtime Skill from @nocobase/realtime; read it alongside the installed API declarations. Package integration guidance must match the target runtime version.
For worked implementations and tests, read the matching Server Route examples, ServiceToken and Provider examples, Client examples, or Repository examples. These supplement the topic references with concrete code and point to maintained source fixtures; adapt their explicit example access policies to the requested product.
For UI work, first read the shared UI design entry: it locates the same design contract, reference modes, authorized exceptions and acceptance rules used by application development. Read the host's design decisions before choosing a layout, retain approved decisions outside synchronized Skills, and verify the rendered plugin in the host. Package ownership and implementation remain governed by this Skill.
When creating a page or writing a page component, refer to Pages, routes, and menus for page component structure and route declarations. For nested pages, page-level navigation Tabs, route dialogs/drawers, or navigation groups, also read Child routes, Tabs, overlays, navigation groups, and Outlet. Before using the page and overlay examples, copy the required component source into the plugin. The examples import these plugin-owned copies through relative .js paths; the host's private breadcrumb component is excluded. For route overlay component availability and hook context boundaries, read route dialogs and drawers.
components.json with its package-local # imports and published dist mappings. Use the shared theme tokens for color, typography, spacing, size, radius, and shadow.Outlet in the parent page component, and derive the active Tab from the URL. When the parent URL is opened without a child route, redirect to the default accessible Tab by replacing the current history entry and preserving query parameters. Opening an explicit Tab URL must retain that Tab's selection. Follow an explicit user request for a different interaction.pnpm create @nocobase/plugin@beta and explicit capabilities, including cli when needed. In a source checkout, follow its repository-local creation instructions. Preview with --dry-run --json, check the target and project edits, then apply the same capability selection. Keep the generated runtime-aware shared development configuration; see scaffolding.en-US, zh-CN, zh-TW, ja-JP, es-ES, pt-BR, fr-FR, de-DE, vi-VN, id-ID) in every Client and Server locale manifest, typed with the complete en-US resource. Libraries the plugin depends on that ship translations, such as @nocobase/i18n for @nocobase/app-plugin-i18n, are completed to all ten as well. A new or changed key is translated into all ten in the same change; application templates are exempt.plugin inspect is an optional read-only registration diagnostic, not a test or completion gate. Report results, skipped checks, and remaining limitations accurately.Create and maintain NocoBase 3 plugins inside an existing App or a NocoBase 3 source workspace, including Client, Server, CLI, database resources, UI Library integration, Plugin Skills, and registrati
---name: nocobase-app-plugin-developmentdescription: Create and maintain NocoBase 3 plugins inside an existing App or a NocoBase 3 source workspace, including…---# packages/app/app-skills/skills/nocobase-app-plugin-development/SKILL.md總覽
Create and maintain NocoBase 3 plugins inside an existing App or a NocoBase 3 source workspace, including Client, Server, CLI, database resources, UI Library integration, Plugin Skills, and registration. Use for App-local plugins under packages/ and source-workspace plugins or examples. Not for creating an App, application-only feature work, or legacy NocoBase 2 plugins.
常見問題
從發布者下載 packages/app/app-skills/skills/nocobase-app-plugin-development/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/nocobase/nocobase。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。
useApiClient() or apiClientToken; do not construct another application API client. Define shared service contracts and owner-created Tokens before implementations; consumers import the original Token.defineAppRoutes() is the only Client route API. Expose administration as settings items and APIs, grouped by management area (for example, Automation contains Workflow and Schedules), and leave any page over them to the application. See System settings for declarations and server operation boundaries./api route follows the HTTP API rules: camelCase paths under the plugin's namespace, standard methods, { data } responses, ApiError for every failure (clients branch on reason), zod input validated through apiValidator(), and a describeRoute() declaration on every route for the application's OpenAPI document at /api/swagger/docs. Data endpoints are POST /api/{name}/{action} with camelCase exposure names and are documented without a declaration.createRouter().baseDir. Migrations, seeds, and Jobs resolve relative to it so compiled plugins use compiled resources. Migrations are explicit, self-contained, immutable after merge, and tested against a real database.@nocobase/app-testing/server, /client or /cli, declared in devDependencies. Use the test directory and fixture guide to select the environment, register the production plugin and keep databases and storage isolated.<plugin>/skills/; the target App's .agents/skills/ is generated output. Editable UI is maintained in the UI Library; source installed into an App belongs to that App. This development Skill is maintained in @nocobase/app-skills, distinct from a plugin's own integration Skills.