agentleFS
zirui-songzirui-song/claude-skills/skills/table/SKILL.md

table

Skill17 starsChanged 3 months agoMITView on GitHub

Regenerate a Stata table and verify it in the compiled PDF — run its producer, check the log, recompile the root that inputs it, check fit and float placement, show the page, then commit. Also covers the table-by-table review loop ("move onto Table N").

3 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

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Find the producer: Check the project's own map first: an exhibit map (e.g.

    line 7
  2. Distinctive:

    Clustering: keep what the do-file and the project's CLAUDE.md/memory specify.

    line 20
  3. Distinctive:

    House style: read the project's CLAUDE.md/memory first.

    line 22
  4. Very specific:

    Recompile the document that \inputs the fragment: Don't assume a main.tex — a project may hold several standalone roots (the paper, a …

    line 33
  5. Distinctive:

    When the user reviews exhibits one at a time: show the table as a PNG, list numbered proposed fixes, and wait for the user to pick ("do 1, …

    line 60

“Common” is measured: kept by at least 6 in 10 of the 3 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

Given a table number:

  1. Find the producer. Check the project's own map first: an exhibit map (e.g. EXHIBIT_MAP.md), a generator script that stages and writes tables, or a Replication/ folder. If tables reach Overleaf through a generator, run the generator rather than the raw do-file, and respect its guards (e.g. an md5 check on the last-written file). Re-run any variant producers that share the table (suffix variants such as _imp).
  2. Run it with the Stata console binary (run the stata-preflight checks first): on macOS that is the lowercase stata-se / stata-mp inside the app bundle, e.g. /Applications/Stata/StataSE.app/Contents/MacOS/stata-se -b do <file>. Check which edition is actually installed rather than assuming MP. Mac batch Stata chokes on spaces in the -b do path, so if any project directory has a space in its name, run it through a wrapper do-file in a space-free directory containing do "<quoted path>" (add a cd "<dir>" line first if the do-file uses relative paths).
  3. Check the .log for r(###) errors and confirm its mtime is new; stop and report if not.
  4. Clustering: keep what the do-file and the project's CLAUDE.md/memory specify. Project defaults override a global firm-level default (e.g. two-way firm + officer). Don't change it.
  5. House style: read the project's CLAUDE.md/memory first. Common defaults:
    • Name the dependent variable in the table itself (a spanning "Dep. var.:" header, or a row when columns differ) — mlabels(, depvars) or a posthead line in esttab.
    • Notes describe construction only (data, sample, spec, FE, clustering, significance legend) and start "This table shows"; never describe or interpret results.
    • A column-number row; no N-firms rows unless asked.
    • Panels follow the paper's own layout. Some papers use one tabular per panel with \hline\hline and a centred italic title above each — that overrides the global booktabs rule for that paper.
    • esttab label gotcha: $F$ and backtick quotes vanish from labels()/postfoot() with no error. Grep the emitted .tex for the literal label text.
  6. Recompile the document that \inputs the fragment. Don't assume a main.tex — a project may hold several standalone roots (the paper, a results appendix, a referee response), so compile the one that actually includes the fragment. Use tectonic (or latexmk if installed) with output in a temp dir so no PDFs land in the Overleaf-synced folder:
    tectonic -Z continue-on-errors --keep-logs -o "$TMP" <root>.tex
    Full drafts often carry LaTeX errors Overleaf ignores (e.g. float and floatrow both loaded, a subfigure clash), so plain tectonic halts on them. Compile a scratch copy of the Overleaf folder and compare the error count (grep -c '^!' "$TMP/<root>.log") with the draft's known baseline — only new errors matter. Never comment out a package to get a compile; it silently changes float and caption behaviour.
  7. Check fit and placement for the affected page, and report actual measurements:
    • Overfull \hbox lines with their pt values.
    • Float too large warnings, and floats pushed to the end of the document.
    • Which page the table landed on: pdftotext -layout "$TMP/<root>.pdf" - and grep for the caption; pdfinfo for the page count. Then render that page and show the PNG, so the user can see it without opening the PDF:
    pdftoppm -f N -l N -r 110 -png "$TMP/<root>.pdf" "$TMP/table_p"
  8. Only then commit, with a message naming the table, following the project's repo layout (some projects push only the code repo; logs and results stay local). Then sync to Overleaf (sync-overleaf).

Review loop ("move onto Table N")

When the user reviews exhibits one at a time: show the table as a PNG, list numbered proposed fixes, and wait for the user to pick ("do 1, 2 and 4"). Apply only those, re-render, and show it again. Don't carry a fix over to other tables unless asked.

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.