agent-plots

Saves plots and dataframes to a local HTTP server directory for browser viewing.

1|Updated Oct 25, 2020
One-click install
npx skills add https://github.com/bfairkun/dotfiles --skill agent-plots-bfairkun
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-plots
Source: https://github.com/bfairkun/dotfiles/tree/main/agents/.agents/skills/agent-plots
Command: npx skills add https://github.com/bfairkun/dotfiles --skill agent-plots-bfairkun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When an AI agent generates plots or tables on a remote HPC cluster or local machine, the user cannot see them directly. This Skill routes matplotlib, ggplot2, and pandas outputs through a local HTTP server and SSH tunnel so results appear in the user's browser. ## Core Features & Use Cases - Server Detection: Detects the running server's actual output directory and bound port (including auto-shifted ports 8766-8769 on shared HPC nodes) instead of hardcoding paths. - Multi-Language Output: Provides ready-to-use snippets for Python/matplotlib, R/ggplot2, R base graphics, pandas DataFrames (DataTables HTML), and R DT widgets. - Format Guidance: Defaults to vector PDF output, switching to PNG only when plots contain over 1000 labeled text elements. - Use Case: On an SSH session into an HPC cluster, generate a matplotlib figure, save it to the detected server directory, and view it instantly at http://localhost:8765 through the SSH tunnel. ## Quick Start Save my matplotlib figure as a PDF so I can view it in my browser through the agent plots server.

Frequently Asked Questions about agent-plots

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I view matplotlib plots generated on a remote HPC server?▼

Save the figure as a PDF into the directory served by the agent plots HTTP server, then open http://localhost:<port>/<filename> in your browser. An SSH tunnel with LocalForward maps the remote port to your local machine.

Should I save plots as PDF or PNG?▼

Always save as PDF because it is vector-based and crisp at any zoom. The exception is plots with more than 1000 labeled text elements, where the PDF text layer bloats context and PNG is cheaper.

How do I share a pandas DataFrame as an interactive table?▼

Convert the DataFrame with df.to_html and wrap it in a page loading jQuery and DataTables from CDN, then write it to the server output directory. In R, use DT::saveWidget with selfcontained = FALSE since pandoc is unavailable on HPC.

Why does my browser get an empty reply from the plot server?▼

The server binds IPv4 0.0.0.0, but remote localhost resolves to ::1 first, so the tunnel may hit another user's IPv6 process. Diagnose with ss -ltnp | grep :PORT and forward to 127.0.0.1 instead of localhost.

What port does the plot server use on a shared HPC node?▼

The server starts on port 8765 but auto-retries 8766-8769 if another user holds the port. Check ~/.agent_plots_port on RCC Midway to find the actual bound port rather than assuming 8765.