agentleFS
CloudflareKnown publishercloudflare/kumo/packages/kumo-screenshot-worker/AGENTS.md

kumo / kumo-screenshot-worker

AGENTS.md3.9k starsChanged 4 months agoMITView on GitHub

Cloudflare Worker that uses Puppeteer + Browser Rendering to capture screenshots of Kumo docs pages. Used for visual regression testing. Parent: See root AGENTS.md for monorepo context. Never commit secret values. .dev.vars is gitignored at the root level. All requests require X-API-Key: <API_KEY> header. Returns { results: ScreenshotResult[] } where each result has a base64-encoded image or an error string. Limits: max 50 pages per batch, max 64 KB per css action payload. When captureSections: true, the worker looks for…

  • Reads credentials

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 2 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 11 mentionsSep 2026: 28 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/kumo repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/kumo

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

See all 49

Talked about on GitHub and Bluesky (49 times).

On GitHub · 48

43 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:

    All requests require X-API-Key: <API_KEY> header.

    line 48
  2. Very specific:

    When captureSections: true, the worker looks for elements with data-vr-demo, data-vr-section, and data-vr-title attributes in the DOM.

    line 71
  3. Very specific:

    URL validation: all Browser Rendering targets must be https:// and match the explicit Kumo docs allowlist (kumo-ui.com, …

    line 75

≈ “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

Screenshot Worker (@cloudflare/kumo-screenshot-worker)

Cloudflare Worker that uses Puppeteer + Browser Rendering to capture screenshots of Kumo docs pages. Used for visual regression testing.

Parent: See root AGENTS.md for monorepo context.

STRUCTURE

kumo-screenshot-worker/
├── src/
│   └── index.ts          # Worker entry — auth, validation, screenshot logic
├── wrangler.jsonc        # Worker config (no secrets committed)
├── tsconfig.json         # Workers + DOM lib (DOM needed for evaluate() callbacks)
├── .dev.vars.example     # Template for local secrets
└── AGENTS.md             # This file

SETUP

Local dev:

cp .dev.vars.example .dev.vars   # then fill in API_KEY
pnpm --filter @cloudflare/kumo-screenshot-worker dev

Deploy:

# Set secret (one-time per environment):
pnpm --filter @cloudflare/kumo-screenshot-worker exec wrangler secret put API_KEY

# Deploy:
pnpm --filter @cloudflare/kumo-screenshot-worker deploy

SECRETS

NameHow setDescription
API_KEYwrangler secret put API_KEYShared secret sent as X-API-Key request header

Never commit secret values. .dev.vars is gitignored at the root level.

API

All requests require X-API-Key: <API_KEY> header.

POST /batch

{
  "baseUrl": "https://kumo-ui.com",
  "pages": [
    {
      "url": "/components/button",
      "captureSections": true,
      "viewport": { "width": 1440, "height": 900 }
    }
  ]
}

Returns { results: ScreenshotResult[] } where each result has a base64-encoded image or an error string.

Limits: max 50 pages per batch, max 64 KB per css action payload.

Section Capture

When captureSections: true, the worker looks for elements with data-vr-demo, data-vr-section, and data-vr-title attributes in the DOM. These are set via vrSection and vrTitle props on ComponentExample.astro in the docs site.

SECURITY NOTES

  • URL validation: all Browser Rendering targets must be https:// and match the explicit Kumo docs allowlist (kumo-ui.com, staging.kumo-ui.com, and Kumo docs preview deployments). Do not replace this with a private-IP denylist; IP notation edge cases can bypass incomplete filters.
  • Selector injection prevention: sectionSelector from the request is passed as a parameter to page.evaluate(), never interpolated into eval strings.
  • CORS: restricted to the same Kumo docs allowlist used for navigation targets.

COMMANDS

pnpm --filter @cloudflare/kumo-screenshot-worker dev        # Local dev server
pnpm --filter @cloudflare/kumo-screenshot-worker deploy     # Deploy to Cloudflare
pnpm --filter @cloudflare/kumo-screenshot-worker typecheck  # TypeScript check
pnpm --filter @cloudflare/kumo-screenshot-worker lint       # vp lint (Oxlint)

NOTES

  • tsconfig.json includes "DOM" in lib — required so TypeScript understands the DOM code inside page.evaluate() callbacks, even though the Worker host has no DOM.
  • Buffer usage requires nodejs_compat flag in wrangler.toml (already set).
  • A fresh browser page is created per URL to prevent cookie/localStorage/style bleed between pages.
  • External endpoint: kumo-screenshot-worker.design-engineering.workers.dev

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.