원클릭으로
cloudflare-workers-deploy
Deploy and manage Cloudflare Workers with D1, R2, KV, and Workers KV store
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Deploy and manage Cloudflare Workers with D1, R2, KV, and Workers KV store
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Migrate Hermes Agent to a new server while keeping both instances running in parallel. Covers backup, SSH troubleshooting, skill/memory sync, and GitHub remote setup.
Backup, restore, and migrate Hermes Agent data across machines. Covers the local backup scripts, cron scheduling, retention policies, git remote management, shallow-clone migration, and cross-machine parallel deployment.
Modify PDF appearance without changing content/structure: change font colors, remove highlights, adjust styling. Preserves all text, layout, fonts, and embedded resources.
Cloudflare Workers + D1 e-commerce site for Shengtuo Tractor. Deploy, DB ops, SEO, product sync.
Install and select animated petdex mascots for Hermes.
Parallel 3-agent cleanup of recent code changes.
| name | cloudflare-workers-deploy |
| description | Deploy and manage Cloudflare Workers with D1, R2, KV, and Workers KV store |
| triggers | ["deploy to cloudflare workers","cf_b2b type projects","wrangler.toml based deployment"] |
wrangler.toml and package.json# D1 Database
curl -s -X POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/d1/database" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "database_name"}'
# R2 Bucket
curl -s -X POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/r2/buckets" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "bucket-name"}'
# KV Namespace
curl -s -X POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/storage/kv/namespaces" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "namespace-name"}'
Update wrangler.toml with resource IDs:
[[d1_databases]]
binding = "DB"
database_name = "database_name"
database_id = "<uuid>"
[[kv_namespaces]]
binding = "STATIC_ASSETS"
id = "<uuid>"
# Run SQL migrations (use --remote for production D1)
npx wrangler d1 execute database_name --file=schema/schema.sql --remote
npx wrangler deploy
Many CF Workers projects store site config in KV as JSON. This pattern recurs in B2B/ecommerce templates.
Correct way to write JSON to KV:
# Must use --path <file>, NOT stdin/heredoc — wrangler reads value from file
echo '{"site_name":"...","email":"..."}' > /tmp/settings.json
npx wrangler kv key put "website_settings" --path /tmp/settings.json --namespace-id <uuid> --remote
--path <file> to read value from file. Stdin/heredoc does NOT work. Must add --remote for production targeting.--remote flag to target production D1, not local dev DB.npm run build. Check package.json scripts first.admin role, not super_admin. Upgrade via D1: UPDATE admins SET role='super_admin' WHERE username='admin'wrangler CLI fails, fall back to Cloudflare REST API for D1 operationsawait env.STATIC_ASSETS.get()), inject into HTML template string, redeploy. Check home.js, about.js, contact.js when updating site content. Pages using JS fetch('/api/settings') client-side may fail silently — always prefer server-side injection for static content pages.layout.css defines --primary, --dark, --gray-*, --radius, --shadow-*. Many page templates incorrectly use --primary-color, --text-light, --text-dark, --bg-light which do NOT exist in layout.css and cause Worker exceptions. Always verify all CSS variables match layout.css definitions before deploying. Replace: var(--primary-color)→var(--primary), var(--text-light)→var(--gray-500), var(--text-dark)→var(--dark), var(--bg-light)→var(--gray-100).class keyword causes "Expected ; but found class" build error: In Cloudflare Workers (V8 engine), template literals containing class= attributes fail to parse, producing cryptic build errors at the class keyword. Workaround: Use string concatenation ('<div class="card">' + ... + '</div>') for HTML with class attributes. Do NOT use backtick template literals for HTML card markup in page handlers./api/products client-side via API.get() are fragile. Render products server-side with env.DB.prepare().all() and inject HTML during SSR. Client-side JS fetch is fine for dynamic content (filters, modals) but not primary content.curl -sLo /dev/null -w "%{http_code}" "https://worker.workers.dev/"
curl -s "https://worker.workers.dev/api/settings"
references/cloudflare-rest-api.md — Cloudflare API endpoints for D1/R2/KV/Workers managementreferences/cf-b2b-project-notes.md — Session-specific notes from deploying geeeeeeek/cf_b2breferences/d1-database-operations.md — D1 INSERT/UPDATE patterns, image URL batch update, validation scripts, and browser-console product extraction technique