Supported Capabilities

Prerequisites

Before reading this page, make sure you have completed the environment setup following AI Plugin Development Quick Start.

The AI plugin development capability is powered by the nocobase-plugin-development Skill. If you have already initialized via the NocoBase CLI (nb init), this Skill is automatically installed.

Here is a list of everything AI can currently help you do. Each capability comes with a sample prompt that you can copy and adapt to your own requirements.

Note
  • NocoBase is migrating from client (v1) to client-v2, and client-v2 is still under development. The client code generated by AI development is based on client-v2 and can only be used under the /v2/ path. It is available for early access and experimentation, but is not recommended for production use.
  • AI-generated code may not be 100% correct. We recommend reviewing it before enabling. If you encounter issues at runtime, send the error message to AI and let it investigate and fix -- it usually takes just a few rounds of conversation to resolve.
  • We recommend using GPT or Claude series models for development, as they produce the best results. Other models can also work, but generation quality may vary.

Best Practices

  • Explicitly tell AI to create or modify a NocoBase plugin and provide the plugin name -- for example, "Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-rating". Without a plugin name, AI may not know where to generate code.
  • Explicitly specify using nocobase-plugin-development skill in your prompt -- for example, "Help me use nocobase-plugin-development skill to develop a NocoBase plugin...". This allows the AI Agent to directly access the Skills' capabilities, avoiding plan mode where it might ignore Skills.
  • Run the AI Agent in the root directory of the NocoBase source code repository -- this way AI can automatically find the project structure, dependencies, and existing plugins. If you're not in the source code root directory, you need to additionally tell the AI Agent the path to the source code repository.

Quick Reference

I want to...AI can help you
Create a new pluginGenerate a complete scaffold, including frontend and backend directory structure
Define collectionsGenerate Collection definitions, supporting all field types and relationships
Build a custom blockGenerate BlockModel + settings panel + register it in the "Add Block" menu
Build a custom fieldGenerate FieldModel + bind it to a field interface
Add a custom action buttonGenerate ActionModel + popup/drawer/confirmation dialog
Build a plugin settings pageGenerate frontend form + backend API + storage
Write a custom APIGenerate Resource Action + route registration + ACL configuration
Configure permissionsGenerate ACL rules to control access by role
Support multiple languagesAutomatically generate Chinese and English language packs
Write a migration scriptGenerate Migration, supporting DDL and data migration

Plugin Scaffolding

AI can generate a complete NocoBase plugin directory structure based on your requirements -- including frontend and backend entry files, type definitions, and base configuration.

Sample prompt:

Help me create a NocoBase plugin called @my-scope/plugin-todo

AI will run yarn pm create @my-scope/plugin-todo and generate a standard directory:

packages/plugins/@my-scope/plugin-todo/
├── src/
│   ├── server/
│   │   └── plugin.ts
│   ├── client-v2/
│   │   └── plugin.tsx
│   └── locale/
│       ├── zh-CN.json
│       └── en-US.json
├── package.json
└── ...

Collection Definitions

AI can generate Collection definitions for all NocoBase field types, including relationships (one-to-many, many-to-many, etc.).

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-order,
then define an "orders" table with the following fields: order number (auto-increment),
customer name (string), amount (decimal), status (single select: pending/processing/completed),
and created time.
Orders have a many-to-one relationship with customers.

AI will generate a defineCollection definition, including field types, default values, relationship configuration, and more.

Custom Blocks

Blocks are the most fundamental way to extend the NocoBase frontend. AI can help you generate block models, settings panels, and menu registration.

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-simple-block.
Create a custom display block (BlockModel) where users can enter HTML content in the settings panel,
and the block renders that HTML. Register this block in the "Add Block" menu.

AI will generate a BlockModel, create a settings panel via registerFlow + uiSchema, and register it in the "Add Block" menu.

For a complete example, see Build a Custom Display Block.

Custom Field Components

If NocoBase's built-in field rendering components don't meet your needs, AI can help you create a custom display component to replace the default field rendering.

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-rating.
Create a custom field display component (FieldModel) that renders integer type fields as star icons,
supporting 1-5 ratings. Clicking a star should directly modify the rating value and save it to the database.

Rating component display effect

AI will generate a custom FieldModel to replace the default rendering component for integer fields.

Custom Actions

Action buttons can appear at the top of a block (collection level), in the action column of each table row (record level), or in both locations simultaneously. Clicking them can trigger prompts, open form popups, call APIs, and more.

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-simple-action.
Create three custom action buttons (ActionModel):
1. A collection-level button that appears at the top of the block, showing a success message when clicked
2. A record-level button that appears in the action column of each table row, displaying the current record's ID when clicked
3. A both-level button that appears in both locations, showing an info message when clicked

AI will generate an ActionModel, control button placement via ActionSceneEnum, and handle click events via registerFlow({ on: 'click' }).

For a complete example, see Build a Custom Action Button.

Plugin Settings Page

Many plugins need a settings page for users to configure parameters -- such as third-party service API keys, webhook URLs, etc.

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-settings-page.
Create a plugin settings page that registers an "External Service Configuration" entry under the "Plugin Settings" menu, with two tabs:
1. "API Configuration" tab: a form containing API Key (string, required), API Secret (password, required), Endpoint (string, optional), saved to the database via a backend API
2. "About" tab: displays the plugin name and version information
The frontend should use Ant Design form components, and the backend should define externalApi:get and externalApi:set endpoints.

Plugin settings page effect

AI will generate the frontend settings page component, backend Resource Action, collection definition, and ACL configuration.

For a complete example, see Build a Plugin Settings Page.

Custom APIs

If the built-in CRUD endpoints aren't sufficient, AI can help you write custom REST APIs. Below is a complete frontend-backend example -- the backend defines collections and APIs, while the frontend creates a custom block to display the data.

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-todo.
Create a frontend-backend integrated Todo data management plugin:
1. Backend defines a todoItems table with fields: title (string), completed (boolean), priority (string, default medium)
2. Frontend creates a custom TableBlock that only displays todoItems data
3. The priority field should use colored Tags (high in red, medium in orange, low in green)
4. Add a "New Todo" button that opens a form to create a record when clicked
5. Logged-in users can perform all CRUD operations

Todo data management plugin effect

AI will generate server-side Collection definitions, Resource Actions, ACL configuration, as well as client-side TableBlockModel, custom FieldModel, and ActionModel.

For a complete example, see Build a Frontend-Backend Integrated Data Management Plugin.

Permission Configuration

AI will automatically configure appropriate ACL rules for generated APIs and resources. You can also explicitly specify permission requirements in your prompt:

Sample prompt:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-todo.
Define a todoItems collection (with title, completed, priority fields).
Permission requirements: logged-in users can view, create, and edit; only admin role can delete.

AI will configure the corresponding access rules on the server side via this.app.acl.allow().

Internationalization

AI generates Chinese and English language packs (zh-CN.json and en-US.json) by default -- you don't need to ask for them separately.

If you need additional languages:

Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-order.
I need Chinese, English, and Japanese language packs.

Migration Scripts

When a plugin needs to update the database schema or migrate data, AI can help you generate Migration scripts.

Sample prompt:

Help me use nocobase-plugin-development skill to write a migration script for the NocoBase plugin @my-scope/plugin-order.
Add a "notes" field (long text, optional) to the "orders" table,
and set the default value of the notes field to "N/A" for all existing orders.

AI will generate a versioned Migration file, including DDL operations and data migration logic.