cloudflare-bindings

cloudflare-bindings is a skill for Claude Code from smicolon/ai-kit. It costs 47 tokens per session (2,223 once invoked), scanned A, original, MIT.

A guide to connecting Cloudflare Workers to services such as D1 databases, KV caches, R2 file storage, Durable Objects, and environment variables.

In plain words
What is it for?
Use it when defining bindings and writing Workers code that reads from databases, caches data, stores files, manages shared state, or loads configuration.
Why use it?
It gives the application a consistent way to access data, files, shared state, and secrets without repeating setup decisions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hono plugin — 4 skills shipped together

Good fit Use it when defining bindings and writing Workers code that reads from databases, caches data, stores files, manages shared state, or loads configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smicolon/ai-kit/cloudflare-bindings
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add smicolon/ai-kit --skill cloudflare-bindings
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Or install hono, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-bindings

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/cloudflare-bindings/github.svg)](https://agentmods.dev/skills/smicolon/ai-kit/cloudflare-bindings)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/cloudflare-bindings"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/cloudflare-bindings/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cloudflare-bindings

Your own site · 80×15
<a href="https://agentmods.dev/skills/smicolon/ai-kit/cloudflare-bindings"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/cloudflare-bindings.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,223 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.02223
Opus 5.5 $0.00019 $0.00889
Sonnet 5.5 $0.00009 $0.00445
Haiku 4.5 $0.00005 $0.00222

Measured 3mo ago against content hash 17b8ff0feee4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cloudflare-bindings scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/hono/skills/cloudflare-bindings/SKILL.md · 409 lines

How it starts

The opening of the file, as written. The whole thing — 409 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cloudflare Bindings

Patterns for Cloudflare Workers bindings in Hono.

Type Definitions

Define all bindings in a central type:

// types/bindings.ts
export type Env = {
  Bindings: {
    // D1 Database
    DB: D1Database

    // KV Namespace
    KV: KVNamespace

    // R2 Bucket
    BUCKET: R2Bucket

    // Durable Object
    COUNTER: DurableObjectNamespace

    // Environment Variables
    ENVIRONMENT: 'development' | 'staging' | 'production'
    API_KEY: string
    JWT_SECRET: string
  }
  Variables: {
    user: User
    requestId: string
  }
}

D1 Database

Basic Queries

app.get('/users', async (c) => {
  const db = c.env.DB

  // Select all
  const { results } = await db
    .prepare('SELECT * FROM users WHERE deleted_at IS NULL')
    .all()

  return c.json({ data: results })
})

app.get('/users/:id', async (c) => {
  const db = c.env.DB
  const id = c.req.param('id')

  // Select one
  const user = await db
    .prepare('SELECT * FROM users WHERE id = ?')
    .bind(id)
    .first()

  if (!user) {
    return c.json({ error: 'User not found' }, 404)
  }

  return c.json({ data: user })
})

Insert and Update

app.post('/users', async (c) => {
  const db = c.env.DB
  const { email, name } = c.req.valid('json')
  const id = crypto.randomUUID()

  const result = await db
    .prepare('INSERT INTO users (id, email, name) VALUES (?, ?, ?)')
    .bind(id, email, name)
    .run()

  return c.json({ data: { id, email, name } }, 201)
})

app.put('/users/:id', async (c) => {
  const db = c.env.DB
  const id = c.req.param('id')
  const { name } = c.req.valid('json')

  await db
    .prepare('UPDATE users SET name = ?, updated_at = datetime("now") WHERE id = ?')
    .bind(name, id)
    .run()

  return c.json({ data: { id, name } })
})

Transactions (Batch)

app.post('/transfer', async (c) => {
  const db = c.env.DB
  const { fromId, toId, amount } = c.req.valid('json')

  // D1 batch for transaction-like behavior
  const results = await db.batch([
    db.prepare('UPDATE accounts SET balance = balance - ? WHERE id = ?')
      .bind(amount, fromId),
    db.prepare('UPDATE accounts SET balance = balance + ? WHERE id = ?')
      .bind(amount, toId),
    db.prepare('INSERT INTO transfers (from_id, to_id, amount) VALUES (?, ?, ?)')
      .bind(fromId, toId, amount)
  ])

  return c.json({ success: true })
})

Read the full file on GitHub · 409 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 409 lines · 47 tokens per session scan A 17b8ff0feee4

Subscribe to this mod's changes

cloudflare-bindings is a skill published in the GitHub repository smicolon/ai-kit (7 stars, last pushed 2mo ago), licensed MIT. It adds 47 tokens to every session and 2,223 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

cloudflare-bindings compared with skills from other repositories

cloudflare-bindings next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cloudflare-bindingssmicolon/ai-kitSkill72mo agoMITA47Claude Code
sse-streamingfabioc-aloha/Alex_Skill_MallSkill62d agoMITA26Claude Code, Codex
designing-architecturestelagod/code-abyssSkill2444mo agoMITA43Claude Code
btpvigneshbarani24/sap-superpowersSkill143mo agoMITA46Claude Code
integration-suitevigneshbarani24/sap-superpowersSkill143mo agoMITA53Claude Code
Pynchy Opscrypdick/pynchySkill102mo agoMITB110Claude Code
n8n-workflowinbharatai/claude-skillsSkill448mo agoMITA26Claude Code, Codex