| name | local-explorer |
| description | How to add products/resources to the local explorer or local API. Use when implementing new local APIs, or UI routes under packages/miniflare/src/workers/local-explorer or packages/local-explorer-ui. |
Cloudflare Local Explorer Products
Use this skill when adding a new product or resource type to the local API and/or local explorer.
Start Here
Read these files before editing:
packages/miniflare/src/workers/local-explorer/explorer.worker.ts
packages/miniflare/src/plugins/core/explorer.ts
packages/miniflare/src/plugins/core/types.ts
- One existing resource implementation in
packages/miniflare/src/workers/local-explorer/resources/, preferably the product most similar to the new one
- One matching test in
packages/miniflare/test/plugins/local-explorer/
If there are UI changes, also read:
packages/local-explorer-ui/src/components/Sidebar.tsx
- Existing route files under
packages/local-explorer-ui/src/routes/
- Existing product e2e tests under
packages/local-explorer-ui/src/__e2e__/
Workflow
- Add the API surface to
packages/miniflare/scripts/openapi-filter-config.ts.
- Generate Miniflare's filtered spec and backend types from a full Cloudflare OpenAPI spec:
OPENAPI_INPUT_PATH=<path-to-full-openapi-spec> pnpm --dir packages/miniflare generate:api
- Inspect
packages/miniflare/src/workers/local-explorer/openapi.local.json and generated types. If the generated schemas include fields local explorer will not support, add ignores in and regenerate.