agentleFS
CloudflareKnown publishercloudflare/workers-sdk/packages/miniflare/AGENTS.md

workers-sdk / miniflare

AGENTS.md4.6k starsChanged 6 months agoApache-2.0View on GitHub

Local dev simulator for Cloudflare Workers, powered by workerd runtime. Main class Miniflare in src/index.ts.

Trending

Quiet since August.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/workers-sdk repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/workers-sdk

The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 17

Talked about on GitHub, Bluesky and Hacker News (17 times).

On GitHub · 14

9 more on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Does NOT extend shared @cloudflare/workers-tsconfig — has its own full config

    line 36
  2. Very specific:

    Test files use .spec.ts (NOT .test.ts)

    line 43
  3. Very specific:

    Does NOT extend vitest.shared.ts — own full vitest config

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Miniflare — Agent Guide

Overview

Local dev simulator for Cloudflare Workers, powered by workerd runtime. Main class Miniflare in src/index.ts.

Structure

  • src/index.ts — Main Miniflare class, server setup, plugin orchestration, all exports
  • src/workers/ — ~30 embedded worker scripts (D1, KV, R2, caches, etc.), built via worker: virtual import scheme
  • src/workers/shared/ — Shared utilities across embedded workers
  • src/workers/core/dev-registry-proxy.worker.ts — Proxy worker for cross-process service bindings via debug port RPC
  • src/workers/core/dev-registry-proxy-shared.worker.ts — Shared proxy logic (registry Map, DO proxy class, tail serializers)
  • src/shared/dev-registry.ts — Filesystem-based worker registry (chokidar watch, heartbeat, stale cleanup)
  • src/shared/persist-root-lock.ts — Token-safe startup serialisation for shared persistent storage
  • src/shared/DEV_REGISTRY.md — Full architecture doc for the dev registry
  • src/runtime/config/generated/workerd.ts — Generated workerd Cap'n Proto config types
  • test/ — Tests (.spec.ts naming, NOT .test.ts)
  • test/test-shared/ — Shared test utilities
  • scripts/build.mjs — Custom esbuild build script

Build

  • Custom scripts/build.mjs bundles src/index.ts as CJS → dist/src/index.js
  • Also compiles ~30 embedded worker scripts via worker:... virtual import scheme — each triggers a nested esbuild sub-build producing standalone ESM worker scripts
  • Build outputs: dist/, worker-metafiles/

Lint Status (Transitional)

  • Many shared ESLint rules temporarily DISABLED: no-explicit-any, consistent-type-imports, no-shadow, no-floating-promises, others
  • Comment in config: "temporarily enabled while we transition Miniflare to use the standard workers-sdk eslint config"
  • no-console: error is on, except for src/workers/ and scripts/

TypeScript

  • Does NOT extend shared @cloudflare/workers-tsconfig — has its own full config
  • Uses experimentalDecorators
  • Path aliases: miniflare:shared, miniflare:zod
  • declaration: true (emits .d.ts)

Testing

  • Test files use .spec.ts (NOT .test.ts)
  • pool: "forks", maxWorkers: 1 (Vitest 4 equivalent of the old singleFork: true)
  • Does NOT extend vitest.shared.ts — own full vitest config
  • Timeouts: 30s test, 30s hook
  • globals: true
  • Factory pattern: miniflareTest(opts, handler?) creates instance in beforeAll, disposes in afterAll
  • useDispose(mf) / disposeWithRetry() — exponential backoff for Windows EPERM file locking
  • useServer() — temp HTTP server with auto-cleanup
  • TestLog — captures log entries by level

Generated Files

  • src/runtime/config/generated/workerd.ts — generated Cap'n Proto types, do not edit directly
  • src/workers/local-explorer/openapi.local.json — generated from scripts/openapi-filter-config.ts, modify the config not the output

Version Pinning

  • Miniflare minor version must match workerd minor version
  • .github/changeset-version.js enforces this: if changeset bumps miniflare minor beyond workerd's, it converts to patch

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.