Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/codewhale-hq-cloudflare-storage
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cloudflare-storage
What's inside
- Skill name
cloudflare-storage- Description
- Use Cloudflare KV, R2 and D1 from a Worker. Binding config, Worker code, cf commands, local vs remote data, D1 migrations. Use when adding or changing storage bindings or schemas.
- License
- MIT
- Instructions
- 97 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Cloudflare KV, R2 and D1 basics
Local first: `cf dev` simulates the project's bindings through its adapter.
Resource commands are remote unless a supported `--local` mode is explicitly
selected. Consult `cf cli search` with an anonymous action/resource query and
inspect the discovered command's help/schema; beta command names and flags
are not interchangeable with Wrangler's. Remote writes require approval
(`cloudflare-deploy`). Vite development data and cf local API data are separate
stores; check the actual persistence directory before comparing results.
Pick the store by access pattern:
| Store | Good for | Not for |
| --- | --- | --- |
| KV | read-heavy config, cache, small values, eventually consistent | counters, anything needing read-your-write across regions |
| R2 | files, blobs, uploads, S3-compatible access | relational queries |
| D1 | relational data in SQLite, migrations, transactions via `batch` | very high write rates to one database, large blobs |
| Durable Objects | per-entity coordination and strongly consistent state | bulk storage (see cloudflare-durable-objects) |
## KV
Declare `CACHE` in `worker.env` with the current `bindings.kv` helper from
`cf/config`, preserving the existing namespace ID. Validate typed options
against the cf configuration reference and inspect dry-run bindings.
```ts
await env.CACHE.put("user:1", JSON.stringify(user), { expirationTtl: 3600 });
const user = await env.CACHE.get("user:1", "json"); // null when missing
const page = await env.CACHE.list({ prefix: "user:", limit: 100 });
```
- Writes can take a while (60 seconds or more) to be visible in other
locations; do not use KV where staleness is a bug.
- `expirationTtl` has a documented minimum of 60 seconds.
- Use `cf cli search "create a key value namespace"` or an equivalent
anonymous query, then inspect the returned help/schema. Namespace creation
is remote and needs approval; local KV writes require explicit `--local`.
## R2
Declare `FILES` with the current `bindings.r2` helper in `worker.env`;
retain the existing bucket identity and check generated bindings.
```ts
await env.FILES.put(key, request.body, { httpMetadata: { contentType: "image/png" } });
const obj = await env.FILES.get(key); // null when missing
if (!obj) return new Response("Not found", { status: 404 });
return new Response(obj.body, { headers: { etag: obj.httpEtag } });
// elsewhere: await env.FILES.delete(key);
```
- Stream `request.body` into `put`; do not buffer large uploads in memory.
- Validate keys from user input (no path tricks, enforce a prefix per user).
- Discover cf R2 bucket/object commands through anonymous command search;
creating a bucket or writing/deleting an object remotely requires approval.
## D1
Declare `DB` using the current `bindings.d1` helper in `worker.env`, keeping
the existing database ID and generated environment types. Verify the helper's
schema before adding migration options; do not copy legacy snake_case keys.
```ts
const { results } = await env.DB.prepare("SELECT id, email FROM users WHERE org = ?1 LIMIT ?2")
.bind(orgId, 50)
.all();
const row = await env.DB.prepare("SELECT * FROM users WHERE id = ?1").bind(id).first();
await env.DB.batch([
env.DB.prepare("INSERT INTO audit(event) VALUES (?1)").bind("signup"),
env.DB.prepare("UPDATE users SET active = 1 WHERE id = ?1").bind(id),
]);
```
- Always `bind()` user input; never concatenate it into SQL.
- Schema changes stay in reviewed, numbered SQL migration files. Keep the
framework's migration tool if it already owns ordering and receipts; inspect
its generated SQL, apply it only to the local test store and run the tests.
- Discover cf D1 query/migration commands and exact input shape with anonymous
command search and help/schema. Never assume a Wrangler migration command
exists in cf under the same name.
- Production application is a data change: show SQL, database and account,
get approval, and keep a restore plan. Prefer additive migrations. A DROP,
table rebuild or unrestricted DELETE requires explicit data-loss approval.
Check current D1 recovery/Time Travel availability rather than promising a
retention window from memory. Always bind user values, even in CLI queries.
## Checklist
- [ ] binding names are valid JS identifiers and match `Env`
- [ ] generated binding types and project type check current
- [ ] code handles `null` / missing results
- [ ] local test ran against simulated storage
- [ ] no remote write happened without a yes
References: [cf local resources](https://developers.cloudflare.com/cf/projects/), [typed bindings](https://developers.cloudflare.com/cf/projects/cloudflare-config/).From codewhale-hq/codewhale-plugin-marketplace, MIT.
More from codewhale-hq/codewhale-plugin-marketplace
- 0.621score
computer-use
codewhale-hq
Operate desktop apps and isolated browsers on registered computers.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
status-update
codewhale-hq
Write an evidence-based status update from Linear data - summarize what shipped, what is in progress, what is blocked or stale for a project, cycle, or a…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
issue-triage
codewhale-hq
Triage and draft GitHub issues with the GitHub MCP tools - search for duplicates, classify and prioritize, and draft a well-formed new issue for the user to…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-pages-to-workers
codewhale-hq
Migrate a Cloudflare Pages project to Workers with static assets.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
issue-triage
codewhale-hq
Triage Linear issues and claim work with the Linear MCP tools - find the triage queue or your assigned work, check for duplicates and existing owners, set…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-workers
codewhale-hq
Build, configure and test a Cloudflare Worker locally with cf (cloudflare.config.ts, typed bindings, static assets, cf dev, vitest).
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
review-panel
codewhale-hq
Fan six specialist reviewers (general correctness, silent failures, type design, test gaps, comment accuracy, simplification) out over the current diff, a…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
ui-critique
codewhale-hq
Critique a user interface (screenshot, running page, HTML/CSS, mockup or description) and return severity-ranked findings with evidence and a concrete fix for…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
iterate-until-done
codewhale-hq
Set up a bounded iterate-until-done run with the loop plugin's /loop command.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
chromewhale
codewhale-hq
Read and act on selected Chrome tabs and frames — their real browser, their logged-in sessions.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
cloudflare-deploy
codewhale-hq
Deploy or change a Cloudflare Worker with cf.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
cloudflare-durable-objects
codewhale-hq
Design and write Cloudflare Durable Objects.
SkillAFreshness: A★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Oct 6, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- codewhale.net
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from codewhale-hq
- 0.724score
AGENTS.md · codewhale-hq/Codewhale
codewhale-hq
AGENTS.md from codewhale-hq/Codewhale: 266 lines covering The ponytail method, Working rules, Landing other people's work, Merging under a gate and more.
TemplateAFreshness: A★ 41.1KCodex +5 - 0.724score
Codewhale
codewhale-hq
Open-source Rust coding agent for the terminal that works with more than 40 model providers or local models
AgentAFreshness: A★ 41.1K - 0.621score
computer-use
codewhale-hq
Operate desktop apps and isolated browsers on registered computers.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
ui-critique
codewhale-hq
Critique a user interface (screenshot, running page, HTML/CSS, mockup or description) and return severity-ranked findings with evidence and a concrete fix for…
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-pages-to-workers
codewhale-hq
Migrate a Cloudflare Pages project to Workers with static assets.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
cloudflare-workers
codewhale-hq
Build, configure and test a Cloudflare Worker locally with cf (cloudflare.config.ts, typed bindings, static assets, cf dev, vitest).
SkillAFreshness: A★ 5Claude Code +9
Cite this page
cloudflare-storage skill. Agent Mart. https://agentmart.dev/skills/codewhale-hq-cloudflare-storage (last updated 2026-10-24)