wonder-blocks AGENTS.md

Instructions for using Khan Academy’s Wonder Blocks design system and its Storybook MCP server. Storybook is a local catalogue of interface components; MCP lets an AI coding tool access that catalogue.

In plain words
What is it for?
Use it when setting up Wonder Blocks for another project, starting its Storybook server, or configuring an MCP-compatible coding tool to use the local component endpoint.
Why use it?
It explains how to start the local component catalogue and connect a coding tool to it, so the agent can work with the project’s existing interface components.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/khan/wonder-blocks/agents-md
Clone the repo
git clone --depth 1 https://github.com/Khan/wonder-blocks

Made for: Codex, OpenCode.

Per session 1,121 This file is loaded in full into every session.
When invoked 1,121 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.01121 $0.01121
Opus 5 $0.00561 $0.00561
Sonnet 5 $0.00224 $0.00224
Haiku 4.5 $0.00112 $0.00112

Measured yesterday against content hash 32f9e4d7abcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wonder-blocks AGENTS.md scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Wonder Blocks – Agentic Workflows & Storybook MCP

This file helps AI agents and tools work with the Wonder Blocks design system, including the Storybook MCP server.

Installing the MCP (consumer setup)

If you want to use the Wonder Blocks Storybook MCP from another project (e.g. Cursor, Claude Desktop), you run Wonder Blocks locally and point your MCP client at it.

  1. Clone the Wonder Blocks repo (if you haven’t already):

    git clone [email protected]:Khan/wonder-blocks.git
    cd wonder-blocks
    
  2. Install dependencies and start Storybook (the MCP server runs inside Storybook):

    pnpm install
    pnpm start
    

    Keep this process running. Storybook (and the MCP) will be available at http://localhost:6061.

  3. Configure your MCP client to use the local MCP endpoint. Add a server entry that uses the HTTP transport and the URL below.

    Example mcp.json (Cursor and other clients that support HTTP):

    {
      "mcpServers": {
        "wonder-blocks": {
          "url": "http://localhost:6061/mcp"
        }
      }
    }
    

    Use http://localhost:6061/mcp as the MCP server URL. No API keys or auth are required for local use.

Note: The MCP is only available while Storybook is running (pnpm start). If you stop Storybook, your MCP client will lose the connection until you start it again.

Storybook MCP server

Wonder Blocks uses @storybook/addon-mcp so agents can discover components, list stories, and use docs tooling.

When it’s available

  • The MCP server runs inside the Storybook dev server.
  • Start Storybook with: pnpm start (or pnpm start:storybook).
  • Storybook (and the MCP endpoint) are only available while that process is running.

MCP endpoint

Environment Storybook UI MCP endpoint
Local dev http://localhost:6061 http://localhost:6061/mcp

Read the full file on GitHub · 98 lines

Changes

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.

  1. yesterday First seen · 98 lines · 1,121 tokens per session scan A 32f9e4d7abcc

Subscribe to this mod's changes

wonder-blocks AGENTS.md is an instructions file published in the GitHub repository Khan/wonder-blocks (163 stars, last pushed 3d ago), licensed MIT. It adds 1,121 tokens to every session, about $0.0056 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.