agentleFS
matthewdigiuseppematthewdigiuseppe/MStack/skills/viz/SKILL.md

viz

Skill17 starsChanged 3 months agoMITView on GitHub

Publication-quality ggplot figures matched to the claim each makes — coefficient plots, marginal effects with moderator support, event studies and RD plots that show the design's credibility, specification curves and sensitivity plots, small multiples of the variation the design uses — with claim-stating titles, a colorblind-safe palette, and PDF+PNG+underlying CSV via a bundled theme. Use when the user asks for figures, plots, coefficient or marginal-effects charts, event-study or RD plots, or slide-ready graphics from results.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 0

    Distinctive

    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. Very specific:

    After /mstack:analyze and /mstack:robustness, before /mstack:draft-section results: figures lock the visual argument, then the prose …

    line 16

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

/mstack:viz

Stage: analyze · Voice: figure-designer

After /mstack:analyze and /mstack:robustness, before /mstack:draft-section results: figures lock the visual argument, then the prose describes them. A paper's figures should let a reader who skips the tables see the effect, believe the design, and judge the robustness.

Procedure

  1. Load output/models/, output/models/robustness.rds, data/clean/analytic.rds, .mstack/config.yaml (design.type, target_journals), and ${CLAUDE_PLUGIN_ROOT}/references/figure-conventions.md. If a target journal is set, match its figure conventions (column width, color policy); ask the user for the artwork specs rather than guessing.
  2. Decide the figure set from the figure-by-claim table in the reference. Every paper gets at least: one figure showing the variation the design uses (treatment by unit over time, or the distribution across groups), one figure showing the design's credibility (event study with the pre-period, RD plot with binned means and the bandwidth, balance plot, first stage), the effect figure (coefficient plot, or predicted values at substantively chosen values with the moderator's support shown), and the robustness figure (specification curve; sensitivity contour or breakdown). Keep the figures that carry the headline; skip decoration.
  3. Write code/03-figures.R (R conventions: r-coding-skills if installed, else ${CLAUDE_PLUGIN_ROOT}/references/r-conventions.md). Copy ${CLAUDE_PLUGIN_ROOT}/skills/viz/assets/theme_mstack.R to code/theme_mstack.R once per paper (so the replication package is self-contained) and source() it for theme_mstack(), Okabe–Ito scales, and save_figure() (PDF + PNG + CSV in one call). Conventions: one ggplot object per figure named fig_<n>_<descriptor>, built from the saved model objects with marginaleffects for predictions and intervals; the title states the claim ("Trade exposure raises protectionist vote share", not "Effect of trade on voting"); subtitle carries the estimand and sample; caption carries the model, standard errors, and N; the same color means the same thing in every figure; at most five series; direct labels where possible; a zero line where zero means no effect; axes in substantive units; explicit width / height / units on every save; output/figures/<name>.pdf (vector, paper), .png (raster, slides), <name>-data.csv (rebuildable from CSV alone).
  4. Run Rscript code/03-figures.R and capture output.
  5. Check against the "what referees fault" list in the reference: every figure renders; intervals come from the same standard-error choice as the tables; event studies show the reference period and the full pre-period; marginal effects stay inside the moderator's support; axis labels are human-readable; legends present where needed and absent where redundant; sensible aspect ratio and print size.

Outputs

  • code/03-figures.R, code/theme_mstack.R.
  • output/figures/<name>.pdf, .png, -data.csv per figure.
  • Summary block: figure count, the claim each carries, and which figures show variation, credibility, effect, and robustness.

Anti-patterns

  • Default ggplot. Nothing ships with theme_grey().
  • Variables as titles. Titles state claims.
  • An effect figure with no credibility figure. Show the design, not only the estimate.
  • No CSV. A figure that cannot be rebuilt from a CSV is brittle.
  • Stars on coefficient plots. Show intervals; let the reader decide.
  • Dual axes, 3D, pies, gradients, more than five colors.

Next

/mstack:draft-section results references figures by their claim titles.

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.