cf-workers-integration

cf-workers-integration is a skill for Claude Code, Codex from humanerd-drew/opencode-drewgent. It costs 36 tokens per session (3,415 once invoked), scanned C, original, MIT.

A code-organisation guide for combining separate codebases into one Cloudflare Workers project. It covers shared data, request handlers, analysis code, and language-model callers.

In plain words
What is it for?
Use it when merging projects, splitting a large Worker file into routes and controllers, unifying repeated API callers, or creating shared data files.
Why use it?
It helps reduce duplicated code and makes a growing Worker project easier to understand and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { getOntologyContext } from '../data/ontology/ontology';.

Good fit Use it when merging projects, splitting a large Worker file into routes and controllers, unifying repeated API callers, or creating shared data files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/humanerd-drew/opencode-drewgent
agentmods
npx agentmods add skills/humanerd-drew/opencode-drewgent/cf-workers-integration

Made for: Claude Code, Codex.

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 cf-workers-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/cf-workers-integration/github.svg)](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/cf-workers-integration)
Your own site
<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/cf-workers-integration"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/cf-workers-integration/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 cf-workers-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/cf-workers-integration"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/cf-workers-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,415 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00036 $0.03415
Opus 5.5 $0.00014 $0.01366
Sonnet 5.5 $0.00007 $0.00683
Haiku 4.5 $0.00004 $0.00342

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

Security

Grade C, and why

cf-workers-integration scanned grade C with 2 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **SQLite lock**: `rm -rf .wrangler/state/v3/d1/` and `pkill -f wrangler` to clear port/lock on crash.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

export default { async fetch(request, env, ctx) {
skills/software-development/cf-workers-integration/SKILL.md · 239 lines

How it starts

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

Cloudflare Workers Project Integration

Integrating separate codebases (NAS controllers, analysis engines, LLM callers) into one coherent CF Workers project.

Trigger

  • Multiple codebases need merging (NAS + working copy + external)
  • Worker.ts monolithic → router + controllers refactoring
  • LLM caller consolidation (duplicated DeepSeek/NVIDIA fallback)
  • Data source unification (master JSON for shared constants)

Step 1 — Map structure

diff -rq src/ /source/path/src/ — find unique files on each side.

Step 2 — Find dead code

Search for orphaned files (imported 0 times), duplicated utilities, hardcoded constants.

Step 3 — Shared infra modules

  1. src/data/<domain>-constants.json — master constants
  2. src/utils/llm.ts — unified DeepSeek + NVIDIA callers
  3. src/analysis/types.ts — analysis report types

Step 4 — Worker.ts → router pattern

import { handleX } from './src/controllers/x';
export default { async fetch(request, env, ctx) {
  if (url.pathname === '/api/x') return handleX(request, env, url, ctx);
  return env.ASSETS.fetch(request);
}};

Step 5 — LLM unification

src/utils/llm.ts provides:

  • callDeepSeek(env, systemPrompt, userContent, maxTokens) — direct DeepSeek call
  • callNvidiaWithFallback(env, systemPrompt, userContent, maxTokens) — 3-key NVIDIA NIM + 28s per-key timeout + AbortController
  • callLLMJson(env, systemPrompt, userContent) — DeepSeek→NVIDIA fallback chain; throws on all failure
  • extractJsonObject(text) — regex-based JSON extraction from LLM response

All controllers import from this single module instead of duplicating API call logic.

Step 6 — API Response Enrichment (injectAnalysisReport pattern)

Intercept an API response, add computed data, return enhanced response without breaking existing consumers:

async function injectAnalysisReport(response: Response): Promise<Response> {
  const clone = response.clone();
  const body = await clone.json();
  body.data.analysisReport = analyze(body.data);
  return new Response(JSON.stringify(body), {
    status: response.status,
    headers: response.headers, // preserve CORS/auth headers
  });
}

Read the full file on GitHub · 239 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 239 lines · 36 tokens per session scan C 40a9079c6b9d

Subscribe to this mod's changes

cf-workers-integration is a skill published in the GitHub repository humanerd-drew/opencode-drewgent (3 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 3,415 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

cf-workers-integration compared with skills from other repositories

cf-workers-integration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cf-workers-integrationhumanerd-drew/opencode-drewgentSkill33mo agoMITC36Claude Code, Codex
stripe-projectsNousResearch/hermes-agentSkill261kyesterdayMITA15Claude Code, Codex
multi-tenant-architecturemblode/agent-skillsSkill187yesterdayMITA72Claude Code, Codex
cloudflare-workers-expertroedyrustam/vibes-plugSkill121yesterdayMITA46Cursor
architecture-paradigm-microservicesathola/claude-night-marketSkill348yesterdayMITA33Claude Code
architecture-paradigm-serverlessathola/claude-night-marketSkill348yesterdayMITA37Claude Code
release-itciembor/agent-rules-booksSkill3.2k1mo agoMITA34Claude Code, Codex