cf-page
БесплатноЗапускает вложенные скриптыНе проверенDeploys a static site (a single HTML file or a folder) to Cloudflare Pages — both a one-command local wrangler deploy and a GitHub Actions CI/CD pipeline…
от htlin222★ 78 звёзд на GitHubОб этом скилле
Cloudflare Pages deploy (cf-page)
Ship a static site to Cloudflare Pages two ways from one setup: ./deploy.sh locally, and GitHub Actions on every push to main. Credentials live in .env (gitignored); only .env.example is committed.
The one thing the user must do — creating the token
The API token is the only manual step. Tell the user explicitly and link it:
Open https://dash.cloudflare.com/profile/api-tokens → "Create Token" → pick the "Cloudflare Pages" template (Edit) → Continue to summary → Create Token → copy it.
Then they paste it into .env (see below). Everything else — account ID, project creation, deploy, CI secrets — is automated.
Prerequisites
ghauthenticated (gh auth status) — for creating the repo and setting CI secrets.wranglervianpx --yes wrangler@4— no install needed.- Account ID:
npx wrangler whoamiprints it if the user has runwrangler login; otherwise it is on the dashboard (Workers & Pages → right sidebar). Account ID is not secret. - The site is static: a folder with an
index.htmlat its served root. Cloudflare Pages serves it directly — no build step.
Setup checklist
- Choose a project name — becomes
https://<name>.pages.dev(globally unique). - Add
.env.example(committed) and.env(gitignored) — templates below. - Fix
.gitignore— ignore.envand.env.*, keep!.env.example, ignoredist/and.wrangler/. - Get the token (link above) → paste into
.env. Get account ID (npx wrangler whoami) → paste into.env. - Local deploy: copy
scripts/deploy.shinto the repo,chmod +x, run it. - CI/CD: add the workflow and set two repo secrets — see references/github-actions.md.
- Verify:
curl -sI https://<project>.pages.dev/.
.env.example — commit this
# Cloudflare Pages credentials. Copy to .env and fill in. .env is gitignored.
# Token: https://dash.cloudflare.com/profile/api-tokens ("Cloudflare Pages" template)
CLOUDFLARE_API_TOKEN=
# Account ID: run `npx wrangler whoami`
CLOUDFLARE_ACCOUNT_ID=
# Pages project name -> https://<name>.pages.dev
CF_PAGES_PROJECT=my-site
# Optional: directory to deploy (default .) and production branch (default main)
# CF_PAGES_DIR=.
# CF_PAGES_BRANCH=main
.env — create locally, never commit
CLOUDFLARE_API_TOKEN= # user pastes the token here
CLOUDFLARE_ACCOUNT_ID= # from `npx wrangler whoami`
CF_PAGES_PROJECT=my-site
.gitignore — ensure these lines
.env
.env.*
!.env.example
dist/
.wrangler/
The !.env.example line is essential — .env.* would otherwise hide the example you want committed.
Local deploy
Copy scripts/deploy.sh into the repo (e.g. tools/deploy.sh), then:
chmod +x tools/deploy.sh
./tools/deploy.sh # deploys $CF_PAGES_DIR (default .) as $CF_PAGES_PROJECT
It sources .env, creates the Pages project on first run (ignoring "already exists"), and deploys with wrangler. If .env has no token but the user ran wrangler login, it falls back to that OAuth session.
CI/CD (GitHub Actions)
Push to main → assemble the site → wrangler pages deploy. Full workflow YAML and the two gh secret set commands: references/github-actions.md. Requires repo secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID.
Safety — do not skip
- Never commit
.env. Confirmgit check-ignore .envprints.env. Before committing, guard:git diff --cached --name-only | grep -qx .envmust find nothing. - Never print the token. Set secrets via a variable piped to stdin, never echo the value:
printf '%s' "$CLOUDFLARE_API_TOKEN" | gh secret set CLOUDFLARE_API_TOKEN. - Account ID may be shared freely; the API token may not.
Установить cf-page в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cf-page?
Deploys a static site (a single HTML file or a folder) to Cloudflare Pages — both a one-command local wrangler deploy and a GitHub Actions CI/CD pipeline — wiring up .env/.env.example and encrypted repo secrets. Use when the user wants to publish or deploy a static site or HTML to Cloudflare Pages, set up CF Pages CI/CD, mentions "wrangler pages" or "deploy to cloudflare", or asks for "cf-page".
Как установить скилл cf-page?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cf-page запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub