- name
- nocobase-app-plugin-skills-example
- description
- Use the Skills Example plugin to add its App Notice component, read its authenticated default Notice API, or consume its Server ServiceToken in a NocoBase App.
- metadata
- short-description: Integrate the Skills Example App Notice
Skills Example App Plugin
Use this Skill when the user wants to add the plugin-provided App Notice to an application page, read its default Notice over HTTP, or consume the same Notice through a Server ServiceToken. Do not use it to modify this plugin's source.
Public surfaces
- Client component:
AppNoticeandAppNoticePropsfrom@nocobase/app-plugin-skills-example/client/components/app-notice. - Server contract:
appNoticeServiceToken,AppNoticeService, andAppNoticeDatafrom@nocobase/app-plugin-skills-example/server/tokens. - HTTP API:
GET /api/skillsExample/notice, answering{ data: { title, description, tone } }. The application's API document at/api/swagger/docslists it asskillsExampleGetNotice.
The API requires an authenticated application session. It intentionally has no additional business authorization check because the fixed example Notice is non-sensitive. Reassess that decision before changing the response to include private or user-specific data.
Add the Notice to an App page
- Confirm the plugin is registered and
plugin inspect skills-example --jsonreports consistent Server and Skill state. - Import
AppNoticefrom its public component export in an App-owned page or component. - Either pass App-owned typed content directly or use the App's authenticated
client to request
GET /api/skillsExample/notice. - Render the returned
data.title,data.description, anddata.tonethroughAppNotice. - Add an App behavior test, then run the App typecheck and build.
Do not create a Client plugin registration just to import this component. The package provides a reusable component export, but no Client runtime contribution.
Consume the Server contract
Import appNoticeServiceToken from the public Server Token export and resolve
it from the shared application container. Do not construct the default Service
implementation or recreate a Token with the same name.