# For agents

A skill file, a chooser, and official ASCII twins. The agent writes the figure — and can read it back.

When a write-up needs a figure, pick a component. JSX goes in MDX. The official fence goes in a README, a PR, or Linear.

## Write and read

Writing — at most two graphs next to the claim. React gets JSX. Plain Markdown gets the official twin from https://mdx-graphs.kshv.me/llms.txt.

Reading — the figure is characters in the file. Opening the MDX shows labels and values. Edit the labels. Do not replace a graph with SVG.

## How to call it

1. Put https://mdx-graphs.kshv.me/skill.md and https://mdx-graphs.kshv.me/skill/recipes.md in the skills folder the agent already reads.
2. If the host is React, install the components: `pnpm dlx shadcn@latest add https://mdx-graphs.kshv.me/r/all.json`.
3. Ask for a write-up. At most two graphs. Prose between them.

## Chooser

- A path or a refactor: GraphFlow, then GraphTimeline
- An incident: GraphTimeline, then GraphUptime
- Pick A vs B: GraphCompare, then GraphRank
- What a PR changed: GraphDiff, then GraphSlope
- Overlapping work: GraphGantt, then GraphStat
- A migration in flight: GraphMeter, then GraphKpi
- One headline number: GraphKpi, then GraphStat
- An RFC or a launch list: GraphSheet, then GraphCheck
- Nested files: GraphTree

## Rules

- At most two graphs in a section. Prose between them.
- React / importable MDX: JSX. Plain Markdown: official fenced twin from /llms.txt. Do not invent ASCII.
- Titles: short uppercase, drawn as [ TITLE ].
- Labels: lowercase, plain (auth middleware, not AuthMiddleware Layer).
- Copy props from docs or recipes. Do not invent APIs, extra hues, or chart libraries.
- palette="duo" / "multi" only when a second or third series needs it.
- Motion is already in the components. Do not add loops or pulses.

## Try it

### Refactor

We're moving session checks out of route handlers into middleware. Write a short plan for the team.

Use markdown graphs for the before/after request path and the week-by-week rollout. Prose between the two figures. Don't draw SVG.

### Incident

Draft a tight postmortem: p95 crossed 800ms at 14:02, we rolled back the cache flag at 14:11, the write-up is still open.

Use markdown graphs — a timeline of the night, then which days users felt it. No SVG.

### Pull request

Leave a PR review comment on the auth refactor. Summarize what files moved, then show how coverage changed on main vs this branch.

    Use markdown graphs from this project. At most two figures. Don't invent APIs or draw SVG.

### Pick one

We're choosing a queue: BullMQ vs SQS. Write the tradeoff for the RFC.

Use markdown graphs — a feature matrix, then bundle size only if it matters. Don't draw SVG.

### README

Add a launch section to the README. It's a .md file, no React.

Use markdown graphs — a punch list (GraphCheck twin) and a grouped table if it earns it. Paste the official fenced ASCII from llms.txt. Don't paste JSX.

## Links

- Skill install: https://mdx-graphs.kshv.me/docs/skill
- Examples: https://mdx-graphs.kshv.me/docs/examples
- OpenAPI: https://mdx-graphs.kshv.me/openapi.json
- JSON catalog: https://mdx-graphs.kshv.me/api/v1/components
- Developer API: https://mdx-graphs.kshv.me/developers
- agents.md: https://mdx-graphs.kshv.me/agents.md
