deploy-cf

deploy-cf is a skill for Claude Code, Codex from weiyi88/cc-code. It costs 16 tokens per session (3,216 once invoked), scanned A, original, MIT.

A deployment workflow for putting a Next.js web application on Cloudflare Pages, a hosting service that runs sites at Cloudflare's network edge. It checks the project configuration, builds the site, and handles the Cloudflare deployment and domain setup.

In plain words
What is it for?
Use it to prepare a Next.js App Router project, configure its Cloudflare files and edge routes, deploy it to Pages, and connect a custom domain.
Why use it?
It removes the manual configuration needed to make Next.js work with Cloudflare's edge runtime. It also catches required settings before deployment rather than after a failed release.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Part of the cc-code plugin — 17 skills, 3 agents, 1 hook shipped together

Good fit Use it to prepare a Next.js App Router project, configure its Cloudflare files and edge routes, deploy it to Pages, and connect a custom domain.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/weiyi88/cc-code/deploy-cf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add weiyi88/cc-code --skill deploy-cf
Clone the repo
git clone --depth 1 https://github.com/weiyi88/cc-code

Made for: Claude Code, Codex.

Or install cc-code, the plugin that ships this one along with the rest of its 17 skills, 3 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deploy-cf

README.md
[![agentmods](https://agentmods.dev/badge/skills/weiyi88/cc-code/deploy-cf/github.svg)](https://agentmods.dev/skills/weiyi88/cc-code/deploy-cf)
Your own site
<a href="https://agentmods.dev/skills/weiyi88/cc-code/deploy-cf"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/deploy-cf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deploy-cf

Your own site · 80×15
<a href="https://agentmods.dev/skills/weiyi88/cc-code/deploy-cf"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/deploy-cf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,216 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.03216
Opus 5.5 $0.00006 $0.01286
Sonnet 5.5 $0.00003 $0.00643
Haiku 4.5 $0.00002 $0.00322

Measured 1mo ago against content hash b67e1fb7a070, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deploy-cf scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -o /dev/null -w "HTTP %{http_code}" "https://<project-name>.pages.dev"
skills/deploy-cf/SKILL.md · 395 lines

How it starts

The opening of the file, as written. The whole thing — 395 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cloudflare Pages 上线技能

将 Next.js (App Router) 项目部署到 Cloudflare Pages Edge Runtime,包含完整的预检、构建、部署、域名配置流程。

适用场景

  • Next.js App Router 项目部署到 Cloudflare Pages
  • 已有 GitHub 仓库,需要上线到 Cloudflare
  • 需要为 Cloudflare Pages 配置自定义域名

完整流程

Phase 0: 预检(必做)

部署前必须检查以下项目配置,逐项修复:

0.1 wrangler.toml

确认项目根目录存在 wrangler.toml,内容必须包含:

#:schema node_modules/wrangler/config-schema.json

name = "<project-name>"
compatibility_date = "2024-12-01"
compatibility_flags = ["nodejs_compat"]
pages_build_output_dir = ".vercel/output/static"
  • name:项目名(小写,将作为 <name>.pages.dev 子域名)
  • compatibility_flags:必须包含 nodejs_compat,否则运行时 503 错误
  • pages_build_output_dir:必须设置,否则 wrangler 不会应用 compatibility_flags
0.2 next.config.mjs
/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  images: {
    unoptimized: true,  // Cloudflare Pages 不支持 Next.js 图片优化
  },
  // 注意:不要设置 output: 'export',@cloudflare/next-on-pages 会处理输出格式
};

export default nextConfig;
0.3 Edge Runtime 声明

所有动态页面和 API 路由必须添加 Edge Runtime 声明:

// app/page.tsx
export const runtime = 'edge';

// app/api/xxx/route.ts
export const runtime = 'edge';

// app/generator/[param]/page.tsx
export const runtime = 'edge';

⚠️ 关键限制(Next.js 15):

  • export const runtime = 'edge' 和 generateStaticParams 不能共存
  • 选择 edge runtime 就必须是动态渲染,放弃静态生成
  • params 类型变为 Promise<{...}>,需要 await params
// Next.js 15 正确写法
export default async function Page({
  params,
}: {
  params: Promise<{ platform: string }>;
}) {
  const { platform } = await params;
  // ...
}
0.4 依赖版本兼容
依赖 要求 原因
next >= 14.3.0 @cloudflare/next-on-pages 最低要求
@cloudflare/next-on-pages 最新版 构建适配器
eslint + eslint-config-next 版本匹配 ESLint v9 与 eslint-config-next 不兼容,用 v8
# 安装必要依赖
npm install -D @cloudflare/next-on-pages
# 如有 ESLint 冲突
npm install -D eslint@8 eslint-config-next@14

Read the full file on GitHub · 395 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -31 tokens per session b67e1fb7a070
  2. 1mo ago First seen · 395 lines · 47 tokens per session scan A b8139afe3bcb

Subscribe to this mod's changes

deploy-cf is a skill published in the GitHub repository weiyi88/cc-code (5 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 3,216 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.

Related

Other skills, from other repositories

flow-nexus-swarm

Cloud-based AI swarm deployment and event-driven workflow automation with Flow Nexus platform.

ruvnet/ruflo · 20 tokens

infrastructure

A guide for cloud-native infrastructure: software and configuration used to run applications in containers and manage cloud resources. It covers Kubernetes, Helm, Kustomize, GitOps tools such as ArgoCD and Flux, and infrastructure-as-code tools such as Terraform and Pulumi.

fengshao1227/ccg-workflow · 65 tokens

remote-compute-modal

Run GPU jobs on the user's own Modal account via host.compute.create('byoc:modal', ...). Covers the create→submit→waitfornotification flow, the computeprovider kernel for env setup, image/volume resolution, and the two approval cards. Load once you've decided to dispatch to Modal.

UnicomAI/wanwu · 65 tokens

compute-env-setup

Set up a compute environment on a remote provider so Claude Science jobs can run there. Covers direct SSH/conda hosts, Slurm clusters, container-via-bridge runners, and managed-API providers (Modal, GCP, RunPod). Use when standing up a new provider, porting an env to a different backend, adding a tool that needs its…

UnicomAI/wanwu · 134 tokens

managed-model-endpoints

Register a model service in the managed family — a local model server container the daemon starts/stops on demand, or a remote upstream model API (https). Read the runbook, allocate a port (local only), compose idempotent start/stop scripts (local only), register once. Load when the user wants a model service…

UnicomAI/wanwu · 83 tokens

vs-project

Create Viking web projects, start and verify a local preview, or deploy a generated project to Volcengine IGA Pages when explicitly requested. Includes agent-guided feature, eligible application, dataset, scene, and authentication choices. Use only after confirming the installed CLI exposes vs project; otherwise stop…

volcengine/SearchCLI · 66 tokens