nocobase-plugin-development
БесплатноБез исполняемых скриптовНе проверенNocoBase 2 only; never use in a NocoBase 3 project. Step-by-step playbook for developing a NocoBase plugin, covering scaffolding, server-side code…
от nocobase★ 54 звезды на GitHubОб этом скилле
Goal
Guide an AI agent through the complete process of developing a NocoBase plugin — from requirement analysis to working code — producing a plugin that follows NocoBase conventions and can be enabled immediately.
Scope
- Analyze user requirements and map them to NocoBase extension points.
- Scaffold a new plugin with
nb scaffold plugin. - Generate server-side code: collections, ACL, custom APIs, migrations, install hooks.
- Generate client-side code: blocks, fields, actions, settings pages, routes.
- Generate i18n locale files.
- Enable and verify the plugin.
- Troubleshoot common issues using FAQ checklist and source code (when available).
Non-Goals
- Do not build NocoBase applications through the UI (that's
nocobase-ui-builder). - Do not handle plugin publishing to external registries.
- Do not modify NocoBase core code.
- Do not migrate existing plugins from client v1 to v2 (that's
nocobase-client-v2-plugin-migration).
Hard Constraints
These rules apply to ALL generated plugin code. Violating them is always wrong.
NEVER use this.app.use() or React Providers
this.app.use() is an internal API. Plugins must NEVER use it to wrap the app with React providers. This is not a suggestion — it is a hard rule with no exceptions.
Providers add unnecessary React rendering layers, hurt performance, and make plugins harder to maintain. When implementing global effects (watermarks, overlays, theming, tracking, global listeners, etc.), use these approaches instead:
- FlowEngine mechanisms (preferred) —
registerModelLoaders,registerFlow,registerModelsfor UI capabilities. - FlowEngine context —
this.contextholds global data (e.g.,this.context.api,this.context.dataSourceManager,this.context.logger). Read from it directly instead of creating Providers to pass data around. Note: some properties likeuser,viewer,message,themeTokenare only available after React renders — use them in flow handlers or components, not inload(). - API requests — if the plugin needs data, use
this.app.apiClient.request()to fetch it directly. Axios interceptors are allowed but should not be the first choice — prefer direct requests or reading from context when possible. - Pure DOM manipulation — operate on the DOM directly in
load()for visual effects. No React component needed. - EventBus —
this.app.eventBusfor reacting to app lifecycle events.
If you find yourself thinking "I need a Provider for this", stop and reconsider. There is always a better alternative.
Client code goes in client-v2 ONLY
All client-side plugin code must be written in src/client-v2/. The src/client/ directory is for the legacy v1 client — do NOT write or modify any files there. Import Plugin from @nocobase/client-v2, never from @nocobase/client.
Modern client runs under the /v/ URL prefix
The client-v2/ source directory corresponds to the /v/ runtime URL prefix. After login, users land on /v/admin/ by default. When telling users where to access something, use the /v/ URL pattern:
| What you registered | Accessible at |
|---|---|
| Plugin manager, built-in admin pages | /v/admin/ |
| Plugin settings pages | /v/admin/settings/<menuKey> |
Custom routes via this.router.add('xxx', { path: '/foo' }) |
/v/foo (NOT /v/admin/foo) |
If the user says "I enabled the plugin but nothing shows up" or hits a 404, the most common cause is they are on a /admin/... URL (v1 plugin manager, which calls pm:listEnabled) instead of /v/admin/ (modern plugin manager, which calls pm:listEnabledV2). Tell them to switch to the /v/ URL.
Input Contract
| Input | Required | Default | Validation | Clarification Question |
|---|---|---|---|---|
requirement |
yes | none | non-empty natural language description | "What should this plugin do?" |
nocobase_root |
yes | current working directory | must expose a NocoBase source tree: a CLI-managed Git-source app (has source/packages/core/) or a NocoBase source repo (has packages/core/) |
"Where is your NocoBase source project? Plugin development needs a Git-source install or a cloned source repo." |
plugin_name |
no | derived from requirement | @<scope>/plugin-<name> format |
"What should the plugin package name be?" |
Rules:
- If
nocobase_rootis not provided, check if the current working directory is a NocoBase project with a source tree. - If it is a NocoBase app without a source tree (Docker or npm install), stop and walk the user through the options in Step 0 — a source tree is required and cannot be worked around.
- If
plugin_nameis not provided, derive a reasonable name from the requirement and confirm with the user. - If user says "you decide", use documented defaults.
Mandatory Clarification Gate
- Max clarification rounds:
2 - Max questions per round:
3 - Mutation preconditions:
nocobase_rootexposes a NocoBase source tree (source/packages/core/for CLI-m
Установить nocobase-plugin-development в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGrepGlobAgentWebFetchВложенные файлы
FAQ
Что делает скилл nocobase-plugin-development?
NocoBase 2 only; never use in a NocoBase 3 project. Step-by-step playbook for developing a NocoBase plugin, covering scaffolding, server-side code (collections, APIs, ACL, migrations), client-side code (blocks, fields, actions, settings pages, routes, components), i18n, and verification. TRIGGER when: user asks to create, build, implement, or develop a NocoBase plugin, mentions 'NocoBase plugin', or describes a feature to be built as a NocoBase plugin. This skill contains NocoBase-specific conventions and templates that general coding cannot replicate — always invoke it instead of planning from scratch.
Как установить скилл nocobase-plugin-development?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nocobase-plugin-development запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic