# Generate Plot

> Generate Plot

- Skill: `llmsresearch/generate-plot` (Agent Skill)
- Install (CLI): `npx skillmds@latest add llmsresearch/generate-plot`
- Raw SKILL.md: https://api.skillmd.com/api/skills/llmsresearch/generate-plot/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: llmsresearch (https://skillmd.com/u/llmsresearch)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/llmsresearch/generate-plot

---


# Generate Plot

Generate a publication-quality statistical plot from a data file using PaperBanana.

## Instructions

1. Read the data file at `$ARGUMENTS[0]`.
2. Prepare the data for the MCP tool:
   - If the file is **CSV**: parse it and convert to a column-keyed dictionary (keys = column names, values = arrays of column values), then serialize with `json.dumps()` to produce a JSON string.
   - If the file is **JSON**: use the raw file content as-is (it is already a JSON string).
3. If `$ARGUMENTS[1]` is provided, use it as the plot intent. Otherwise, ask the user for a description of the desired plot (e.g., "Bar chart comparing model accuracy across benchmarks").
4. Call the MCP tool `generate_plot` with:
   - `data_json`: the JSON string (not a parsed object)
   - `intent`: the plot description
   - `iterations`: 3 (default)
5. Present the generated plot to the user.

## CLI Fallback

If the MCP tool is not available, fall back to the CLI:

```bash
paperbanana plot --data <file> --intent "<intent>"
```

## Example

```
/generate-plot results.csv "Bar chart comparing model accuracy"
```

