Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers KV

Configures and interacts with KV namespaces within a Miniflare testing environment, including accessing namespaces in code and manipulating data from outside a worker using the getKVNamespace method.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers KV

Configures and interacts with KV namespaces within a Miniflare testing environment, including accessing namespaces in code and manipulating data from outside a worker using the getKVNamespace method.

When To Use

Use when you need to configure KV namespaces for local testing or perform get and put operations on KV data from outside a worker script using Miniflare.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-testing-miniflare-kv-workflow-guide.mdDocumentation on configuring and accessing KV namespaces within a Miniflare testing environment.Questions about documentation on configuring and accessing KV namespaces within a Miniflare testing environment.
examples/workers-testing-miniflare-kv-cloudflare-workers-miniflare-kv-configurati.textA Miniflare configuration object demonstrating how to define KV namespace names for local testing.Exact payloads, commands, or snippets shown in A Miniflare configuration object demonstrating how to define KV namespace names for local testing.
examples/workers-testing-miniflare-kv-cloudflare-workers-miniflare-kv.textA JavaScript code snippet demonstrating how to access and retrieve values from a Workers KV namespace using Miniflare.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to access and retrieve values from a Workers KV namespace using Miniflare.
examples/workers-testing-miniflare-kv-cloudflare-workers-miniflare-kv-setup.textA JavaScript code example demonstrating how to initialize Miniflare with a KV namespace for local testing.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to initialize Miniflare with a KV namespace for local testing.

What This Skill Covers

  • Specify KV namespaces to add to your environment as follows:
  • Main sections: Namespaces, Manipulating Outside Workers.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/testing/miniflare/storage/kv