Cloudflare D1 OAuth Agent Guide — DevOps skill for Claude Code
Cloudflare + D1 官方 OAuth 連接指南與 AI Agent 提示詞 v1.1.
How to install Cloudflare D1 OAuth Agent Guide
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mathruffian-dot/cloudflare-d1-oauth-agent-guide and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cloudflare D1 OAuth Agent Guide does
Cloudflare + D1 官方 OAuth 連接指南與 AI Agent 提示詞 v1.1.
Alternatives in DevOps
- Cloudflare Deploy — Deploy apps to Cloudflare using Workers, Pages, and platform services 14.6k ★
- Agents Starter — A starter kit for building ai agents on Cloudflare 1.3k ★
- MCP Boilerplate — A remote Cloudflare MCP server boilerplate with user authentication and Stripe for paid tools 1k ★
README
Cloudflare + D1 官方 OAuth 連接指南與 Agent 提示詞 (v1.1)
專為 **Google AntiGravity**、**OpenCode**、**Claude Code**、**Cursor** 等桌面 AI Coding Agent 設計的 **Cloudflare + D1 官方 OAuth 授權與唯讀連線驗收引導提示詞**。
[](LICENSE) [](prompt.md)
🎯 為什麼需要這套指南?
當讓 AI Agent 在終端機與本機環境設定 Cloudflare Wrangler CLI 或 MCP (Model Context Protocol) 時,常會遇到以下痛點:
- 假性成功(Hallucination):Agent 僅看見指令 exit code 0 或設定檔建立,就宣稱「已登入成功」或「已連上資料庫」。
- 憑證資安洩漏風險:Agent 試圖透過腳本讀取、印出或寫入未加密的 Token、Refresh Token 或 Cookie。
- 流程混淆:混淆了「Google 登入 Cloudflare 網站」、「Wrangler CLI OAuth」、「Agent MCP Connector 授權」與「應用程式綁定 D1」。
- 卡關與互動死胡同:在 Device Authorization Flow 中,Agent 未給予使用者明確的操作指引(如代碼該填入何處、終端視窗需維持開啟等),導致授權逾時失敗。
本規範將所有流程標準化,要求 Agent **「先說明操作、再引導驗證」**,並嚴格遵循**最小權限**與**金鑰圈加密儲存**。
🚀 如何分享給別人的 Agent 使用?
你可以直接將本儲存庫的原始 Markdown 網址交給任何具備終端與瀏覽器操作能力的 AI Agent。
方式一:直接提供 Raw URL 給 Agent 讀取(推薦)
提供簡短別名網址(避免繁體中文檔名在某些終端或 curl 時的編碼問題):
https://raw.githubusercontent.com/mathruffian-dot/cloudflare-d1-oauth-agent-guide/main/prompt.md
或原始中文檔名網址:
https://raw.githubusercontent.com/mathruffian-dot/cloudflare-d1-oauth-agent-guide/main/Cloudflare-D1-OAuth-%E9%80%A3%E6%8E%A5%E6%8C%87%E5%8D%97%E8%88%87%E6%8F%90%E7%A4%BA%E8%A9%9E-v1.1.md
**提示詞範例(可直接貼給 Agent):**
「請讀取這個 URL 的指南內容:`https://raw.githubusercontent.com/mathruffian-dot/cloudflare-d1-oauth-agent-guide/main/prompt.md`,並嚴格依照裡面的執行順序與互動規則,協助我在本機完成 Cloudflare 官方工具安裝、帳號檢查、OAuth 授權與 D1 唯讀連線驗收。」
方式二:複製文件全文作為 Prompt
直接開啟 [`prompt.md`](./prompt.md) 或 [`Cloudflare-D1-OAuth-連接指南與提示詞-v1.1.md`](./Cloudflare-D1-OAuth-連接指南與提示詞-v1.1.md),將全文複製並貼入對話框或專案的 Agent Instructions / System Prompt 中。
📋 核心規範與設計重點
1. 嚴格區分四個層次
- 層次 1:使用者以 Google 帳號註冊或登入 Cloudflare 網站(由本人在日常瀏覽器操作)。
- 層次 2:透過 Cloudflare 官方 OAuth 授權 Wrangler CLI(由 Agent 指引並透過官方 Device Flow 授權)。
- 層次 3:透過官方支援的 OAuth 授權目前 Agent 的
Related Skills
Obsidian Web MCP
Secure remote MCP server for Obsidian vaults -- access your notes from Claude, your phone, or any MCP client,
Build MCP
Build a remote MCP server on Cloudflare with tools and OAuth
Module 18 GCP Quick.En
Slash /module-18-gcp-quick — Module 18 Lesson 4-1 — Authenticate gog using bundled OAuth (no terminal input re
Module 18 GCP Quick.Es
Slash /module-18-gcp-quick — Módulo 18 Lección 4-1 — Autenticar gog con OAuth incluido (sin necesidad de escri
Hermes On Digitalocean
Claude Code / agent skill: deploy a Hermes Agent to a DigitalOcean droplet (Ubuntu 24.04, gateway-as-systemd,
SEO Check
Fast pre-deploy SEO and environment readiness check. Runs check.py, baseline-check.js, and seo-lint.js without
Related Agents
Browser Stealth Agent
Stealth browser automation agent for targets behind Cloudflare, Akamai, Google, DataDome, or PerimeterX bot de
DevOps Hightower
公司 DevOps/SRE(Kelsey Hightower 思维模型)。当需要部署流水线搭建、CI/CD 配置、基础设施管理(Cloudflare Workers/Pages/KV/D1/R2)、监控告警、生产故障排查
Cloudflare Specialist
Owns Cloudflare platform usage end to end: Workers, Durable Objects, D1, R2, KV, Queues, Workflows, Vectorize,