/nocobase-dev:nocobase-publish-manage [action: plan|run|validate] [method: backup|migration] [source-env=dev] [target-env=dev] [file?] [rule-id?]from nocobase-dev
NocoBase 2 only; never use in a NocoBase 3 project. Use when users need NocoBase backup restore or migration publish operations through nb api backup and nb api migration commands.
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.
Orchestrate NocoBase backup restore and migration workflows with the current API CLI command surface.
The skill converts user intent into an API-first publish context, carries generated names and local paths between steps, and requires explicit confirmation before restore or migration execution changes target data.
nb api backup.nb api migration.nb api migration rules.nb api migration logs for diagnosis.source_env=dev and target_env=dev.| Input | Required | Default | Validation | Clarification |
|---|---|---|---|---|
action | yes | inferred | plan, run, or validate | "Should I plan, run, or validate the workflow?" |
method | run: yes | inferred | backup or migration | "Use backup restore or migration publish?" |
source_env | conditional | dev for tests | non-empty env name | "Which environment provides or generates the file?" |
target_env | run: yes | dev for tests | non-empty env name | "Which environment should receive and execute the file?" |
backup_name | optional | unset | backup file name from backup list/create | "Which server backup should be restored or downloaded?" |
migration_name | optional | unset | migration file name from migration list/create | "Which server migration package should be downloaded?" |
local_file | optional | unset | readable local .nbdata path | "Which local package file should be uploaded or executed?" |
cli_home | optional | CLI global home | writable CLI home directory | "Which CLI home should store downloaded release files?" |
rule_id | migration create only | unset | non-empty id | "Which migration rule ID should be used?" |
migration_user_rule | migration rule create only | schema-only | schema-only or overwrite | "How should user-defined tables be handled?" |
migration_system_rule | migration rule create only | overwrite-first | overwrite-first or schema-only | "How should system tables be handled?" |
title | migration create only | publish-<source>-to-<target> | non-empty text | "Which migration title should be used?" |
execute_options | optional | safe CLI defaults | known nb api backup restore* or nb api migration execute flags | "Any high-risk flags such as --skip-backup or --skip-revert-on-error?" |
confirm_publish_input | before create/download/rule create/check | unset | explicit approval | "Confirm the selected input before I create, download, or check the package." |
confirm_execute | before restore/execute/remove | unset | must be confirm | "Type confirm to execute on the target environment." |
method, source_env, and target_env.rule_id.backup or migration.method, sourceEnv, targetEnv, cliHome, releaseDir, backupName, migrationName, localFile, downloadPath, ruleId, title, and step.Not Found, unknown resource, inactive plugin, or license capability errors as unsupported_publish_env.nb api backup restore-upload --file <localFile> -e <targetEnv> --force.nb api backup restore --name <backupName> -e <targetEnv> --force.sourceEnv, download it to <cliHome>/release/<sourceEnv>/<backupName>, then restore-upload that path on targetEnv with --force.targetEnv, then execute it on targetEnv.sourceEnv to <cliHome>/release/<sourceEnv>/<migrationName>, check it on targetEnv, then execute it on targetEnv.sourceEnv, poll migration get until the generated package reports status=ok, download it to <cliHome>/release/<sourceEnv>/<migrationName>, check it on targetEnv, then execute it on targetEnv.backup status, backup restore-status --task <taskId>, migration get, and migration logs.taskId from data.taskId or data.task, then pass that value to backup restore-status --task.See Runtime Contract for exact command construction and parsing rules.
| Reference | Use When |
|---|---|
| Intent Routing | Mapping user phrases to backup, migration, file reuse, and environment shape. |
| Runtime Contract | Building commands and carrying names, paths, rules, and status between steps. |
| Test Playbook | Validating supported API workflows and failure cases. |
High-impact actions:
nb api backup restorenb api backup restore-uploadnb api backup removenb api migration executenb api migration removenb api migration rules create--skip-backup or --skip-revert-on-errorPublish input confirmation template:
Confirm publish input: <method> from <source_env> to <target_env>. Package source: <existing server file | local file | create new>. Migration rule: <ruleId/name | create new with user-defined-rule/system-defined-rule | not applicable>. Reply `confirm input` to continue with package creation, download, or check.
Execution confirmation template:
Confirm execution: <backup restore | migration execute> on <target_env> using <backupName | migrationName | localFile>. This may change target data. Reply `confirm` to continue.
Failure guidance:
data.taskId or data.task, inspect nb api backup restore-status --task <taskId> -e <targetEnv>.migration get reports status=in_progress, tell the user the package is still generating, wait, and do not run migration download until status=ok.nb api migration logs list -e <targetEnv> and relevant logs get/download output.nb api backup and nb api migration command groups.sourceEnv=dev and targetEnv=dev.unsupported_publish_env.backup restore --name when restoring inside the same target environment.backup download followed by backup restore-upload --force.--force directly.<cliHome>/release/<sourceEnv>/.migration check --file before migration execute --file.rule_id.migration rules create uses global rule options.migration rules get when possible.--output.--task <taskId> and are only run after a task id is returned as data.taskId or data.task.agents/openai.yaml (opens in a new tab)references/intent-routing.md (opens in a new tab)references/test-playbook.md (opens in a new tab)references/v1-runtime-contract.md (opens in a new tab)tests/README.md (opens in a new tab)tests/capability-test-plan.md (opens in a new tab)tests/test-playbook.md (opens in a new tab)What 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.