Ggterm History
by shandley
Search and retrieve plots from history. Use when the user asks about previous plots, wants to find a plot they made earlier, re-display a past visualization, or export a historical plot.
Skill Details
Repository Files
1 file in this skill directory
name: ggterm-history description: Search and retrieve plots from history. Use when the user asks about previous plots, wants to find a plot they made earlier, re-display a past visualization, or export a historical plot. allowed-tools: Bash(bun:*), Read
Plot History Management
Search, retrieve, and export plots from the persistent history.
When to Use This Skill
Use this skill when the user:
- Asks about a plot they made before ("show me the scatter plot from yesterday")
- Wants to find a specific visualization ("find my sales chart")
- Needs to export a previous plot ("export that histogram to PNG")
- Asks what plots exist ("what plots have I made?")
- Wants to compare or reference earlier work
IMPORTANT: Check History First
Before recreating a plot from scratch, ALWAYS check if it already exists in history:
bun packages/core/src/cli-plot.ts history
This saves time and ensures consistency with what the user previously created.
CLI Commands
List All Plots
bun packages/core/src/cli-plot.ts history
Output:
Plot History:
ID Date Description
─────────────────────────────────────────────────────────────────────────
2024-01-26-001 2024-01-26 Scatter plot of price vs sqft by region - "Housing"
2024-01-26-002 2024-01-26 Histogram of income - "Income Distribution"
2024-01-27-001 2024-01-27 Line chart of revenue vs date by product - "Sales"
Total: 3 plot(s)
Search History
bun packages/core/src/cli-plot.ts history <search-term>
Searches across:
- Plot descriptions
- Data file names
- Geom types (scatter, histogram, line, etc.)
Examples:
bun packages/core/src/cli-plot.ts history scatter # Find scatter plots
bun packages/core/src/cli-plot.ts history sales # Find plots with "sales"
bun packages/core/src/cli-plot.ts history histogram # Find histograms
bun packages/core/src/cli-plot.ts history iris.csv # Find plots using iris.csv
Re-render a Plot
bun packages/core/src/cli-plot.ts show <plot-id>
Displays the plot in the terminal exactly as it was originally created.
Export a Plot
bun packages/core/src/cli-plot.ts export <plot-id> [output.html]
Creates an interactive HTML file with PNG/SVG download buttons.
Natural Language → Commands
| User Request | Command |
|---|---|
| "What plots have I made?" | history |
| "Show me my scatter plots" | history scatter |
| "Find the plot with sales data" | history sales |
| "Display plot 2024-01-26-001" | show 2024-01-26-001 |
| "Show me yesterday's histogram" | history histogram → find by date → show <id> |
| "Export the iris plot" | history iris → export <id> iris-plot.html |
| "Re-export that last chart" | history → get latest → export <id> |
Workflow Examples
Example 1: "Show me the plot I made with the housing data"
# Step 1: Search for it
bun packages/core/src/cli-plot.ts history housing
# Output shows: 2024-01-26-001 Scatter plot of price vs sqft - "Housing Prices"
# Step 2: Display it
bun packages/core/src/cli-plot.ts show 2024-01-26-001
Example 2: "Export my histogram to PNG"
# Step 1: Find histograms
bun packages/core/src/cli-plot.ts history histogram
# Output shows: 2024-01-26-002 Histogram of income - "Income Distribution"
# Step 2: Export to HTML (user can download PNG from browser)
bun packages/core/src/cli-plot.ts export 2024-01-26-002 income-histogram.html
# Step 3: Tell user to open in browser and click "Download PNG"
Example 3: "What did I plot last week?"
# List all and filter by date visually
bun packages/core/src/cli-plot.ts history
# Look for entries with dates from last week in the output
Plot ID Format
IDs follow the pattern: YYYY-MM-DD-NNN
YYYY-MM-DD- Date the plot was createdNNN- Sequence number for that day (001, 002, etc.)
Example: 2024-01-26-003 = Third plot created on January 26, 2024
Provenance Information
Each stored plot includes:
- timestamp: When it was created
- dataFile: Path to the data file used
- command: The exact CLI command that created it
- description: Auto-generated summary of the plot
- geomTypes: List of geometries used (point, line, histogram, etc.)
- aesthetics: Mapped variables (x, y, color, etc.)
To see full provenance, read the plot file directly:
cat .ggterm/plots/2024-01-26-001.json
Tips
- Be generous with search terms - The search is case-insensitive and matches partial strings
- Check dates - If user says "yesterday" or "last week", look at the Date column
- Multiple matches - If search returns multiple plots, ask user to clarify or show the list
- Missing plots - If nothing matches, the plot may not exist; offer to create it
$ARGUMENTS
Related Skills
Attack Tree Construction
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
Grafana Dashboards
Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.
Matplotlib
Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.
Scientific Visualization
Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.
Seaborn
Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.
Shap
Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model
Pydeseq2
Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.
Query Writing
For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations
Pydeseq2
Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.
Scientific Visualization
Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.
