agentleFS
GRIDLOCK-NYCGRIDLOCK-NYC/claude-skills/skills/chart-forge/SKILL.md

chart-forge

Skill0 starsChanged 7 months agoMITView on GitHub

Generates professional inline SVG data visualizations — bar charts, donut charts, progress rings, stat cards, comparison tables, and sparklines — from user-supplied data. Output is clean, print-ready SVG embeddable in HTML documents, reports, and one-pagers without external dependencies. Trigger phrases: "chart forge", "make a chart", "generate a bar chart", "create a donut chart", "visualize this data", "add a chart to my report", "SVG chart", "data visualization", "make this visual", "progress ring", "stat card", "inline chart", "embed a chart", "chart from this data", "turn this into a chart". Do NOT use for: code analysis, architecture diagrams, flowcharts or system diagrams (use /plan-directions), data analysis or statistics (use exploratory-data-analysis), writing or editing document prose, generating images via external APIs, or any task that does not involve rendering data as SVG.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All output is self-contained inline SVG — no external fonts, no CDN dependencies, no JavaScript.

    line 19
  2. Very specific:

    Use system-safe fonts only (-apple-system, Helvetica Neue, Arial, sans-serif).

    line 21
  3. Distinctive:

    If the data is ambiguous or missing, ask for it before proceeding.

    line 33
  4. Distinctive:

    Determine dimensions: Default canvas sizes:

    line 39
  5. Distinctive:

    Choose a color palette: Default palette (accessible, print-safe):

    line 47
  6. Distinctive:

    If the user specifies brand colors, use those instead.

    line 54
  7. Distinctive:

    After the code block, include a one-line description of what was generated and how to embed it: "Paste this SVG directly into your HTML.

    line 71
  8. Distinctive:

    Offer variants: After delivering the primary chart, offer 1-2 quick alternatives:

    line 74
  9. Distinctive:

    Do not generate variants unless the user asks.

    line 77
  10. Distinctive:

    No data provided: Ask the user to supply the data values and labels.

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Important

All output is self-contained inline SVG — no external fonts, no CDN dependencies, no JavaScript. The SVG must render correctly when pasted directly into an HTML file or viewed standalone in a browser. Use system-safe fonts only (-apple-system, Helvetica Neue, Arial, sans-serif). Limit palette to 5-6 colors maximum per chart. Never fabricate data — only visualize numbers the user provides.

Instructions

  1. Identify chart type and data. Determine what the user wants to visualize. If the chart type is not specified, infer the best type from the data shape:
    • Categorical comparisons → horizontal or vertical bar chart
    • Part-of-whole (proportions that sum to 100%) → donut chart
    • Single KPI or completion percentage → progress ring or stat card
    • Two items being compared side-by-side → comparison graphic (split bar or versus card)
    • Time series trend (5+ points) → sparkline or area chart If the data is ambiguous or missing, ask for it before proceeding.
  2. Confirm data and labels. Echo back the data you plan to visualize and ask for confirmation if any values seem inconsistent (e.g., percentages that don't sum to 100%, negative values in a donut, empty series).
  3. Determine dimensions. Default canvas sizes:
    • Bar chart: 600 × 380px
    • Donut chart: 400 × 400px
    • Progress ring / stat card: 300 × 300px
    • Comparison graphic: 600 × 280px
    • Sparkline: 300 × 100px User may specify a custom size — honor it exactly.
  4. Choose a color palette. Default palette (accessible, print-safe):
    • Primary: #3B82F6 (blue)
    • Secondary: #10B981 (green)
    • Accent: #F59E0B (amber)
    • Danger: #EF4444 (red)
    • Neutral: #6B7280 (gray)
    • Background: #F9FAFB or white If the user specifies brand colors, use those instead.
  5. Generate the SVG. Build the SVG from scratch using only SVG primitives (rect, circle, path, text, line, polyline, g). Include:
    • A viewBox attribute so the chart scales correctly
    • Axis labels and value labels directly on the SVG (no legend box unless >4 series)
    • A chart title at the top if the user provides one
    • Clean whitespace/padding (at least 40px on all sides)
    • Rounded corners (rx) on bar chart bars for a modern look
    • Percentage labels inside or adjacent to donut segments
  6. Output the SVG block. Wrap the SVG in a fenced code block labeled svg for easy copying:
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 380" ...>
      ...
    </svg>
    After the code block, include a one-line description of what was generated and how to embed it: "Paste this SVG directly into your HTML. No dependencies required."
  7. Offer variants. After delivering the primary chart, offer 1-2 quick alternatives:
    • "Want this as a horizontal bar chart instead?"
    • "Want a donut version showing the same data?" Do not generate variants unless the user asks.

Error Handling

  • No data provided: Ask the user to supply the data values and labels. Do not generate placeholder or example data unless explicitly requested.
  • Data does not match chart type (e.g., non-percentage values for a donut): Warn the user and suggest a more appropriate chart type. Offer to normalize if appropriate.
  • Too many data points for the chart type (>12 bars, >8 donut segments): Warn that the chart will be cluttered. Suggest grouping smaller values into an "Other" category or switching to a table-plus-sparkline format.
  • Custom colors fail contrast check (light text on light background or vice versa): Flag the contrast issue and substitute a safe default while noting the change.
  • User requests JavaScript or animation: Explain that the output is static SVG only. CSS animations within SVG are acceptable if the user explicitly requests them — but no <script> tags.

Examples

Example 1 — Bar chart for a report User: "Chart forge: monthly revenue. Jan $12k, Feb $18k, Mar $15k, Apr $22k, May $19k, Jun $27k" Skill generates a 600×380 vertical bar chart with 6 bars, value labels on top of each bar, month labels on the x-axis, and a y-axis scaled to $30k. Title: "Monthly Revenue".

Example 2 — Donut chart for a one-pager User: "Make a donut chart: Backend 45%, Frontend 30%, Infrastructure 25%" Skill generates a 400×400 donut chart with three segments in blue/green/amber, percentage labels on each segment, and a centered total label.

Example 3 — Stat card / KPI User: "Progress ring showing 73% completion for Q2 goal" Skill generates a 300×300 SVG with a thick ring arc filled to 73%, the percentage displayed large in the center, and "Q2 Goal" as a subtitle below the number.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.