deploy-private-cloudflare-site
БесплатноЗапускает вложенные скриптыНе проверенDeploy, protect, debug, and verify a private Cloudflare Workers site for an exact user or email allowlist. Use for Workers or framework sites that must…
от amanaiproduct★ 80 звёзд на GitHubОб этом скилле
Deploy Private Cloudflare Site
Deploy a site behind a fail-closed identity boundary, preserve framework asset delivery after authentication, and verify the public surface before handing it off.
Non-negotiable rules
- Treat private content, source data, build artifacts, and identity-provider credentials as sensitive.
- Prefer Cloudflare Access attached to the Worker. Use application-managed Google OAuth only when Access is unavailable, unsuitable, or explicitly requested.
- Keep the production route disabled or return a fail-closed maintenance response until the identity boundary and required secrets exist.
- Never place client secrets, signing keys, or API tokens in
vars, source files, command-line arguments, logs, or chat output. Usewrangler secret putthrough interactive or file-based input. - Do not fabricate API tokens or ask for account passwords. Use Wrangler OAuth, the Cloudflare API MCP OAuth flow, or a narrowly scoped token the user creates.
- Require explicit authorization before transferring an identity-provider secret from one service to Cloudflare.
- Do not declare success from a local build alone. Test the deployed anonymous boundary and one authenticated browser session.
- Retrieve current official Cloudflare and identity-provider documentation before changing live configuration. Cloudflare's Workers and Access surfaces evolve quickly.
Load the focused references
- Read references/workflow.md before choosing the protection architecture or changing live resources.
- Read references/troubleshooting.md when deployment succeeds but requests fail, assets 404, or the page does not hydrate.
- Run
scripts/verify-private-boundary.mjsbefore handoff.
Workflow
1. Inspect before mutating
- Find repository instructions and inspect the working tree without overwriting unrelated changes.
- Identify the framework, build command, build output, Wrangler version, existing
wrangler.jsoncor generated config, routes, asset binding, and current public URLs. - Check Cloudflare identity non-destructively with
wrangler whoami. If unavailable, usewrangler login; use--browser=falseor device flow in a headless environment. - Check whether the Cloudflare plugin or Cloudflare API MCP is installed. Use it when available for account configuration, but keep Wrangler for build/deploy/tail operations.
- Enumerate every public path: production hostname,
workers.dev, preview URLs, custom domains, static chunks, API endpoints, source maps, and old hosts. - Record the intended allowlist and whether each identity is a Gmail, Workspace, or non-Google address. Do not assume a private-relay address can securely authenticate through Google.
2. Choose one protection architecture
Use this order:
- Worker-level Cloudflare Access: preferred because every domain and preview attached to the Worker can be protected together.
- Hostname/path Access: use when only a specific route or custom hostname should be private, or when WebSockets make Worker-level Access unsuitable.
- Application-managed OAuth: use only after documenting why Access is not being used. This adds callback, CSRF, token-validation, session, and asset-gating responsibilities to the application.
For exact people in Access, create an Allow policy whose Include selector is Emails with the complete addresses. Do not use Everyone, Login Methods: One-time PIN, or a broad email-domain rule when the requirement is an exact allowlist.
For a non-Google address, Cloudflare Access with email one-time PIN can authenticate ownership without pretending Google is authoritative for that address. If stronger assurance is required, configure its actual identity provider.
3. Build a fail-closed Worker boundary
For Cloudflare Access:
- Attach Access to the Worker or exact hostname before enabling the public route.
- Use
ctx.accessonly when application code needs the authenticated identity; Access itself should reject unauthorized requests before the Worker runs. - Confirm the policy is deny-by-default and includes only intended addresses.
For application-managed Google OAuth:
- Use the authorization-code flow with an exact HTTPS redirect URI.
- Generate and verify
state; usenonceand PKCE where supported. - Exchange the code server-side. Validate the ID token signature,
iss,aud,exp, nonce, and verified identity claims against current Google guidance. - Normalize the email for allowlist comparison, but use the Google
subclaim as the stable account identifier in stored user records. - For Gmail, Google is authoritative for the address. For Workspace, require
email_verifiedand the expectedhdclaim. For non-Gmail addresses withouthd, flag that Google does not provide continuing authority over the underlying mailbox. - Sign the application session with a dedicated random secret. Set cookies
Secure,HttpOnly, andSameSite=Lax
Установить deploy-private-cloudflare-site в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл deploy-private-cloudflare-site?
Deploy, protect, debug, and verify a private Cloudflare Workers site for an exact user or email allowlist. Use for Workers or framework sites that must require Cloudflare Access, Google OAuth, or another SSO boundary; when protecting Workers Static Assets and framework chunks; when Wrangler/headless OAuth, secrets, workers.dev routes, errors 1042/1101, or unhydrated pages cause trouble; and when proving that anonymous users cannot retrieve sensitive HTML or assets.
Как установить скилл deploy-private-cloudflare-site?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deploy-private-cloudflare-site запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic