Figure

From richard-kim-79/archora-skills · View interactive version

Figure is an AI agent skill from the GitHub repository richard-kim-79/archora-skills. Generates complete, runnable visualization code for research figures. Produces matplotlib/seaborn Python scripts for quantitative data and Mermaid diagrams for conceptual relationships, workflows, and taxonomies. Use when the user asks for charts, graphs, visualizations, figures, or diagrams. Produc

How to use this skill

Skill file

Figure Generator

Generate publication-quality visualization code for research figures.

Figure Types

| Type | Use for | Format |

|------|---------|--------|

| matplotlib | Quantitative data: bar charts, scatter plots, line graphs, heatmaps, box plots | Python |

| seaborn | Statistical visualizations: distributions, regressions, pair plots | Python |

| Mermaid | Conceptual diagrams: workflows, taxonomies, hierarchies, timelines | Mermaid |

Decision guide

Output Format

## Figure 1: [Title]

**Caption:** [Full figure caption as it would appear in a paper — what is shown and the key takeaway]

**Description:** [What this figure shows and why it matters for the research]

**Type:** Python (matplotlib/seaborn)

import matplotlib.pyplot as plt

import numpy as np

[Complete, runnable code with realistic placeholder data]

plt.tight_layout()

plt.savefig('figure1.png', dpi=300)

plt.show()

Code requirements

Validation (always run after generating Python code)

Before presenting code to the user, validate syntax with Python's AST parser:

python -c "import ast; ast.parse(open('figure1.py').read()); print('✅ Syntax OK')"

If the check fails, fix the syntax error and re-validate before showing the result.

For inline code blocks, validate with:

import ast
code = """
# paste generated code here
"""
try:
    ast.parse(code)
    print("✅ Syntax OK")
except SyntaxError as e:
    print(f"❌ Syntax error: {e}")

Note: AST validation checks syntax only — it does not catch runtime errors (e.g. wrong data shapes). Always include comments explaining how to adapt placeholder data to real data.

How to run

Python figures:

pip install matplotlib seaborn numpy
python figure1.py

Mermaid diagrams:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.