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.
git clone --depth 1 https://github.com/secondsky/claude-skillsnpx agentmods add skills/secondsky/claude-skills/cloudflare-workers-testingWrote 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/secondsky/claude-skills/cloudflare-workers-testing)<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-workers-testing"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-workers-testing/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.
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-workers-testing"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-workers-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00057 | $0.05502 |
| Opus 5.5 | $0.00023 | $0.02201 |
| Sonnet 5.5 | $0.00011 | $0.01100 |
| Haiku 4.5 | $0.00006 | $0.00550 |
Grade A, and why
cloudflare-workers-testing scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await worker.fetch(request, env, ctx); How it starts
The opening of the file, as written. The whole thing — 815 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloudflare Workers Testing with Vitest
Status: ✅ Production Ready | Last Verified: 2025-01-27 Vitest: ^2.0.0 | @cloudflare/vitest-pool-workers: 0.7.2 | Miniflare: Latest
Table of Contents
- What Is Workers Testing?
- New in 2025
- Quick Start (5 Minutes)
- Critical Rules
- Core Concepts
- Top 5 Use Cases
- Best Practices
- Top 8 Errors Prevented
- When to Load References
What Is Workers Testing?
Testing Cloudflare Workers with Vitest and @cloudflare/vitest-pool-workers enables writing unit and integration tests that run in a real Workers environment with full binding support (D1, KV, R2, Durable Objects, Queues, AI). Tests execute in Miniflare for local development and can run in CI/CD with actual Workers runtime behavior.
Key capabilities: Binding mocks, execution context testing, edge runtime simulation, coverage tracking, fast test execution.
New in 2025
@cloudflare/vitest-pool-workers 0.7.2 (January 2025):
- BREAKING: Miniflare v3 → requires Node.js 20+
- NEW:
cloudflare:testmodule for env/ctx access - IMPROVED: Faster isolated storage for bindings
- FIXED: Worker-to-worker service bindings now work correctly
- ADDED: Support for Vectorize and Workers AI bindings
Migration from older versions:
# Update dependencies
bun add -D vitest@^2.1.8 @cloudflare/vitest-pool-workers@^0.7.2
# Update vitest.config.ts (new pool configuration format)
export default defineWorkersConfig({
test: {
poolOptions: {
workers: {
wrangler: { configPath: './wrangler.jsonc' },
miniflare: { compatibilityDate: '2025-01-27' }
}
}
}
});
Quick Start (5 Minutes)
1. Install Dependencies
bun add -D vitest @cloudflare/vitest-pool-workers
What ships with it
10 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.
- references/binding-mocks.md 12 KB
- references/coverage-optimization.md 7.4 KB
- references/integration-testing.md 8.9 KB
- references/troubleshooting.md 7.3 KB
- references/vitest-setup.md 6.8 KB
- scripts/run-tests.sh 4.2 KB runs code
- scripts/setup-vitest.sh 5.0 KB runs code
- templates/basic-test.ts 5.3 KB runs code
- templates/binding-mock-test.ts 8.7 KB runs code
- templates/vitest-config.ts 3.0 KB runs code
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.
- 1mo ago First seen · 815 lines · 57 tokens per session scan A 3dc319e7c7c5
cloudflare-workers-testing is a skill published in the GitHub repository secondsky/claude-skills (231 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 5,502 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
decide
A reusable decision procedure, and a copyable prototype for the guard that encodes it — derive the population, set one threshold by what being wrong costs, name the offender, and break it once to prove it can fail. Use when writing a check, guard, gate or validation of any kind, or when deciding whether something is…
why
Work out whether a failure is your machine or your code before debugging either, using the environment this repository has declared and the dependency map. Use when a test, build or command fails and the cause is not obvious from the error.
dotnet-test
This skill should be used when running .NET tests selectively with a build-first, test-targeted workflow. Use it for running tests with xUnit focus.
remember
Record why something is the way it is — a decision and its reasoning, a lesson that cost time, or a standing constraint. Use when the reasoning behind a choice would be expensive to reconstruct later.
bootstrap
Set up chamnan in this repository for the first time — build the architecture index, measure how well the code describes itself, fill in missing file comments, and record a baseline. Run once per repo.
milestone
Record a change that reshaped the repository — what moved, why it was worth doing, and which areas it touched. Use after a migration, a rewrite, or a decision that changed how part of the system works.