cloudcannon/agent-skills

cloudcannon-dev-server

Use 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.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/cloudcannon/agent-skills --skill cloudcannon-dev-server

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

The CloudCannon dev server

cloudcannon dev runs the real CloudCannon app against local files, with no login, on one origin. This skill starts the local editing loop and hands it to the user.

The rule that costs the most sessions

MUST rebuild the site after every change. `cloudcannon dev` never builds.

Why: the server serves a directory and syncs source files; it does not run the SSG. --app-sync carries an editor save to disk, so the field shows the new text — but the preview renders the built output, and nothing regenerated it. The user sees their edit in the field and the old page beside it, with no error anywhere.

The loop

sh
cloudcannon configure detect-build-commands   # build command and output directory
<build the site>                              # see The build command, below
cloudcannon dev <output-dir> --port 10101     # leave running

Then tell them to open http://localhost:10101, and that Ctrl-C stops the server.

They do thisThis happens
Change a source file in the editorIt reaches disk. Rebuild, then the preview updates itself
Change a source file on diskSame — the server syncs it into the app. Rebuild, same result

The preview reloads itself whenever the output directory changes, so a rebuild in a second terminal closes the loop with nothing else running. See dev-server-api.md § Events.

Offer the user both routes and let them pick:

RouteWhat they doCosts
ManualRe-run the build after a batch of editsNothing. Rebuild when they want a fresh preview
WatchedRun watch-build.mjsA full build per change

Default to manual. A watched rebuild after each save changes the output directory, and the preview then reloads the whole page. The editable regions' own in-place re-render is hidden behind that reload, so testing visual editing feels jarring. Manual also suits a slow build, or a post-build step that rewrites the whole output.

Offer watched when the user wants the preview to follow edits that editable regions don't re-render on their own: content edited in the source editor, data files, templates or styles.

The build command

MUST detect the build with the CLI rather than by looking for config files. cloudcannon configure detect-build-commands is the product's own detection and covers every SSG the CLI knows. MUST NOT keep a second detection table anywhere in this skill; it would drift from the CLI's. Take the command it suggests (npm run build), not the bare SSG command — see setup.md § Build commands.

When to use

  • The user wants to see and edit their site in CloudCannon before it is deployed anywhere
  • You just wrote editable regions, collections or inputs and the user needs to try them
  • The user reports a page as missing, blank or broken in CloudCannon, and you need to reproduce it locally against the real app

When not to use

  • Authoring collections, inputs or structures — that is `cloudcannon-configuration`. This skill serves the result; it does not decide it.
  • Authoring editable regions — that is `cloudcannon-visual-editing`.
  • Checking that a site's output is correct — whether URLs match the collection config, whether pages are orphaned. This skill starts a server; it does not grade the site.
  • Driving the editor in a browser — clicking regions, dumping inputs, screenshotting. Ask the user to look.
  • Final sign-off. Local CloudCannon has no real save-to-git, no build pipeline and no permissions. A human still confirms on the hosted site.
  • Testing hosted-only behaviour. The local app isn't told the SSG, so SSG-specific rules don't apply locally — a Hugo site's config files show in a collection locally even without include_developer_files (Site config as data). Creating new files isn't a faithful test either: an unsaved new entry carries a temporary flat name.

Contents

FileCovers
setup.mdPrerequisites, what cloudcannon dev does and does not do, the build, ports
dev-server-api.mdThe /__api surface — every route and the event stream
troubleshooting.mdSymptom → cause → fix
scripts/README.mdwatch-build.mjs and its flags

Common mistakes

ExcuseReality
"cloudcannon dev is running, so the loop works."It serves a directory and nothing else. Until something rebuilds, the preview is whatever was built last.
"The editor saved but the page did not change."Expected. Rebuild — and with a watcher, wait for the build to finish.
"I will open /index.html to see the built page."/ and /index.html both serve the CloudCannon app. The built homepage is at /__output/index.html.
"/about/ returns 500, the server is broken."The server has no directory index. Request /about/index.html.
"Port 10101 answers, so my site is up."It proves a dev server is there, not that it is yours. Serve on a port you chose and know is free.
"The diff is huge, something corrupted it."CloudCannon reserialises the whole frontmatter on save. Diff the field you changed.
같은 저장소의 Skills

더 많은 Skills

모든 Skills
cloudcannon
커뮤니티

brainstorming

Structured 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.

1시간 설치 수
7
GitHub Stars
9
업데이트
10월 28일
cloudcannon
커뮤니티

cloudcannon-bookshop

Use when a CloudCannon site uses Bookshop — .bookshop.yml files, @bookshop/ packages, bookshopname 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.

1시간 설치 수
7
GitHub Stars
9
업데이트
10월 28일
cloudcannon
커뮤니티

cloudcannon-cli

Use 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.

1시간 설치 수
7
GitHub Stars
9
업데이트
10월 28일
cloudcannon
커뮤니티

cloudcannon-configuration

Use 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 - Troubleshooting missing fields or Input types

1시간 설치 수
7
GitHub Stars
9
업데이트
10월 28일