sc-cflisted
Install: claude install-skill rahmanef63/si-coder-agent
# /sc-cf — Cloudflare (STUB)
> **Status:** boilerplate only. No working scripts yet. Open a PR or implement the TODOs below to fill in.
## Scope when implemented
- **DNS** — create A/CNAME records for `<root>`, `api-<root>`, `site-<root>`, `dash-<root>`. Drop-in replacement for `lib/hostinger.js`.
- **Workers** — deploy a worker from `wrangler.toml`.
- **Pages** — connect a GitHub repo as a Pages project (alternative to Dokploy for static sites).
- **R2** — provision a bucket + access key, write to project env.
- **Zero Trust tunnel** — optional `cloudflared` tunnel to expose a local service.
## Env vars (already registered in `scan-env.js`)
| Var | Purpose |
|---|---|
| `CLOUDFLARE_API_TOKEN` | Token with `Zone:Read`, `Zone:DNS:Edit`, `Account:Workers:Edit`, `Account:R2:Edit` |
| `CLOUDFLARE_ACCOUNT_ID` | Account ID, copy from the dashboard right sidebar |
## Suggested file layout
```
sc-cf/
├── SKILL.md (this file)
└── scripts/
├── dns.js # CRUD A/AAAA/CNAME via /zones/<id>/dns_records
├── deploy-pages.js # POST /accounts/:id/pages/projects + bind to GitHub
├── deploy-worker.js
├── r2-bucket.js # POST /accounts/:id/r2/buckets
└── tunnel.js # cloudflared tunnel create/route
```
## Implementation notes
- API base: `https://api.cloudflare.com/client/v4`
- Auth header: `Authorization: Bearer <CLOUDFLARE_API_TOKEN>`
- Errors return `{ success: false, errors: [{code, message}] }` — wrap in `lib/cloudflare.js` (TODO).
- Zon