Skip to content
This repository was archived by the owner on May 5, 2026. It is now read-only.

harrymove-ctrl/claude-cloudflare-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-cloudflare-template

A GitHub template for projects you build with Claude Code and ship on Cloudflare. Opinionated about three things:

  1. Claude never signs the commits. A Claude Code hook + a git commit-msg hook block any message containing Claude, Anthropic, or Co-Authored-By: Claude. The visible author list stays human.
  2. Every change shows up in /logs. apps/web/public/logs/index.html is a devlog. Every commit/PR adds a card. The convention is enforced in CLAUDE.md and surfaced in the PR template.
  3. Cloudflare is the default runtime. wrangler.toml ships static assets via Workers; .github/workflows/deploy.yml deploys on push to main. Local dev on :8787.

Use this template

gh repo create my-new-thing --template hien-p/claude-cloudflare-template --private --clone
cd my-new-thing
./scripts/install-hooks.sh    # wires .githooks/ into git config

Then edit wrangler.toml (name = "...") and replace placeholders in apps/web/index.html + apps/web/public/logs/index.html.

Local dev

# static, no toolchain:
python3 -m http.server 8787 --directory apps/web

# or via wrangler (if you've installed it):
npx wrangler dev

Both serve apps/web/ at http://localhost:8787. The devlog is at /logs/.

Deploy

Push to main. The Deploy workflow runs wrangler deploy using two repo secrets:

  • CLOUDFLARE_API_TOKEN — token with Workers Scripts: Edit + Account: Read scopes
  • CLOUDFLARE_ACCOUNT_ID — your Cloudflare account ID

Set them in Settings → Secrets and variables → Actions.

What's in the box

.claude/settings.json          # PreToolUse hook blocking Claude attribution in `git commit`
.githooks/commit-msg           # git-side enforcement (works without Claude Code too)
.githooks/pre-push             # nudges if /logs wasn't touched in the pushed range
scripts/install-hooks.sh       # wires .githooks/ into core.hooksPath
apps/web/index.html            # landing page
apps/web/public/logs/index.html# devlog page — add a card per change
wrangler.toml                  # Cloudflare Workers + Static Assets
.github/workflows/deploy.yml   # CF deploy on push to main
.github/PULL_REQUEST_TEMPLATE.md
CLAUDE.md                      # rules Claude Code reads on every session
CONTRIBUTING.md                # branch naming, commits, /logs requirement, CF workflow

Make it a GitHub template

After pushing this repo, go to Settings → General → Template repository and tick the box. From then on, gh repo create --template <owner>/claude-cloudflare-template will scaffold copies.

About

moved to hien-p/claude-cloudflare-template

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors