- name
Design and implement NocoBase 3 business permissions: job responsibilities, pages, business actions, fields, record scopes, relations, team inheritance, permission assignments, administration and insp
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nocobase/nocobase --skill nocobase-app-plugin-authorization -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nocobase/nocobase --skill nocobase-app-plugin-authorization -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nocobase/nocobase --skill nocobase-app-plugin-authorization -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nocobase/nocobase --skill nocobase-app-plugin-authorization -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/nocobase/nocobase/tree/HEAD/packages/plugins/app-plugin-authorization/skills/nocobase-app-plugin-authorizationFrom the publisher
Use the application's existing authorization service. Resolve authorizationToken from @nocobase/app-plugin-authorization/server in a provider or route factory. Read the application's AGENTS.md and inspect registered plugins and server/config/authorization.ts first. Application-owned features stay in the application's providers/routes/services; create a reusable plugin only when requested.
Inspect existing declarations, enforcement, permission sets and installed capability Skills. Classify each requested change by its content, whether the feature is new or already exists. A request can require both model development and configuration.
For permission development, deliver both the implemented model and usable initial configuration based on the responsibility matrix: permission sets, pages/actions, selected scopes, applicable rules and intended user/team assignments. Do not stop at registration and leave configuration to the user unless they explicitly requested model-only work. If recipient identities or access decisions are missing, ask for those specifics while completing independent work; do not guess assignments. Keep configuration editable in the backend and preserve unrelated administrator choices.
Choose delivery by installation state: use seeds for fresh-install defaults and authorized runtime services or a controlled data-change workflow for an existing installation. These are ways to apply configuration, not alternatives to model development. Reuse current management pages and editors. In a template-based application, keep the prepared role editor and update permissionWorkspaceSelection in client/pages/settings/permission-workspace.ts for every business feature. Follow the three-tab role editor guide before choosing route IDs and locale keys. Include the implemented actions, translated descriptions and scope titles, and object references for the menus that use them. For an application without a prepared editor, use the UI Library @nocobase/permission-editor component and compose its catalog from the application’s routes and registered operations. Keep edits in the host draft until Save. Read the relevant references as needed, beginning with the business workflow for model changes and the service/configuration references for configuration changes.
Map independently assignable business operations to their actual UI entries, server requests, affected fields and scopes. Keep permission titles aligned with operation labels; do not hide independent approval, rejection or repair steps behind a generic Manage action. A shared operation on multiple pages uses the same permission. The server enforces the operation and scopes separately from lifecycle eligibility. When splitting existing actions, migrate stored grants and default, sharing and restriction rules without widening ranges. See the client development reference for the Registry composition and verification contract.
Before writing grants, turn the requirement into a matrix: actor/job, page, business action, allowed records, readable/writable fields, relation operations and exceptions. Identify who administers assignments separately from who uses the business feature. Ask only about missing decisions that affect access; record concrete assumptions and continue independent modeling work.
Use jobs as permission sets, such as sales engineer or delivery specialist. Ownership, region and assigned projects are record scopes, not extra role names. A person may hold a direct job plus an inherited team job. Define whether revoking one source should preserve the other. Describe each exception as a business fact: a delegated quote, a confidential project, or an active delivery team.
The sales workflow in the business module workflow separates quote preparation from regional submission responsibility: an engineer can edit their own out-of-region draft but cannot submit it unless the parent project is also accessible. This is a useful model for multi-table operations; copy the responsibility boundary, not its sample ids.
Read runtime setup and APIs for installation, registration and management endpoints, client development for routes, buttons and record eligibility, code versus seeds before writing installation data, and request checks and permission-set services for assignments, protection and transaction contracts. The package README at node_modules/@nocobase/app-plugin-authorization/README.md is the complete API reference, and node_modules/@nocobase/authorization/README.md defines the underlying terms.
This Skill and its bundled references are self-contained: one sales collaboration and delivery domain of projects, quotes and orders runs through them as the worked example. Implement the included patterns in the App's own feature files through public package exports.
Code defines the business permission model; seeds initialize editable business permission configuration. Administrators can subsequently change seeded sets, scopes, rules and assignments in the backend. App features register their own composites and leave platform/system permission configuration to its owning plugins. See code versus seeds for the boundary and examples.
Read optional capability discovery before using any rule plugin. A missing corresponding Skill means the capability is unsupported in the current App and needs separate development; do not assume its APIs or tables exist.
defineDatabasePermission; compose user-facing business operations as composite resources with defineCompositeResource from @nocobase/authorization/core. Explicitly name fields, relation capabilities and every collection a workflow touches.boot, opt collections in with authz.database.collections.add, register composites with authz.compositeResources.define, record access with authz.recordAccess.define and settings items with authz.settings.add. Then add a workspace subsection with authz.ui.sections.add({ name, title, parent }) and list each composite or settings item in it with authz.ui.place(reference, { section, group? }) (this describes available capabilities and their suggested grouping; the application chooses which resources and actions its configuration page exposes. An unplaced composite or settings item goes under its default section's Other in the options catalog with a startup warning, and a misplaced one fails a development start). Pages are not registered on the server: the client route tree lists them. Release subject registrations at shutdown.defineRepositoryApiRoutes and add authz.database.authorizeRepository to map methods to composite actions; it reuses or initializes the request's authorization context. For workflows, persisted-state checks, multiple data scopes or custom responses, install authz.middleware(), call c.get('authz').authorize() once and bind every returned collection policy with repository.withPolicy(). Follow Repository route integration.authz on every entry client route (nested pages inherit it; an omitted one defaults to root-only or 'skip' with a development warning), add useCan for action visibility and obtain per-record eligibility from the server when needed. Handle pending and error states without displaying stale access.authz.database.collections.add({ name, title, actions? }). Metadata comes from the database; registration grants nothing. Unregistered collections are denied even to unrestricted users.settings, composite and database.collection are catalog types: a check on an unregistered item or action is denied with RESOURCE_ACTION_NOT_SUPPORTED. page, user and notification are record types that declare actions only; their grants use id: '*' for every record.recordAccess (database.collection does). Grant page access separately; a page grant never authorizes a server endpoint.can is for feature visibility. require needs an unconditional permit and rejects conditional decisions. Business endpoints use authorize, reject denial or missing policies, and consume conditions.database without resolving collection grants again.authz.database.authorizeRepository. Multi-scope actions and workflow transitions need custom handlers. authz.database.policyFor folds collection grants; without its third argument it does not respect a business-action boundary.Report the responsibility matrix implemented, model changes, configuration actually applied or prepared for installation, who can manage assignments, and observed allow/deny outcomes. Distinguish a written seed from one executed successfully; identify any unresolved recipient identities or access decisions. Cover no grant, page-only, action-only, out-of-scope rows, forbidden fields, invalid relation targets, multiple authorization sources and revocation. If optional plugins or required schema are absent, report that concrete limitation; never replace the missing boundary with an unconditional grant.
Permission Set reads return an opaque revision. Editors should send it as expectedRevision in PATCH /api/authorization/permissionSets/:key; the store atomically compares and replaces it in the update transaction. A stale revision returns 409 PERMISSION_SET_CONFLICT and leaves stored grants unchanged. Preserve the draft, offer explicit reload, and do not automatically retry. Existing callers may omit the precondition for compatibility. The server API equivalent is permissionSets.update(key, changes, expectedRevision). The additive, reversible 202610150001_authorization_permission_set_revision migration initializes existing rows without changing their grants.
© 2026 Skills Rack.
---name: nocobase-app-plugin-authorizationdescription: Design and implement NocoBase 3 business permissions: job responsibilities, pages, business actions, fields…---# packages/plugins/app-plugin-authorization/skills/nocobase-app-plugin-authorization/SKILL.mdOverview
Design and implement NocoBase 3 business permissions: job responsibilities, pages, business actions, fields, record scopes, relations, team inheritance, permission assignments, administration and inspection. Use when building a system or feature whose users have different access.
FAQ
Download packages/plugins/app-plugin-authorization/skills/nocobase-app-plugin-authorization/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/nocobase/nocobase.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.