cloud-storage-web
БесплатноБез исполняемых скриптовНе проверенComplete guide for CloudBase cloud storage using Web SDK (@cloudbase/js-sdk) - upload, download, temporary URLs, file management, and best practices.
от TencentCloudBase★ 83 звезды на GitHubОб этом скилле
Sibling skills (local only)
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Cloud Storage Web SDK
Activation Contract
Use this first when
- A browser or Web app must upload, download, or manage CloudBase storage objects through
@cloudbase/js-sdk. - The request mentions
uploadFile,getTempFileURL,deleteFile, ordownloadFilein frontend code.
Read before writing code if
- The task is browser-side storage work but you still need to separate it from Mini Program storage, backend storage management, or static hosting deployment.
- The request may be blocked by security domains or frontend auth.
Then also read
- Web login and identity ->
../auth-web-cloudbase/SKILL.md - General Web app setup ->
../web-development/SKILL.md - Direct storage management through MCP tools ->
../cloudbase-platform/SKILL.md
Do NOT use for
- Mini Program file APIs.
- Backend or agent-side direct storage management through MCP.
- Static website hosting deployment via
manageHosting(action="upload"). - Database operations.
Common mistakes / gotchas
- Uploading from browser code without configuring security domains.
- Using this skill for static hosting instead of storage objects.
- Mixing browser SDK upload flows with server-side file-management tasks.
- Assuming temporary download URLs are permanent links.
- Ignoring
STORAGE_NOT_EXIST; it means the target storage bucket/resource is not ready, not that the browser upload code should fabricate a URL. - On local Vite or dev-server tasks, forgetting to whitelist the exact current browser
host:portbefore testingapp.uploadFile(). - Treating CloudBase PG /
pgstorelike the legacy NoSQL CloudBase storage. PG environments use a separatepgstorebackend whose buckets are NOT auto-created from your old NoSQL bucket. Ifpgstorehas no bucket, every upload returnsSTORAGE_BUCKET_NOT_FOUNDand the SDK then issuesPUT https://undefined/(visible in DevTools asnet::ERR_NAME_NOT_RESOLVED). Treat bucket existence as a hard prerequisite, just like Supabase: in Supabase Storage every upload must target an already-created bucket; CloudBase PG follows the same model.
Minimal checklist
- Confirm the caller is a browser/Web app.
- Initialize the Web SDK once.
- Confirm CloudBase storage exists in the current environment before testing upload. Use available MCP management/query tools to inspect or create/select the storage bucket when the environment has no default bucket. In a PG / pgstore environment, the legacy NoSQL bucket from
DescribeEnvsdoes NOT count as a usable pgstore bucket; create one explicitly before any browser upload. The legacy NoSQL bucket itself is still fine for legacyapp.uploadFile()flows that already target it — PG and NoSQL storage coexist; this skill applies to BOTH. - Check security-domain/CORS requirements.
- Pick the right storage method before coding.
Local dev recipe
When the app runs on a local browser origin and must upload files from the frontend:
- Use
queryEnvwithaction="domains"to inspect the current security-domain whitelist. - Convert the browser origin into the CloudBase whitelist entry format:
- Browser origin
http://127.0.0.1:4173-> whitelist entry127.0.0.1:4173 - Browser origin
http://localhost:5173-> whitelist entrylocalhost:5173
- Browser origin
- If the exact current host entry is missing, call
envDomainManagementwithaction="create"and add that host entry before relying onapp.uploadFile(). - If the runtime port may change between runs, do not assume any fixed default port list is sufficient. Re-check the actual browser origin you are really using for testing or final validation, then add that exact
host:port. - Tell the user that security-domain changes may take a few minutes to propagate; poll
queryEnv(action="domains")rather than blind-sleeping for a fixed long interval. - Only after that should you implement and test browser-side
app.uploadFile()flows.
If app.uploadFile() returns STORAGE_NOT_EXIST, stop editing frontend code and fix the environment-side storage resource first. Re-check the environment storage list, create or select an available bucket if the task allows it, then retry the same SDK upload flow.
If the task uses browser-side file upload, treat this as a prerequisite rather than an optional cleanup.
Bucket existence prerequisite (mandatory before any upload code)
Just like Supabase Storage, CloudBase Storage requires the target bucket to exist before any client-side upload. This is true for both legacy CloudBase NoSQL storage (STORAGE_NOT_EXIST) and the newer PG / pgstore backend (STORAGE_BUCKET_NOT_FOUND).
Mental
Установить cloud-storage-web в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cloud-storage-web?
Complete guide for CloudBase cloud storage using Web SDK (@cloudbase/js-sdk) - upload, download, temporary URLs, file management, and best practices.
Как установить скилл cloud-storage-web?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cloud-storage-web запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic