/agent-skills:cloudcannon-snippetsfrom agent-skills
Configures snippet support in CloudCannon's Content Editor for MDX (Astro, Next.js), MDC (Nuxt Content), Hugo shortcodes, Eleventy shortcodes, and inline HTML snippets in markdown. Helps debug round-trip parsing and toolbar issues.
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.
Snippets let editors insert and edit complex markup (components, shortcodes, embeds) inside CloudCannon's rich text Content Editor. This skill covers both the SSG layer (how components are imported/built) and the CloudCannon layer (_snippets config that teaches the editor the syntax).
cloudcannon-configuration and the migration skill's page-building guide.cloudcannon-visual-editing. Snippets insert new markup; editable regions edit markup already on the page.| Doc | When to read |
|---|---|
| snippets.md | Start here. Overview of both layers, configuration hierarchy, which approach to use, snippet properties, toolbar setup, raw HTML snippets in .md files |
| template-based.md | Component syntax matches a built-in template (most common path) |
| raw.md | Component needs custom syntax (e.g. client:load, non-standard attributes) |
| built-in-templates.md | Understanding built-in MDX, Hugo and Eleventy templates, the import bundle, parser internals |
| gotchas.md | Preventative rules — the pitfalls and their workarounds |
| troubleshooting.md | Symptom index — start here when something is already broken, it routes to the rule |
SSG-specific:
| SSG | Doc |
|---|---|
| Astro | astro/overview.md — MDX stack, astro-auto-import, when to use MDX vs raw |
| Hugo | hugo/overview.md — shortcodes, built-in shortcode imports, picking a Hugo template |
| Eleventy | eleventy/overview.md — shortcodes and includes, picking a Liquid or Nunjucks template, {% raw %} |
| Next.js | nextjs/overview.md — @next/mdx, next-mdx-remote or a content layer, the shared components map |
| Nuxt | nuxt/overview.md — Nuxt Content markdown settings, MDC components as raw snippets |
| Case | Approach |
|---|---|
| Component syntax matches a built-in template | Template-based — see template-based.md |
| Extra syntax, SSG directives, custom parsing | Raw — see raw.md |
Inline HTML in .md (<figure>, <video>) | Raw snippets — see snippets.md § Raw snippets for inline HTML |
| Same component at the start or end of 3+ files in a collection | Maybe a layout field — apply the tests in snippets.md § Snippet or layout field? and ask the user |
Most setups use template-based for simple components and raw for anything with SSG-specific directives.
Read this before starting and verify every item when done.
_snippets entry_editables includes snippet: true on relevant content blocks_inputs are configured for snippet fields (image fields get type: image, etc.)view: gallery for image-bearing snippets)picker_preview uses static values (not key: lookups, which don't resolve in picker context)| Excuse | Reality |
|---|---|
| "The built-in templates handle this" | Verify the round-trip. Built-in templates have known edge cases — see gotchas.md. |
| "I'll configure the snippet toolbar later" | No toolbar means editors can't insert snippets. Add snippet: true to _editables now. |
| "This component is too niche for a snippet" | If editors encounter it in content, they need to be able to edit it. Configure it. |
| "Import statements in content are fine" | Resolve components from one shared place (Astro: astro-auto-import; Next.js: mdx-components.tsx or a shared components map; Nuxt: components/content/) to keep imports out of content files. Hugo and Eleventy shortcodes need no import. |
"I can use _snippets_imports for this" | Don't. It loads catchall matchers that can match incorrectly. Write explicit _snippets entries. Pre-built snippets only an import provides (Hugo's built-in shortcodes, Eleventy's {% raw %}) are the exception — include them by name. |
"I configured _snippets, snippets are done" | Without astro-auto-import wired in astro.config.mjs AND the import lines removed from MDX files, editors still see raw import statements at the top of MDX content. All four pipeline steps are required — see astro/overview.md § MDX setup pipeline. |
| "Inline image grid in MDX is fine as raw HTML" | Editors can't safely edit raw <div class="grid"> + <Image> blocks. Extract to a self-closing <Gallery images={[{src, alt}, ...]} /> component (auto-imported) with a matching _snippets entry — see template-based.md § Array-of-objects props. See cc-friendly-conventions.md § Image galleries in MDX content. |
astro/overview.md (opens in a new tab)built-in-templates.md (opens in a new tab)eleventy/overview.md (opens in a new tab)gotchas.md (opens in a new tab)hugo/overview.md (opens in a new tab)nextjs/overview.md (opens in a new tab)nuxt/overview.md (opens in a new tab)raw.md (opens in a new tab)snippets.md (opens in a new tab)template-based.md (opens in a new tab)troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-sdkUse when calling the CloudCannon API from code — constructing a client, finding a site or organisation UUID, reading or writing files on a hosted site programmatically, triggering and inspecting builds, or reaching a CloudCannon endpoint the CLI has no command for (DAMs, backups, sync history, site scans, screenshots, provider connections, copying or deleting a site).Other plugins' skills for the same job