Workflow for writing a scientific paper with showyourwork (SYW, the Snakemake-based reproducible-paper tool) and Overleaf, using the Dropbox copy of the Overleaf project as the local text mirror. Use this whenever the user is working in a showyourwork repository (showyourwork.yml, Snakefile, src/tex/ms.tex, src/scripts), edits ms.tex or bib.bib, uses \variable{output/...} macros, rebuilds the paper, syncs with Overleaf, hits a "figure not found" or stale-number problem in Overleaf, or mentions Zenodo caches, 1Password tokens for builds, or SYW stalls and hangs. Make sure to use it before editing any paper text or running a build in such a repo, even if the user only says "update the figure", "fix this sentence", "rebuild", or "push to Overleaf".
Ships in syw-overleaf-dropbox. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A showyourwork (SYW) paper lives in three places that must not drift apart. Most mistakes come from editing the right thing in the wrong place, so learn the map first.
| What | Where you edit it | Why |
|---|---|---|
Paper text (ms.tex, bib.bib) | The Dropbox copy of the Overleaf project (the "mirror") | SYW pulls these two files from Overleaf at the start of every build and overwrites the repo's copy. An edit made in src/tex/ is silently lost, or collides with the pull. |
| Code, data, figures, numbers | The repo (src/scripts/, variables.yml, Snakefile, ...) | SYW builds them and pushes the results to Overleaf. |
Figure PDFs, \variable{} values, class and preamble files | Nobody: they are build outputs | A build pushes them to Overleaf (overleaf.push in showyourwork.yml). Overleaf has no figures or numbers until a build has pushed. |
The Dropbox mirror is an ordinary folder that Dropbox keeps in sync with the Overleaf
project, so Claude can read and edit the text with normal file tools while the user (or
co-authors) edit in Overleaf. On macOS it is
~/Library/CloudStorage/Dropbox/Apps/Overleaf/<Project Name>/. Find it before the first
edit; if you cannot find it, ask the user rather than editing src/tex/ms.tex.
ms.tex, then edit it there
(see "Editing text" below). Do not touch src/tex/ms.tex.references/build.md for the exact command and environment). The build
pulls ms.tex and bib.bib from Overleaf, regenerates anything whose inputs changed,
compiles ms.pdf, and pushes figures and numbers to Overleaf.scripts/check_build.sh automates the checks).Run a build after any change that Overleaf needs to see, because Overleaf only receives
figures and \variable{} values at the end of a build. That is the usual reason for
"File figures/...pdf not found" or "output/...tex not found" in Overleaf: the
text arrived first and the build has not pushed yet.
scripts/mirror_edit.py does this). The mirror may have changed since you
last read it, because Overleaf collaborators edit it too.\variable{output/<group>/<name>.tex} macros, not typed
digits, so they follow the code. references/variables.md explains the plumbing.\includegraphics line in the mirror
changed too. Otherwise a clean checkout (CI) fails.calc_*.py (heavy; writes an .npz/values JSON) and a plot_*.py
(light; only draws). Restyling a plot then never invalidates a cached calculation.calc_* script via write_values, is rendered
by a make_variables.py-style exporter, and is cited as \variable{...}. Only variables
that the text cites are generated, so adding a citation requires a build before Overleaf
can compile it.plot_*.py and converting the PDF to a PNG (pdftoppm)
to look at it. Iterate on the picture, not on guesses about it.src/tex/figures.
Snakemake then sees the output as newer than the script, runs no jobs, and the build
exits 0 without pushing to Overleaf. Delete the PDF (or just rebuild first) so the build
regenerates and pushes it.docs/) with their own script and no SYW rule.ms.tex referencesSYW starts from the manuscript: it builds the figures that \includegraphics names and the
numbers that \variable{...} cites, plus whatever those depend on. So:
\variable{output/<group>/<name>.tex} to be generated. A home-made
\newcommand that \inputs a file does not count, because SYW never sees a citation.\includegraphics in ms.tex names is not built. When ms.tex does name
it, a rule in the Snakefile must produce exactly that path (or the file must already
exist). The \script{...} tag in a caption is how SYW's automatic figure rules find the
script; with an explicit Snakefile rule it is not needed. Check your SYW version's docs
before adding or removing it.Builds need an Overleaf git token and, for Zenodo-cached rules, a Zenodo token. Read them from a password manager's CLI at the moment of the build and pass them as environment variables on that one command, so they never reach a file or the transcript:
SANDBOX_TOKEN="$(op read 'op://<vault>/<item>/credential')" \
OVERLEAF_TOKEN="$(op read 'op://<vault>/<item>/credential')" \
showyourwork build ...
Never print, log or write a token. SYW's own error output can include a Zenodo access
token inside a failed request URL, so redact access_token=... when you read build logs.
Pushing changes to Overleaf: ... then Done!. A build that exits 0
without that line did nothing (see the stale-PDF note above).\variable{...} file is missing (scripts/check_build.sh).ms.pdf (and any changed figure) after every rebuild.The long list of stalls, flags and platform quirks is in references/gotchas.md. Read it
when a build hangs, fails, or silently does nothing. The most common ones:
.pth file; use PYTHONPATH=src.MissingInputException in CI for a derived values file: no rule produces it.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/syw-overleaf-dropbox:syw-overleaf-dropboxfrom syw-overleaf-dropbox
npx claudepluginhub nstarman/skills --plugin syw-overleaf-dropbox