/agent-skills:cloudcannon-sdkfrom agent-skills
Provides the CloudCannon REST API client for programmatic access — constructing clients, finding UUIDs, reading/writing files, triggering builds, and reaching endpoints the CLI doesn't cover (DAMs, backups, site scans, screenshots, provider connections, site copy/delete).
Ships in agent-skills. 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.
@cloudcannon/sdk is the REST API client the CloudCannon CLI is built on. It exposes a hierarchy of sub-clients over the API, plus a typed fetch that reaches endpoints no sub-client wraps.
Reach for it when the work is programmatic. Reach for the CLI when the work is a shell command.
site.copy, site.deletecloudcannon-cli. If a command already does the job, use it; it resolves site names, prints JSON, and needs no client wiring.cloudcannon dev is covered end to end by cloudcannon-dev-server. The SDK has nothing to do with it.cloudcannon.config.yml — that is cloudcannon-configuration. The SDK reads and writes the file as bytes; it has no opinion on its contents.cloudcannon-visual-editing and cloudcannon-snippets.MUST confirm with the user before any call that writes to a hosted site. This is the same rule the CLI carries, and the reason is the same — see cloudcannon-cli § The rule that costs the most for the canonical statement.
Two things make it easier to break here than at the command line:
site.delete() is a method call with no arguments, no flag, and no confirmation prompt.site.delete(), site.copy(), disconnectSourceProvider(), disconnectOutputProvider().The gate covers client.fetch too. A POST through the escape hatch is a write.
Node 20 or newer, per the package's engines field — lower than the CLI's Node 24. The package is ESM ("type": "module") and its default export is the client class.
import CloudCannonClient from "@cloudcannon/sdk";
Sub-clients take a UUID and nothing else, so almost every task starts by finding one.
import CloudCannonClient from "@cloudcannon/sdk";
// The SDK reads no credentials of its own — you supply them.
const client = new CloudCannonClient({
userAccessKey: {
id: process.env.CC_ACCESS_KEY_ID,
secret: process.env.CC_ACCESS_KEY_SECRET,
},
});
const { items: orgs } = await client.orgs();
const { items: sites } = await client.org(orgs[0].uuid).sites({ filters: { search: "my-site" } });
const site = await client.site(sites[0].uuid).get();
| File | Covers |
|---|---|
| SKILL.md (this file) | Routing, the write gate, requirements |
| client.md | Constructing the client, the config shape, and why it reads no credentials itself |
| resources.md | The sub-client hierarchy, UUID addressing, pagination, return types |
| api-surface.md | Reading the authoritative method list, and the raw client.fetch escape hatch |
| editing-sessions.md | Writing files to a hosted site through the SDK |
| troubleshooting.md | Symptom → cause → fix |
| Excuse | Reality |
|---|---|
"I'll pass the site name to client.site()." | Sub-clients take a UUID only. Resolve it first — resources.md § Addressing a resource. |
"client.sites() will list every site I can see." | There is no such method. Sites are listed per organisation. See resources.md. |
"The SDK will pick up my cloudcannon login credentials." | It reads nothing from disk or the environment. That chain is a CLI feature — client.md. |
| "I'll write out the method signatures from memory." | Signatures change between releases. Read them from the installed package — api-surface.md. |
"await site.getFile(path) gives me the file contents." | It gives you a Response. Several methods do — resources.md § What a method returns. |
| "The list came back, so that's all of them." | Paginated endpoints return one page. Check total_pages — resources.md § Pagination. |
"client.fetch is the low-level API, so the write gate is a CLI thing." | The gate is about the endpoint, not the wrapper. A POST through fetch writes to a live site exactly as a named method does. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cloudcannon-api, rest-client, cms-automation, site-management
npx claudepluginhub cloudcannon/agent-skills --plugin agent-skills11 skills in this plugin
/brainstormingStructured design dialogue before CloudCannon work that has more than one sensible answer — a migration's editability tradeoffs, how to model a collection or page builder, restructuring content or config, or an ambiguous "make this work with CloudCannon". Explores intent and constraints, then presents a design for approval before implementation. Not for single well-defined tasks, clear bug fixes, or a detailed spec./cloudcannon-bookshopUse when a CloudCannon site uses Bookshop — `*.bookshop.yml` files, `@bookshop/*` packages, `_bookshop_name` keys, `bookshop:live`, or `partial "bookshop"` calls or `{% bookshop %}` tags. Covers how Bookshop works, maintaining a site that stays on it, and migrating it to editable regions./cloudcannon-cliUse when running the CloudCannon CLI — logging in, listing or creating sites, reading and writing files on a hosted site, triggering and inspecting builds, changing a site's build configuration, reading form submissions, or finding out which command and flags exist for a task./cloudcannon-configurationUse when configuring a site for CloudCannon for any of the following. Download the JSON schemas before writing any configuration (see the top of SKILL.md).
- Setting up cloudcannon.config.yml or .cloudcannon/initial-site-settings.json - Generating a baseline with the CloudCannon CLI - Adding or modifying Collections, Inputs, Structures, or Select Data - Setting up Structures for Array and Object Inputs - Configuring Collection URLs - Scheduling builds to publish future-dated content (_schedule.txt) - Configuring a site in a monorepo, or several sites in one repository - Troubleshooting missing fields or Input types/cloudcannon-dev-serverUse when running a CloudCannon site locally with `cloudcannon dev` — starting the local editing loop so the user can edit in the CloudCannon editor and see the site rebuild, choosing the build command per SSG, and reading the `/__api` surface the server exposes./cloudcannon-snippetsUse when adding snippet support to a CloudCannon site, configuring MDX components (Astro, Next.js), MDC components (Nuxt Content), Hugo shortcodes or Eleventy shortcodes and includes for the Content Editor, debugging snippet round-trip issues, or setting up inline HTML snippets in markdown content.Other plugins' skills for the same job