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.
npx agentmods add skills/d-o-hub/github-template-ai-agents/cloudflare-worker-apinpx skills add d-o-hub/github-template-ai-agents --skill cloudflare-worker-apigit clone --depth 1 https://github.com/d-o-hub/github-template-ai-agentsWrote 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.
[](https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/cloudflare-worker-api)<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/cloudflare-worker-api"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/cloudflare-worker-api.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00074 | $0.00565 |
| Opus 5 | $0.00037 | $0.00282 |
| Sonnet 5 | $0.00015 | $0.00113 |
| Haiku 4.5 | $0.00007 | $0.00056 |
Grade A, and why
cloudflare-worker-api 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Worker API
Provide a standardized structure for Worker routes, auth middleware, and response helpers.
When to Use
- User asks to define Cloudflare Worker routes or handlers
- Building response helpers or typed handler patterns
- Even if they just say "set up the worker routes" or "add an API endpoint to the worker"
Key Responsibilities
- Define API routes and handlers.
- Implement auth middleware and session validation.
- Provide response helpers for consistent API responses.
- Design signed URL endpoints for secure file access.
Interface Example
// Example route file structure
src/routes/
access.ts
resources.ts
admin.ts
Constraints
- No hardcoded secrets.
- All routes must be typed and validated.
- Use Zod for input validation.
- All responses must follow consistent format.
Checklist
- All routes have input validation with Zod.
- Error responses follow consistent format.
- Auth middleware applied to protected routes.
- Rate limiting configured on public endpoints.
- CORS headers set appropriately.
References
references/routing-patterns.md- Common routing patterns for Workersreferences/response-helpers.md- Consistent response formatting
See Also
secure-invite-and-access— Auth endpoints and permissionsapi-design-first— API design and OpenAPI specs
Rationalizations
| Rationalization | Reality |
|---|---|
| "I'll add auth later, it's just an MVP" | Unauthenticated endpoints are immediately exploitable; even internal routes need auth. |
| "Hardcoded secrets are fine for dev" | Dev credentials leak into version control; use environment bindings from day one. |
| "Rate limiting isn't needed for internal APIs" | Compromised internal tokens turn rate-limited services into attack amplifiers. |
Red Flags
- Returning raw error stack traces in API responses
- Skipping input validation because "the client should handle it"
- Deploying without CORS configuration on public endpoints
What ships with it
3 files 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.
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.
- 4d ago First seen · 80 lines · 74 tokens per session scan A 0036391b4167
cloudflare-worker-api is a skill published in the GitHub repository d-o-hub/github-template-ai-agents (2 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 565 once invoked, about $0.0004 per session on Opus 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-08-31.
Other skills, from other repositories
design-impact-reporting
Communicate design's contribution to business and user outcomes in stakeholder language. Use when reporting results upward. For choosing the metrics in the first place, use metrics-definition (ux-strategy).
motion-system
Define motion tokens — durations, easing vocabulary, and reduced-motion handling — for consistency product-wide. Use when standardising motion across a system. For crafting one specific animation, use animation-principles (interaction-design).
version-control-strategy
Define version control for design files, components, and libraries — branching, naming, and release. Use when file history is chaotic. For design system contribution rules, use design-system-governance (design-systems).
design-token-audit
Audit token usage across a product for coverage, drift, and hard-coded values. Use when tokens exist and you suspect they are being bypassed. For defining tokens in the first place, use design-token (design-systems).
design-token
Define and organise tokens for colour, spacing, type, and elevation with naming and usage rules. Use when establishing the token layer. For auditing existing usage use design-token-audit (designer-toolkit); for multi-brand mapping use theming-system.
api-test-suite-builder
Scans API route definitions across frameworks (Next.js App Router, Express, FastAPI, Django REST) and auto-generates comprehensive test suites covering auth, input validation, error codes, pagination, file uploads, and rate limiting. Outputs ready-to-run test files for Vitest+Supertest (Node) or Pytest+httpx (Python).