clowlove/hermes-house/cloudflare-workers-deploy
Claude Code and agent skill by clowlove/hermes-house
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Deploy and manage Cloudflare Workers with D1, R2, KV, and Workers KV store
Install
npx vskill@latest install clowlove/hermes-house/cloudflare-workers-deploySKILL.md
The same SKILL.md was published earlier as clowlove/hermes-house/cloudflare-workers-deploy.
Cloudflare Workers Deployment
Workflow
Phase 1: Scout & Plan
- Clone/fetch the repo, read
wrangler.tomlandpackage.json - Identify required Cloudflare resources (D1, R2, KV) and their bindings
- If resources don't exist yet, create them via REST API
Phase 2: Create Cloudflare Resources
Phase 3: Configure wrangler.toml
Update wrangler.toml with resource IDs:
Phase 4: Initialize Database
Phase 5: Deploy
KV Settings Pattern (website_settings)
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:
Pitfalls
- wrangler kv key put: Use
--path <file>to read value from file. Stdin/heredoc does NOT work. Must add--remotefor production targeting. - wrangler d1 execute: Always add
--remoteflag to target production D1, not local dev DB. - No build step: Pure JS projects deploy directly without
npm run build. Checkpackage.jsonscripts first. - Admin role: Default admin accounts may be
adminrole, notsuper_admin. Upgrade via D1:UPDATE admins SET role='super_admin' WHERE username='admin' - POST vs PUT for updates: POST often creates duplicates — verify whether update uses POST or PUT
- D1 SQL via API: When
wranglerCLI fails, fall back to Cloudflare REST API for D1 operations - KV settings NOT auto-propagated to pages: Pages with hardcoded HTML template strings do NOT update when KV changes. Fix: read settings server-side in page handler (
await env.STATIC_ASSETS.get()), inject into HTML template string, redeploy. Check home.js, about.js, contact.js when updating site content. Pages using JSfetch('/api/settings')client-side may fail silently — always prefer server-side injection for static content pages. - CSS variable naming mismatch causes 500 errors:
layout.cssdefines--primary,--dark,--gray-*,--radius,--shadow-*. Many page templates incorrectly use--primary-color,--text-light,--text-dark,--bg-lightwhich 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). - Template literal `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 theclasskeyword. 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. - Product detail pages 500 — check CSS vars first: When a product-detail page throws 500, CSS variable mismatches are almost always the culprit, not the DB query. Use a minimal stub page to isolate, then progressively add complexity.
- Server-side rendering preferred for product listing: Pages fetching
/api/productsclient-side viaAPI.get()are fragile. Render products server-side withenv.DB.prepare().all()and inject HTML during SSR. Client-side JS fetch is fine for dynamic content (filters, modals) but not primary content.
Verification
References
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
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cloudflare-workers-deploy/SKILL.md
Popularity
- Repository stars
- 14
- Repository forks
- 4
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/clowlove/hermes-house/cloudflare-workers-deploy)