- name
Configure and use file storage with @nocobase/drive in NocoBase 3 applications, including local filesystem, S3-compatible storage, native Aliyun OSS, and custom driver factories. Use when changing dri
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-drive -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nocobase/nocobase --skill nocobase-drive -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-drive -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nocobase/nocobase --skill nocobase-drive -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/libs/drive/skills/nocobase-driveFrom the publisher
Use @nocobase/drive for storage operations. It wraps Flydrive with application configuration and a native Aliyun OSS driver. Choose the relevant reference before changing a disk:
Configure default and disks in server/config/drive.ts; config.yml can override serializable object options. A disk name is the key in disks, while driver selects an implementation. For example, local: { driver: 'fs', ... } is selected by drive.use('local'). default must name an entry in disks. Objects and synchronous factories can coexist; no separate services configuration or driver registry is required.
Keep the application's existing DriveProvider and import driveManagerToken from @nocobase/app-server/drive. In server code that already has an application instance:
import { driveManagerToken } from '@nocobase/app-server/drive';
const drive = app.container.resolve(driveManagerToken);
const disk = drive.use();
await disk.put('reports/example.txt', 'Example report');
const contents = await disk.get('reports/example.txt');
Use drive.use(name) to select another disk. Pass storage keys relative to that disk, such as reports/example.txt; do not pass an absolute filesystem path, a URL, or a pre-encoded key. The manager creates disks on first use and caches successful creation. Resolve the shared manager instead of constructing one per request.
File Repository selects these same disks by name. Use the installed File plugin for file records, Repository upload/download operations, and their permissions. Direct Drive operations do not create File Repository records or perform its authorization checks. Changing the default disk does not move stored objects or rewrite existing records.
visibility does not itself guarantee HTTP access or isolation. Filesystem serving and object storage policies determine actual access; generating a public URL does not grant permission to a private object. Read the selected driver's URL behavior before exposing a link.
Release artifact storage needs serializable configuration. Custom factories are rejected when selected by releases.artifact.disk. Named artifact references currently accept private fs and s3 objects; use the complete OSS object directly under releases.artifact or host.artifact for OSS, as the OSS guide describes.
For standalone use, call prepareDriveStorage(config) before createDriveManager(config) when filesystem directory preparation is needed. The application Provider already performs preparation. Tests can supply createDriveManager(config, { fakes: { location } }) and use Flydrive's fake()/restore(); fakes verify application behavior without proving remote credentials, ACLs, or network access.
Verify a configuration change with a write, read or streamed download, and deletion under a disposable key. Check public or signed links from the intended client's network when the feature uses them. Report whether verification used local storage, fakes, or the real remote service. For custom drivers, also verify lazy creation and repeated use through the shared manager.
Set drive.disks.<name>.maxFileSizeMb to a positive integer in MiB, default 20. Invalid values on any disk, including unused disks, fail application startup. The framework validates these limits for every application during configuration loading. getUploadLimit(name?) returns the selected disk’s { maxFileSizeMb }; consumers calculate bytes at their boundary. DEFAULT_FILE_UPLOAD_LIMIT and the browser-safe @nocobase/drive/upload-limits entry provide the shared default. Custom factory functions may declare the same optional property. Issue, comment and Agent conversation attachments enforce these limits. General File Repository uploads and direct Drive operations keep their own limits. Restart after changing deployment configuration, and increase the reverse proxy body limit to allow the multipart envelope.
© 2026 Skills Rack.
---name: nocobase-drivedescription: Configure and use file storage with @nocobase/drive in NocoBase 3 applications, including local filesystem…---# packages/libs/drive/skills/nocobase-drive/SKILL.mdOverview
Configure and use file storage with @nocobase/drive in NocoBase 3 applications, including local filesystem, S3-compatible storage, native Aliyun OSS, and custom driver factories. Use when changing drive configuration, storage credentials, file operations, or storage URLs. File Repository collections and upload permissions belong to the File plugin.
FAQ
Download packages/libs/drive/skills/nocobase-drive/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.