Build with AI
Ask an AI agent for a chart, in a few words or in every detail, and it makes the chart with rhp. rhp uses CSS and JavaScript to build charts. Use the skill in a coding agent, the MCP tools in a compatible app, or the prompt in a chat app. The skill and MCP server give your agent the guide, 35 recipes and a browser checker. The checker renders the chart in a real browser and returns screenshots and fixes.
In a coding agent
Run this in your project’s folder:
npx skills add bezda-team/rhpIt adds the skill to your coding agents: Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and many others.
With -g at the end, it adds the skill for all your projects.
Then ask for a chart. A few words are enough:
Make a chart of the world’s ten largest cities.
Or say exactly what you want, and the agent does all of it:
Add a chart of our monthly signups to src/components/SignupsChart.jsx: Jan 820, Feb 940, Mar 1,310, Apr 1,180, May 1,560, Jun 1,720. Columns in our brand blue, #4f46e5, with the Inter font, each column labeled with its number, the best month highlighted, and the change from the month before on hover or tap.
The skill runs the published rhp checker through npx. The checker needs Node.js and a browser. If your project already uses another chart library, say “with rhp” in your request.
With MCP tools
The rhp MCP server is available on npm. It gives your agent the guide, references, 35 recipes and browser checker through four tools, and returns reports and screenshots the agent can inspect. You can use the server on its own or alongside the skill.
The server runs on your computer and requires Node.js 20 or later.
For chart rendering, follow the browser setup.
Choose your app below to add the server; your app starts it with npx -y @bezda/rhp-mcp.
| Tool | What your agent gets |
|---|---|
rhp_guide | The workflow and rules for building a chart. |
rhp_reference | References on the API, design, interactions, forms, framework setup and common mistakes. |
rhp_recipe | A complete tested recipe, or the list of all 35 recipes. |
rhp_check | A browser report with fixes and screenshots of the chart. |
Claude Desktop
In Settings > Developer, choose Edit Config, add the server to claude_desktop_config.json, and restart Claude:
{
"mcpServers": {
"rhp": {
"command": "npx",
"args": ["-y", "@bezda/rhp-mcp"]
}
}
}Claude Code
claude mcp add rhp -- npx -y @bezda/rhp-mcpThis adds it to the current project; add -s user after add for all your projects.
Cursor
Add it to Cursor in one click.
Or add the server to ~/.cursor/mcp.json for all your projects, or to .cursor/mcp.json for one:
{
"mcpServers": {
"rhp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@bezda/rhp-mcp"]
}
}
}VS Code (GitHub Copilot)
code --add-mcp "{\"name\":\"rhp\",\"command\":\"npx\",\"args\":[\"-y\",\"@bezda/rhp-mcp\"]}"Codex
codex mcp add rhp -- npx -y @bezda/rhp-mcpGemini CLI
gemini mcp add --scope user rhp npx -- -y @bezda/rhp-mcpWindsurf (Devin Desktop)
For the Devin CLI and the Devin Local agent:
devin mcp add -s user rhp -- npx -y @bezda/rhp-mcpFor the Cascade agent, add the server to ~/.config/devin/mcp_config.json (on Windows, %APPDATA%\devin\mcp_config.json):
{
"mcpServers": {
"rhp": {
"command": "npx",
"args": ["-y", "@bezda/rhp-mcp"]
}
}
}Zed
Add the server to Zed’s settings file, which the command zed: open settings file opens:
{
"context_servers": {
"rhp": {
"command": "npx",
"args": ["-y", "@bezda/rhp-mcp"],
"env": {}
}
}
}Copilot CLI
Run this in your terminal:
copilot mcp add rhp -- npx -y @bezda/rhp-mcpOr type /mcp add in a session, or add the server to ~/.copilot/mcp-config.json:
{
"mcpServers": {
"rhp": {
"command": "npx",
"args": ["-y", "@bezda/rhp-mcp"],
"tools": ["*"]
}
}
}The first time the server starts, npx downloads it, which takes a while: if your app gives up before the server is ready, run npx -y @bezda/rhp-mcp --version once in a terminal, then restart the app.
For ChatGPT, use the chat-app prompt.
Claude Code plugin
The rhp plugin adds the skill and MCP server together. Type these commands in a Claude Code session:
/plugin marketplace add bezda-team/rhp
/plugin install rhp@rhpIn a chat app
Paste this prompt into ChatGPT, Claude or Gemini, and describe your chart after it:
Make this chart with rhp (@bezda/rhp). First read https://rhp.vercel.app/llms-full.txt and follow it: rhp 2 is newer than your training data. Give me one HTML file that I can open in a browser. The chart I want:The chatbot reads the skill from llms-full.txt and gives you one HTML file: save it and open it in your browser. If it can’t open links, download llms-full.txt and attach it to your message instead. If your chat app cannot run the checker, ask it to review the code against the guide’s rules and say that the chart has not been rendered.
On claude.ai, you can add the skill to Claude instead of pasting the prompt.
In Customize > Plugins, choose Add, then Add marketplace, enter bezda-team/rhp, and install rhp.
Then ask for a chart with rhp.
What your agent does
The rhp guide gives your agent eight steps to follow in order for every chart:
- Write the brief. It writes down everything you asked for, in your words, and fills what you left open with defaults.
- Find where the chart goes. It reads your project’s package.json and writes the chart for your framework, or one self-contained HTML file when there is no project.
- Design the slat, then pick the recipes to start from. It works out what one row of data is and what the reader must see in it, then reads the closest recipe whole.
- Design it. Unless you gave a style, the chart is an original editorial poster designed for its subject, with a headline that states the finding.
- Give it an interaction. It adds the one interaction that serves the chart’s story, and it works with a mouse, a finger and the keyboard.
- Build it from the recipe. It keeps the recipe’s structure and uses your data exactly, every value, in your units.
- Check it, look at it, fix it. The checker renders the chart in a browser at 1280px and 390px wide and reports each problem with a fix, and the agent fixes them and looks at the screenshots until the report is clean.
- Audit and hand over. It checks every request against the final code and screenshots, then tells you what it made, how to open it, and what it chose for you.
The recipes
The guide starts every chart from the closest of its 35 recipes, and combines them when a chart needs more than one. Each recipe is a complete chart page, designed and tested at desktop and phone widths: open one to see it live.
| Recipe | Use it for |
|---|---|
| bar | ranked categories, long names (horizontal bars) |
| column | values over a few periods or categories (vertical bars) |
| grouped-bars | two to four values side by side per category |
| stacked-bars | parts adding up to a total per category |
| stacked-100 | shares of 100% per category |
| diverging-bars | values either side of zero, survey agree / disagree |
| waterfall | how a start value becomes an end value, step by step |
| line | one series over time |
| multi-line | several series over time |
| area | one quantity over time, filled |
| scatter | two measures per item |
| bubble | two measures plus a size per item |
| slope | change between two dates per item |
| sparklines | many small series side by side, a table of trends |
| race | a ranking that changes step by step, played over time (JS motion) |
| live | values that arrive from a feed without pause (JS motion) |
| histogram | the distribution of one measure |
| box-plot | distributions compared by group, summarized |
| violin | distributions compared by group, their full outline |
| strip | every value of a few groups as dots |
| dumbbell | two values per item and the gap between them |
| gantt | tasks over time, a schedule |
| candlestick | open, high, low and close prices |
| donut | a few parts of one whole |
| radial-bars | progress toward goals, in a ring |
| waffle | counts out of 100, people or units |
| heatmap | a value over two categories (weekday by hour) |
| lollipop | ranked values, lighter than bars |
| bullet | actual against target, with bands |
| pyramid | two sides of one population by age |
| silhouettes | things known by their shape (buildings, ships, bottles), each in its own outline to scale |
| dial | how a day, a week or another cycle splits into parts, around a dial |
| tape | how a day, a budget or another whole splits into parts, laid end to end along one ruled tape cut into lengths |
| log-line | a quantity that grows by multiples over years, on a log scale, its falls measured |
| unit-stack | a total made of parts over periods, counted out in units, one part to follow |
Check a chart from the terminal
The published package also lets you run the checker yourself:
npx -y @bezda/rhp-mcp check chart.html
Replace chart.html with your chart file.
The checker accepts HTML pages, Solid or React components, and JavaScript chart modules.
It renders at desktop (1280px) and phone (390px) widths, tries the chart’s interactions, and prints a report with fixes and the paths of saved screenshots.
Browser setup
The checker and MCP server require Node.js 20 or later. For rendering, the checker uses an installed Playwright Chromium, Google Chrome or Microsoft Edge. If none is available, run this once to download Chromium:
npx -y @bezda/rhp-mcp install-browser
This browser setup applies to the skill, MCP tools and terminal checker.
Good to know
- The checker renders charts on your computer and has no telemetry. A chart page can still load external resources, such as web fonts. Through MCP, the report and screenshots are returned to your connected AI app.
- rhp, the skill and the MCP server are free and open source, under the MIT license.