/nocobase-dev:nocobase-portal-manage [action: build|list|info|create|config|pull|push|deploy|dev|destroy|diagnose] [portal?] [env?: name]from nocobase-dev
NocoBase 2 only; never use in a NocoBase 3 project. PRIMARY ENTRY. Default dispatcher for every NocoBase UI authoring request, including pages, menus, blocks, fields, actions, layouts, reactions, KPI interfaces, dashboards, and charts, even when the user does not mention a Portal. Resolve an enabled Portal from structured `nb portal list -j` output before loading any downstream UI implementation skill: exact `name` when specified; otherwise zero stops, exactly one is automatic, and multiple Portals require explicit selection even when one has `isDefault: true`; show the default marker as informational only. Read the type only from `portalType`; explicitly invoke `nocobase-ui-builder` only for a resolved no-code Portal and require `nocobase-ai-builder` for AI Portal source development. Also use direct `nb portal` commands for explicit Portal lifecycle, source storage, sync, deployment, diagnosis, and destroy tasks.
Ships in nocobase-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Dispatch all ordinary NocoBase UI authoring to one explicitly resolved Portal and manage Portal workspaces, preserving env selection, source storage configuration, and clear readback after changes.
nocobase-ui-builder skill to build no-code Portal UI.nocobase-ai-builder skill for AI Portal source development after locating or pulling the corresponding Portal source directory.nocobase-ui-builder skill while preserving Portal env and workspace context.nocobase-ai-builder.nocobase-env-manage.nocobase-publish-manage.portalType only.nb portal command surface.nb portal.nb portal as permission to emulate Portal lifecycle, source storage, sync, deploy, or destroy operations through private APIs.nb portal ... command, confirm the installed CLI exposes the Portal command surface with nb portal --help, nb --help, or an equivalent local command-help check.nb portal commands for Portal lifecycle, source storage, sync, deploy, and diagnosis operations when that command surface exists.nb portal is unavailable, report lifecycle/source/deploy/destroy tasks as blocked by the installed CLI version and hand CLI update/env work to nocobase-env-manage; do not switch transports.nb portal list -j; count only records where enabled === true.isDefault / default marker from nb portal list -j as informational readback only. Include it when listing choices or reporting readback, but never use it to select among multiple enabled Portals.name exactly across structured records. Continue only when exactly one record matches and it has enabled === true; a missing, disabled, or non-unique match must stop without substitution.name and portalType for explicit user selection.isDefault === true; list it with a default marker and ask for the target Portal explicitly.portal.config.json, localPath, sync state, title similarity, or Portal type preference.portalType; do not infer type from the request, template, source tree, or local workspace.portal.config.json, localPath, and other local workspace information only after an AI Portal is selected, and only to locate its source project before invoking nocobase-ai-builder.portalType === "ai", loading and executing nocobase-ai-builder is mandatory. If nb portal list -j or nb portal info <portal> -j reports an empty developmentPath / localPath / local source path, run nb portal pull <portal> first, then read back the Portal info/list again and enter the pulled development directory. Pass the resolved Portal name, environment, local source path, and original user request; do not substitute an ad hoc source-edit workflow.sourceStorage, git_repo, git_branch, git_path, --git-path, repository subdirectories, and deployment/storage paths are remote storage configuration for pull/push/deploy; they are not the local development directory. Source edits happen only in the selected Portal's existing developmentPath / localPath or in the local directory returned after nb portal pull <portal> readback.nb portal as runtime-unavailable when the command is unknown or when nb portal list -j returns the explicit endpoint-absence signatures 404 / Not Found. For ordinary UI authoring only, this enters the legacy capability probe below; Portal lifecycle/source/deploy operations remain blocked.flow-surfaces list-navigation-targets as Portal inventory or infer no-code versus AI. Run nb api flow-surfaces list-navigation-targets -j only to inspect capabilities.multiPortal: false enables the legacy UI Builder lane and true stops.list-navigation-targets. When that action is explicitly unknown or returns 404 / Not Found, and the user did not name a Portal, allow the legacy UI Builder lane only after both checks succeed: nb api flow-surfaces --help exposes apply-blueprint and list-templates, and nb api flow-surfaces list-templates --body '{}' -j returns a structured success response. This is the verified legacy Flow Surfaces signature. Auth errors, 5xx, malformed output, a missing core action, or a failed read probe must stop; never reinterpret them as legacy evidence.--yes only when the user requested non-interactive execution or explicitly confirmed the target env.destroy, require explicit confirmation from the user.pull --force, create --force, or any operation that overwrites local Portal source, require explicit confirmation.--git-path ..--git-path values only when the user wants multiple Portals or other content in the same Git repository.--git-path / git_path value as if it were the local Portal project. It is a repository-relative storage path, not the pulled development directory.portal.config.json or remote Portal record already has a configured Git path, do not assume the current CLI default rewrites it; change it explicitly with nb portal config <portal> --git-path . when requested.push, use the user's requested commit message when provided; otherwise let CLI defaults apply.push or deploy after source or UI changes. Execute push only when the user emphasizes pushing/syncing/committing Portal source. Execute deploy only when the user emphasizes deployment/publishing/releasing the Portal. A deploy request does not imply a prior push.push and deploy as independent actions when both are explicitly requested. A failed push must be reported, but it must not automatically block an explicitly requested deploy unless the user said deployment is conditional on push success, such as "push successfully then deploy", "only deploy after push succeeds", or equivalent wording.listinfocreateconfigpullpushdeploydevdestroydiagnosebuild| Input | Required | Default | Validation | Clarification Question |
|---|---|---|---|---|
action | yes | inferred | one of build/list/info/create/config/pull/push/deploy/dev/destroy/diagnose | "Which Portal action should I run?" |
portal | lifecycle actions except list; optional for build | the only enabled Portal for build | exact CLI name | "Which Portal should I target?" |
runtime_env_name | no | current env | configured CLI env name | "Which env should I target?" |
template | create only | CLI default | npm package, local path, or file:// URL | "Which Portal template should I use?" |
title | create only | generated from slug | non-empty string | "What display title should this Portal use?" |
source_storage | create/config only | nocobase for create, existing config for config | nocobase or git | "Should source storage be nocobase or git?" |
git_repo | git create/config | none | full Git remote URL | "Which Git remote URL should store the Portal source?" |
git_branch | no | main | non-empty branch name | "Which Git branch should be used?" |
git_path | no | . | relative path inside repository, no .. | "Which repository path should store the Portal source?" |
message | push only | CLI default | non-empty commit message | "What commit message should I use?" |
force | destructive/overwrite actions | false | requires explicit confirmation | "Confirm overwrite/destruction before I continue." |
Rules:
nb portal behavior.2.3.action, portal, env target when explicit, and any required Git fields.destroy, ask for secondary confirmation.pull --force or create --force, ask for secondary confirmation.git_repo, ask for the Git remote URL.Use this path for every ordinary NocoBase page, menu, block, field, action, layout, or reaction request, including requests that never say "Portal".
nb env current and nb env info.nb portal --help or equivalent command-help output.nb portal is unavailable:
nocobase-env-manage for CLI/runtime upgrade or environment diagnosis.nb api flow-surfaces list-navigation-targets -j only as a capability check. If capabilities.multiPortal is explicitly false, use the nocobase-ui-builder legacy lane. If it is true, stop. If the action is explicitly unknown or returns 404 / Not Found, use the verified legacy Flow Surfaces probe defined in Hard Rules; continue only when that full probe succeeds. Other missing, unclear, or failed results stop with CLI/runtime guidance.nb portal list -j when the command surface is available, and retain only records where enabled === true. If this inventory call returns explicit endpoint absence (404 / Not Found), treat Portal inventory as runtime-unavailable and apply step 3 for ordinary UI authoring; do not do so for auth errors, 5xx, or malformed output.name is an exact match and whose enabled value is true. A missing, disabled, or non-unique match stops the build.name, portalType, and default status when present, ask for an explicit selection, and do no UI write. A single isDefault === true record does not break the tie.portal.config.json, localPath, sync state, title similarity, or type preference.portalType. It is the only source for no-code versus AI routing.nocobase-ui-builder skill for page, menu, block, field, action, and permission authoring.nb portal info <portal> -j, the selected list record's developmentPath, localPath, portal.config.json, or local workspace state only to locate the already selected Portal's local source project. If that local development path is empty or missing, run nb portal pull <portal> first, then read back with nb portal info <portal> -j or nb portal list -j and enter the pulled development directory. Ignore sourceStorage, git_repo, git_branch, git_path, --git-path, and deployment/storage paths as edit locations; those only describe where the Portal source is stored for pull/push/deploy. Then load and execute nocobase-ai-builder with the resolved Portal name, environment, source path, and original request. The original request authorizes implementation and verification; do not ask for separate code-edit authorization.portalType is absent or unsupported, stop instead of guessing.nb portal push or nb portal deploy. Use nb portal dev only when needed for local verification or when requested. Run push only for explicit source-push intent, and run deploy only for explicit deployment intent.Explicit action=create requests continue through the Portal Command Workflow. The zero-Portal stop above applies only to ordinary UI builds and must not suppress an explicit lifecycle request to create a Portal.
nb portal is available before trying the action.nb portal is unavailable, stop without fallback mutation and report the missing command surface plus the next nocobase-env-manage handoff.nb portal command.dev, read back with nb portal info <portal> when available; otherwise use nb portal list -j.push, report whether source changes were committed or the CLI reported no changes.push + deploy requests, execute the requested actions independently in order. If push fails, record the failure and continue to the requested deploy after any required deploy confirmation, unless the user made deploy conditional on push success. If the request only says deploy, do not insert a push step.list for "show portals", "有哪些 portal", "portal 列表".info for "portal details", "查看 portal 配置", "当前 git 配置".create for "创建 portal", "new Portal workspace", "from template".config for "配置 portal git", "改 source storage", "set git repo/branch/path".pull for "拉取 portal 源码", "sync remote to local".push only for explicit source-push intent such as "推送 portal 源码", "push source", "portal push", "commit source to Git", or "sync Portal source". Do not infer push from a generic build, finish, publish, deploy, or release request.deploy only for explicit deployment intent such as "部署 portal", "deploy", "publish online", or "release Portal". Do not run push first unless the user also explicitly asks to push source.dev for "启动 portal dev", "local portal development".destroy only for explicit delete/destroy intent.diagnose when the user provides an error log or asks why a Portal command failed.build for every ordinary NocoBase page, menu, block, field, action, layout, or reaction request, whether or not it mentions a Portal.nocobase-ui-builder skill for UI authoring.nb portal pull <portal> first, then execute nocobase-ai-builder in the pulled directory. Do not develop inside source storage paths such as git_path / --git-path.| Reference | Use When | Notes |
|---|---|---|
| Runtime Contract | Building or checking direct nb portal command invocations | Contains command map, env flag placement, and readback rules. |
| Git Source Storage | Configuring Git source storage or diagnosing Git push/pull failures | Covers root path default, empty repositories, and branch/path recovery. |
| Test Playbook | Validating the skill or planning capability checks | Read before adding tests or forward-testing the skill. |
High-impact actions:
nb portal destroynb portal pull --forcenb portal create --forcenb portal deploy to a production-like envSecondary confirmation templates:
Confirm execution: destroy Portal <portal> in env <env>. Expected impact: Portal record/workspace may be removed. Reply confirm to continue.Confirm execution: overwrite local Portal source for <portal> in env <env>. Reply confirm to continue.Confirm execution: deploy Portal <portal> to env <env>. Reply confirm to continue.Rollback guidance:
config: inspect with nb portal info <portal> and re-run nb portal config with the previous values if known.pull --force: local overwritten files may require restoration from Git or backup; do not invent a rollback.push: inspect the Git error and retry only after branch, auth, repo, or path issue is corrected.deploy: report CLI output and run nb portal info <portal> or deployment-specific readback if available.nb portal command is used when nb portal is available.nb portal availability is checked before Portal command execution.. for one-Portal-per-repository workflows.nb portal info or nb portal list -j.nb portal list -j, filter enabled === true, preserve isDefault for display/readback only, and resolve exactly one Portal before choosing an implementation path.name exactly; multiple Portals never use local context for selection.portalType.nocobase-ui-builder skill.nocobase-ai-builder in the corresponding Portal local source directory, pulling it with nb portal pull <portal> first when developmentPath / localPath is empty, and never treats source storage paths such as git_path / --git-path as edit directories.push and deploy are never auto-added after UI/source edits. A source-push request executes only push; a deployment request executes only deploy; an explicit combined request executes both independently.push + deploy requests preserve both requested actions independently; push failure is reported but does not block deploy unless deploy was explicitly conditional on push success.list uses nb portal list -j and does not ask for a Portal name.config with Git storage requires git_repo and defaults git_path to ..push with an empty Git repository reports branch creation support or actionable recovery.deploy only and does not insert a push step.push only and does not deploy.push + deploy continues to deploy after a push failure when the user requested both actions independently; it stops before deploy only when the user made deploy conditional on push success.pull --force blocks until explicit confirmation.destroy blocks until explicit confirmation.nocobase-ui-builder skill.nb portal pull <portal> first when no development path exists, then invokes nocobase-ai-builder with the original request.name, portalType, and default status when available, and require explicit selection without cwd, default-marker, or local-file inference.nocobase-env-manage.nb portal blocks lifecycle/source/deploy actions with a clear CLI capability report and does not use private API fallbacks.list-navigation-targets explicitly returns capabilities.multiPortal: false, or when the action is explicitly absent and the verified legacy Flow Surfaces signature succeeds. true, auth errors, 5xx, malformed output, or a failed core probe stop.For direct Portal command tasks, always return:
requestcapabilitycommandsenvportaldefaultresultreadbackassumptionsnext_stepsFor natural UI build tasks, return:
requestenvportaldefaultcapabilityportal_typeimplementation_pathbuild_summaryverificationnext_stepsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agents-store/claude-plugins --plugin nocobase-dev25 skills in this plugin
/api-referenceReference-only skill (loaded on demand) that maps the NocoBase v2 REST API surface — base URL, authentication, action-style endpoint convention, and pointers into the bundled OpenAPI 3.0.3 specification. Loaded by the model when it needs an exact endpoint path or schema; not auto-triggered./authUse when the user wants to authenticate to a NocoBase v2 instance, asks "how do I get a token for NocoBase", "how do I log in via API or CLI", "how do I connect an agent or MCP client", "why is my request returning 401 from NocoBase", or needs working curl/Node samples that send the bearer token. Covers the CLI path (`nb env add` / `nb env auth`), the upstream login flow (NB_USER + NB_PASSWORD → auth:signIn → token), the long-lived API Key path, OAuth through the IdP: OAuth plugin, and the separate Auth: OIDC SSO plugin./cli-recipesUse when the user asks how to install or run NocoBase from the terminal — "install nb CLI", "how do I bootstrap NocoBase", "run nb commands", "start/stop/upgrade NocoBase", "add an environment", "backup NocoBase", "enable a plugin". Provides the install one-liner (`@nocobase/cli`, stable channel), the env, lifecycle, plugin and backup recipes in their `nb` 2.2 canonical forms, and a routing table that hands deeper tasks to the upstream `nocobase-env-manage`, `nocobase-plugin-manage`, and `nocobase-publish-manage` skills./examplesUse when the user asks for an end-to-end example, walkthrough, or sample of doing something in NocoBase v2 — "show me how to", "walk me through", "give me a complete example", "sample script for NocoBase". Indexes worked scenarios that mix REST API and `nb` CLI calls./nocobase-acl-manageNocoBase 2 only; never use in a NocoBase 3 project. Task-driven ACL governance through nb CLI for role lifecycle, global role mode, permission policy, Portal entry access, user-role membership, and risk assessment. Use when users describe business permission outcomes instead of raw command arguments, including which roles may enter a Portal./nocobase-ai-builderNocoBase 2 only; never use in a NocoBase 3 project. Design, build, and verify source-code applications in NocoBase AI Portals based on @nocobase/portal-template-default. This skill is mandatory whenever the selected Portal has portalType "ai". Use it for complete systems, pages, navigation, CRUD, dashboards, forms, dialogs, drawers, URL-addressable subpages, authentication UI, frontend access control, localization, themes, NocoBase API integration, responsive design, test-driven verification, and safe upgrades of existing Portal template, SDK, and Registry source.