本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)20k · #10413

Cloudflare

できること

このスキルは、ウェブサイト、サーバーレス関数、ストレージなど、Cloudflare アカウントの一部をエージェントが設定し更新できるようにします。プロジェクトを Cloudflare でホストしている開発者向けです。

使う場面

  • ✓Cloudflare Worker または Pages のサイトを展開したいとき。
  • ✓Cloudflare で DNS、KV ストレージ、R2、D1 データベースを変更したいとき。
  • ✓Worker のログを確認したり、展開が公開されたかを確かめたりしたいとき。

スキルのリンク

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Cloudflare/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Cloudflare/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私の Cloudflare Worker を展開し、新しいバージョンが私のドメインで公開されているか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、必要なアクセストークンだけを渡すラッパー経由で、Cloudflare のコマンドラインツールを実行します。その後、公開されたアドレスで結果を確認するため、報告にはデプロイされたバージョンとサイトの応答が示されます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Cloudflare Skill

Contents: Ideal State · Intent Routing · How It Works · Data & Config · Gotchas · Examples

Deploys and manages Cloudflare Workers, Pages, KV, R2, D1, DNS, and Queues with one tool, Cloudflare's cf CLI, run through LIFEOS/TOOLS/CfEnv.ts so the master token reaches the cf process and nothing else. A raw Cloudflare CLI call either runs on whatever token the calling shell exports (a shell profile that exports .env puts it in every interactive shell, the agent's Bash shell included), outside CfEnv's probes and review, or coasts on a stale OAuth login, which produces false "the token is dead, rotate it" diagnoses. This skill encodes one tool, one credential, one runner, and one set of verified probes so deploys and queries land the first time.

Ideal State

  • Every account-touching Cloudflare call runs through LIFEOS/TOOLS/CfEnv.ts, so the master token from .env reaches one cf process and nothing else: no raw cf or Wrangler write, no sourced .env, no OAuth fallback.
  • Whatever is deployed or created answers only on its authoritative URL (custom domain with workers.dev and previews off, or workers.dev when no domain exists). The report proves it live with a version ID and a probe, and the code review, new-zone baseline and registration gates were passed rather than overridden.
  • Reads and diagnoses come from live cf output in the same turn. An auth failure is traced through auth whoami and a scope-matching probe before any rotation is considered.
  • An MCP server built here is a stateless Worker that meets References/McpServerSpec.md.

Intent Routing

Intent Trigger File
Deploy Any Cloudflare write (deploy, secret, D1 migration or write, KV/R2 write, queue create, Pages deploy), an approved teardown, and converting a Wrangler project Intents/Deploy.md
Create Create a Worker or MCP server Intents/Create.md
Troubleshoot Deployment issues Intents/Troubleshoot.md
Query Cloudflare state (list workers, versions, KV, DNS, D1, logs, analytics), read-only via cf Intents/Query.md
Explorer Inspect Worker bindings/data live via Local Explorer Intents/Explorer.md
File Read when
References/McpServerSpec.md Before writing any MCP server. The normative 2026-07-28 build contract — stateless shape, server/discover, resultType, CacheableResult, required headers, MRTR, deprecated features not to adopt. Every MCP server built here uses this structure.
References/CfCli.md finding the cf command for a task (the decision table), cf output, auth order, --local mode, Access, previews, secrets-store and other capabilities, or falling back to Code Mode MCP
References/RuntimeGotchas.md writing or applying a D1 migration, exporting or backing up D1, long waitUntil or cron jobs, static-asset caching headers, Durable Object containers, deciding Container vs isolate, or probing an Astro POST route
References/StaticSiteConfig.md writing or converting a project's cloudflare.config.ts and vite.config.ts, static sites especially
Setup.md first-time setup: the two .env keys, the deploy review's reviewer and waivers, the Config.md entries, and the no-account check that CfEnv's allowlist guard is in place
LIFEOS/TOOLS/CfEnv.help.md CfEnv's usage, verb allowlist and refusals

How It Works

  • cf CLI (open beta) is the only Cloudflare CLI this skill uses. Every account call runs the one version CfEnv pins as CF_PACKAGE in LIFEOS/TOOLS/CfEnv.ts (cf@1.0.0-beta.5 when this was written; read the constant for the current pin), not whatever cf is installed globally. The pin costs container Workers: a Durable Object container needs cf@1.0.0-beta.10 or later (References/RuntimeGotchas.md § Durable Object containers), so a container Worker cannot deploy through CfEnv until the pin moves. Moving it is a deliberate change: beta.14 dropped observability telemetry query, which scheduled log readers rely on (LifeOS's optional Vigil monitor is one), so check every command your callers run against the new version first. Its command map, discovery, output, local mode and extra capabilities are in References/CfCli.md.
  • LIFEOS/TOOLS/CfEnv.ts runs one cf command with CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID from ~/.claude/.env injected into that child process only, behind a verb allowlist. secret put is translated so t
よくある質問

アカウントを変更するにはどのツールを使いますか?

Cloudflare の cf コマンドラインツールを使います。マスタートークンだけを渡すラッパーを通して実行します。

展開が成功したことをどう確認しますか?

展開の後で公開アドレスを確認し、バージョン ID を結果とともに報告します。

MCP サーバーも作れますか?

はい。MCP サーバーを Cloudflare Workers として書けます。

詳細

作者による元の説明

Deploys and manages Cloudflare Workers, Pages, KV, R2, D1, DNS, and Queues with the cf CLI, converts Wrangler projects to cf, and authors MCP servers as Workers; never call cf or wrangler raw for a write. USE WHEN deploy worker, deploy pages, ship worker, push to cloudflare, wrangler deploy, Cloudflare, Pages, DNS, KV, R2, D1, Queues, Workers AI, worker logs, build an MCP server, write an MCP server, expose this as MCP, MCP server structure, what shape should our MCP server be, MCP spec, server/discover, MCP stateless. NOT FOR non-Cloudflare deploys or MCP servers we only consume.

repo: danielmiessler/LifeOS

人気

GitHubのスター
20k
ランキング
#10413
ライセンス
MIT
更新日
2026/10/28

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル