Borrowing it
Nothing to install: this file belongs to storybookjs/mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/storybookjs/mcp/main/.github/instructions/eval.instructions.mdgit clone --depth 1 https://github.com/storybookjs/mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/storybookjs/mcp/eval)<a href="https://agentmods.dev/instructions/storybookjs/mcp/eval"><img src="https://agentmods.dev/badge/instructions/storybookjs/mcp/eval/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/storybookjs/mcp/eval"><img src="https://agentmods.dev/badge/instructions/storybookjs/mcp/eval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.06476 | $0.06476 |
| Opus 5.5 | $0.02590 | $0.02590 |
| Sonnet 5.5 | $0.01295 | $0.01295 |
| Haiku 4.5 | $0.00648 | $0.00648 |
Grade A, and why
mcp eval.instructions.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 2mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 757 lines — stays where its author put it; the contents beside it link to each section on GitHub.
---
applyTo: 'eval/**'
---
# Copilot Instructions for Storybook MCP Eval Harness
## Project Overview
This is an eval harness for testing AI coding agents' ability to build UI components using Storybook and MCP tools. The harness automates the process of running trials, executing agents with prompts, and grading the results through multiple quality metrics.
**Core Purpose**: Measure how effectively AI agents can use Storybook's MCP tools to build production-quality UI components.
## Architecture
### Harness Flow
1. **Prepare**: Create fresh Vite + React + Storybook project from template
2. **Execute**: Run AI agent (Claude Code CLI) with prompt and optional context
3. **Grade**: Run automated checks (build, typecheck, lint, tests, a11y)
4. **Report**: Generate metrics, save results, optionally upload to Google Sheets
### Key Components
- **CLI Interface**: Two modes:
- `eval.ts` - Batch eval runner for running multiple trials across variants
- `advanced-eval.ts` - Single trial runner with interactive CLI
- **Context System**: Five context modes (none, Storybook MCP - Dev, Storybook MCP - Docs, custom MCP server, extra prompts)
- **Agent Abstraction**: Pluggable agent implementations (currently Claude Code CLI)
- **Grading Pipeline**: Parallel execution of multiple quality checks
- **Hooks System**: Lifecycle hooks for custom trial logic
- **Telemetry**: Optional results upload to Google Sheets for tracking
### File Structure
```
eval/
├── eval.ts # Batch eval runner (multiple trials)
├── advanced-eval.ts # Single trial runner (interactive)
├── types.ts # Core types and schemas
├── lib/
│ ├── collect-args.ts # Interactive CLI argument collection (for advanced-eval)
│ ├── show-help.ts # Help text formatting
│ ├── generate-prompt.ts # Combines prompt parts
│ ├── prepare-trial.ts # Project template setup
│ ├── teardown-trial.ts # Trial cleanup (stop dev servers, etc.)
│ ├── storybook-dev-server.ts # Storybook dev server management
│ ├── agents/
│ │ └── claude-code-cli.ts # Claude Code CLI agent implementation
│ ├── eval/ # Batch eval runner logic
│ │ ├── collect-eval-args.ts # Collect args for batch eval
│ │ ├── run-eval.ts # Main eval orchestration
│ │ ├── types.ts # Eval-specific types
│ │ └── progress-ui.ts # Progress display
│ └── graders/
│ ├── grade.ts # Main grading orchestrator
│ ├── prepare-grading.ts # Install test dependencies
│ ├── build.ts # Vite build check
│ ├── typecheck.ts # TypeScript checking
│ ├── lint.ts # ESLint execution
│ ├── test-stories.ts # Vitest + a11y testing
│ ├── environment.ts # Git branch/commit tracking
│ └── save-to-sheets.ts # Google Sheets upload
├── variant-configs/ # Variant configs (variants, context combinations)
├── tasks/ # Task definitions
│ └── {number}-{name}/
│ ├── prompt.md # Main prompt
│ ├── hooks.ts # Optional lifecycle hooks
│ ├── manifests/ # Optional manifest files directory
│ │ ├── components.json # Component manifest for @storybook/mcp
│ │ └── docs.json # Optional docs manifest for @storybook/mcp
│ ├── mcp.config.json # Optional MCP server config
│ ├── *.md # Optional additional context
│ ├── pre-grade/ # Optional files to copy before grading
│ ├── {hook-name}/ # Optional hook directories (see Lifecycle Hooks)
│ └── trials/ # Generated trial runs
└── templates/
├── project/ # Base Vite + React template
└── grading/ # Test/lint configs
```
### Context Modes
The harness supports five distinct context types:
1. **No Context** (`--no-context`):
- Agent uses only built-in tools
- Tests baseline agent capabilities
2. **Storybook MCP - Dev** (`--context storybook-dev`):
- Sets up Storybook in the trial project with `@storybook/addon-mcp`
- Starts a local Storybook dev server
- Configures the MCP server endpoint (`/mcp`) for the agent
- Best for testing agents in a live development environment
- Includes automatic setup and teardown of the dev server
3. **Storybook MCP - Docs** (`--context components.json`):
- Provides component documentation via `@storybook/mcp` package
- Uses stdio transport with `packages/mcp/bin.ts`
- Best for testing agents with library/component documentation
- This uses the Storybook MCP server, not a custom MCP server
4. **MCP Server** (`--context mcp.config.json` or inline JSON):
- Custom MCP server configuration (HTTP or stdio)
- Supports multiple named servers
- Flexible for testing different MCP tool combinations
- Use this for fully custom MCP servers; use components.json for Storybook MCP - Docs
5. **Extra Prompts** (`--context extra-prompt-01.md,extra-prompt-02.md`):
- Appends additional markdown files to main prompt
- Useful for providing supplementary instructions
- Keeps main prompt clean while testing variations
## Development Workflow
### Prerequisites
- Node.js 24+ (see root `.nvmrc`)
- pnpm 10.19.0+ (monorepo root enforces this)
- Claude Code CLI: `npm install -g claude-code`
### Running Evaluations
**Batch eval mode (recommended for comparison testing):**
```bash
cd eval
node eval.ts
```
**Single trial mode (interactive):**
```bash
cd eval
node advanced-eval.ts
```
**Non-interactive single trial:**
```bash
node advanced-eval.ts --agent claude-code --context components.json --upload-id batch-1 --no-storybook 100-flight-booking-plain
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.
- 2mo ago First seen · 757 lines · 6,476 tokens per session scan A 977f1f97fb4b
mcp eval.instructions.md is an instructions file published in the GitHub repository storybookjs/mcp (271 stars, last pushed 1mo ago), licensed MIT. It adds 6,476 tokens to every session, about $0.0259 per session on Opus 5.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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.