agentleFS
zirui-songzirui-song/claude-skills/skills/sync-overleaf/SKILL.md

sync-overleaf

Skill17 starsChanged 4 months agoMITView on GitHub

Use after producing or updating empirical tables/figures that belong in a paper. Copies updated artifacts from the project's results/ directory to the corresponding Overleaf-synced folder, preserving filenames, and reports what changed so the LaTeX draft picks them up on next compile.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    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:

    Copy: only NEW + CHANGED files. Preserve filenames exactly so \input{} / \includegraphics{} calls don't need editing.

    line 23
  2. Very specific:

    Targeted edits only: Never regenerate or overwrite a whole .tex file when an Edit on the specific block will do.

    line 35
  3. Distinctive:

    After ANY table or figure edit:

    line 41
  4. Distinctive:

    Look at the affected page — page-fit, header layout, rendering — don't infer it from a clean exit code.

    line 44
  5. Distinctive:

    Never say a fit is "fixed" without a compile that shows it.

    line 47
  6. Distinctive:

    Never delete files in the Overleaf folder — only add/overwrite.

    line 51
  7. Distinctive:

    If a filename collision exists but content differs intentionally (e.g., anonymized version), confirm with the user before overwriting.

    line 52
  8. Distinctive:

    After copy, suggest the user trigger a fresh Overleaf compile.

    line 53
  9. Distinctive:

    Do not paste table content into chat — only path + size.

    line 57
  10. Distinctive:

    Do not assume the Overleaf folder structure.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Sync Overleaf

Standard post-step to push updated tables/figures into an Overleaf-synced folder.

Inputs (infer if obvious, otherwise ask)

  • Source directory in the project (typically results/tables/ and results/figures/).
  • Destination Overleaf folder (typically under ~/Dropbox (MIT)/Apps/Overleaf/<paper>/ — confirm location; project folders may live in separate unsynced Dropbox roots).

Steps

  1. Confirm destination exists and is synced — ls -la <dest> and check files are real (not Dropbox placeholders).
  2. Diff — for each source file, compare to the existing destination file:
    diff -q source dest
    Build a list of: NEW, CHANGED, UNCHANGED.
  3. Copy only NEW + CHANGED files. Preserve filenames exactly so \input{} / \includegraphics{} calls don't need editing.
  4. Report — list NEW and CHANGED file paths and their sizes. ≤ 10 lines.

Editing .tex files (not just copying artifacts)

The user edits in the Overleaf web editor while Claude edits locally. Treat this as a two-way sync, never a one-way push.

  1. Pull first. Invoke the overleaf skill (or run overleaf-sync-now sync) to refresh the local copy before touching any .tex/.bib.
  2. Diff before writing. Show the user a diff of the pulled Overleaf version against the local copy. If they differ, stop and ask which to keep. Do not merge on your own.
  3. Targeted edits only. Never regenerate or overwrite a whole .tex file when an Edit on the specific block will do. Regenerating clobbers the user's web-editor prose — this has already cost recovery from Overleaf version history.

Verify the compile before reporting done

After ANY table or figure edit:

  • Recompile the document.
  • Look at the affected page — page-fit, header layout, rendering — don't infer it from a clean exit code.
  • Report the actual measurement (e.g., Overfull \hbox (83.0pt too wide) at line 412). Never say a fit is "fixed" without a compile that shows it.

Conventions

  • Never delete files in the Overleaf folder — only add/overwrite.
  • If a filename collision exists but content differs intentionally (e.g., anonymized version), confirm with the user before overwriting.
  • After copy, suggest the user trigger a fresh Overleaf compile.

Anti-patterns

  • Do not paste table content into chat — only path + size.
  • Do not assume the Overleaf folder structure; confirm first if not previously used in this session.

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.