/nocobase-dev:nocobase-file-manager [action: inspect|create|update|verify|finalize|delete] [target: storage|file-collection|relation|file-record] [env?: name]from nocobase-dev
NocoBase 2 only; never use in a NocoBase 3 project. Manage NocoBase file storage engines, file collections, their business relations, and file records through nb CLI. Use when the primary task concerns NocoBase file storage configuration, file-model setup, access or retention behavior, or storage/file-record lifecycle.
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.
Configure and use NocoBase file storage safely from the user's point of view: choose a storage engine, create or update it, model first-class file collections, relate business records to those files, and verify storage and file lifecycle behavior through supported nb api commands.
local, s3, ali-oss, tx-cos, and optional s3-compatible (S3 Pro) storage records.template: "file" collection and ordinary relation fields that point to it.nb api resource for ordinary resource CRUD and the high-level data-modeling commands for file collections and relations.attachment interface or model new business data against the shared attachments collection.nb api resource flag; generic resource create accepts JSON records, not local file bytes.nb api command exists.| Input | Required | Default | Validation | Clarification Question |
|---|---|---|---|---|
action | yes | inspect | one of inspect/create/update/verify/finalize/delete and valid for the selected target | "Which file-manager action should I perform?" |
target | mutation: yes | infer for unambiguous inspect/verify only | one of storage/file-collection/relation/file-record | "Which storage, file collection, relation, or file record should I manage?" |
env | no | current CLI environment | configured, reachable, and authenticated | "Which NocoBase CLI environment should I target?" |
identifier | single-target inspect/update/verify/delete: yes | none | exact storage ID/name, collection name plus field name, or file-record primary key; optional for list inspection | "What is the exact target identifier?" |
storageType | storage create: yes | none | one of local/s3/ali-oss/tx-cos/s3-compatible; type must be registered | "Which storage engine type should be configured?" |
storageValues | storage create/update: yes | none | engine-specific fields; secrets must use {{env.VARIABLE_NAME}} placeholders | "Which non-secret settings and environment-variable placeholders should be used?" |
relationSpec | relation create: yes | none | source business collection, target file collection, field names, and one of m2o/o2m/m2m from real ownership/reuse needs | "Which business collection owns or reuses which file collection?" |
fileMetadata | file-record finalize: yes | none | authoritative metadata from a verified external/direct upload; never a local-file path presented as an upload | "What authoritative metadata did the completed external upload return?" |
confirmation | high-risk mutation: yes | none | fresh confirmation after exact target and impact are shown | "Confirm this exact destructive or access-changing operation?" |
Rules:
storage: inspect/create/update/verify/delete;file-collection: inspect/create/verify;relation: inspect/create/verify;file-record: inspect/finalize/update/verify/delete.interface: "attachment". Create a file collection first, then create an ordinary relation to it.nb api resource create --resource <fileCollection> as metadata finalization only when the object already exists in storage; it is not a binary upload.2.3.{{env.FILE_S3_SECRET_ACCESS_KEY}}, never plaintext.default, URL mode, public access, signed-URL behavior, storage binding, paranoid, rename mode, path, or upload rules, show the exact access or lifecycle impact and obtain fresh secondary confirmation.nb api resource, data-modeling commands, authentication, or the required storage type is unavailable, stop before writing.nb env current, nb env update <env> --verbose, and only the relevant --help commands. Fetch plugins/file-manager Swagger only for optional or version-specific behavior.storageId, URL behavior, rules, and physical-deletion expectations.| Reference | Use When | Notes |
|---|---|---|
| Command map | Selecting exact nb api resource, Swagger, or data-modeling commands. | Defines supported CLI boundaries and readback sequences. |
| Storage engines | Choosing or configuring local/cloud/S3 Pro storage. | Includes case-sensitive option names and safe defaults. |
| File modeling | Creating or verifying a file collection/relation, or interpreting file-record semantics. | Enforces the no-attachment-field rule. |
| Operations and safety | Changing access/lifecycle settings, deleting, or troubleshooting. | Covers stable URLs, permissions, CORS, default and retention behavior. |
High-impact actions:
paranoid, rename mode none, storage path, MIME rules, or size limits;File collection and relation deletion are outside this skill and must not be inferred from the generic delete action.
Secondary confirmation template:
<action> on <exact target> in <env>. Expected impact: <access, upload, relation, record, and physical-object impact>. Rollback: <available or unavailable>. Type confirm to continue."Rollback guidance:
storageId. Roll back the collection binding separately from historical records.s3-compatible.nb api resource with options and settings excluded.template: "file" and the intended storage system name.m2o, o2m, or m2m relation targeting the file collection; no new attachment interface exists.storageId, filename/path semantics, stable URL/original URL choice, and preview behavior match the engine.o2m/m2o relation pair, and read all objects back.Final response must include:
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./