Add and maintain a docs site (project page) for a showyourwork paper with syw-site — the paper's numbers, figures and interactive figpress-apps webapps, built by the paper's own pipeline and published at nstarkman.space/<repo>/ with the website's layout, local-only until arXiv. Use when asked for a docs site, project page or website for a paper, when working in a showyourwork repository's docs/ folder, or when a repository uses syw-site.
Ships in syw-site. 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.
syw-site adds docs/ (an Astro site) to a showyourwork paper. The paper's own pipeline writes
docs/public/generated/facts.json (title, authors, abstract, figures with captions, every
\variable value), web images of its figures and its figpress-apps webapps; the site renders them inside
the nstarkman.space layout. Facts come from the paper: never type a number, caption or author
into a page. A name that does not exist stops the build.
0.4.4.dev*; the author's is the showyourwork-main conda env):
pip install "syw-site @ git+https://github.com/nstarman/[email protected]" (latest:
gh release list -R nstarman/syw-site --limit 1).syw-site init (or --repo owner/name if origin is not GitHub). It
writes docs/, docs/syw-site.yml with publish: false, a guarded include: of syw-site's
rules at the end of the Snakefile (the paper still builds where syw-site is not installed), and
.github/workflows/docs.yml. Install syw-site in the same environment as showyourwork, or the docs
rules stay off. It refuses to overwrite an existing file and says
which: move that file aside (an old docs/ becomes the content of the new pages) and rerun.docs/syw-site.yml (references/settings.md): website_id
(the paper's record id on nstarkman.space), and python: if the paper runs scripts with e.g.
uv run --locked python.syw-site card (needs the network): fetches the paper's entry as nstarkman.space has it —
docs/card.json, the card's images, the author's portrait — and commit them. Every page then
opens with the website's own entry for the paper (the research card, without "Context"), and the
Card workflow refreshes it weekly or by hand. Without a website_id, pages open with the
paper's title and authors instead.The site's tabs: Overview (index.mdx, your prose), Explore (webapps with explore: true),
Figures (every figure, one column, the author's portrait stamped top-right — place it per figure
with figures: in syw-site.yml; each is "Paper Figure N", to tell it from the site's interactive
figures), Info (the showyourwork button to reproduce the paper, the co-authors' map, what funded
it — the paper's funding on the website — and your own pages in src/pages/info/), Cite (BibTeX,
and the software the paper used, each with a Copy BibTeX). Explore is hidden when it has no webapps.
Pages are MDX in docs/src/pages/ (index.mdx is the overview). Use the components
(references/components.md):
import Var from '../components/Var.astro';
import Fig from '../components/Fig.astro';
The forecast gains a factor of <Var name="forecast/angular_gain" /> (<Fig label="fig:forecast" />).
<Var name> is the \variable{output/<name>.tex} path. <Fig label> is the figure's \label.
Inline math is $…$. Check names against docs/public/generated/facts.json
(references/facts-schema.md).
Build the app with the figpress-apps skill in webapps/<name>/ (its export.py takes --out DIR;
python: runs it and figpress-apps build, so pin the version the app needs there, e.g.
--with "figpress-apps==…"), or put a figpress-plotly figure there: webapps/<name>/figure.py defining figure (the decorated
build), written as its web page; python: must then provide figpress-plotly (e.g.
--with "figpress-plotly==…"). List it with the data files it reads and the figure it belongs to:
webapps:
globe: { inputs: [src/data/directional.npz], figure: "fig:quadrupole" }
It is embedded on that figure's page, above the paper's image (replaces: true: instead of it, as
for a figpress-plotly figure that matches the print, and wherever <Fig> shows that figure); elsewhere use <Webapp name="globe">Caption.</Webapp> (the
caption is optional; the frame takes the app's height). In the overview, set a figure or an app apart
from the prose in a card:
<div class="syw-card">
<Webapp name="globe" height={650}>What to do with it, and what it shows.</Webapp>
</div>
syw-site build --cores 4 # the paper, then the docs data, then the site; extra flags after --
syw-site serve # http://127.0.0.1:8000/<repo>/
build fails on an unknown <Var>, <Fig> or <Webapp> name, or a missing facts.json. serve
answers only under /<repo>/, so a link that forgets the base path fails here as it would live.
Open the overview, the figure gallery, each figure page and the cite page, and compare numbers
with the PDF.
Until then, nothing leaves the machine or CI: never set publish: true, never make the repository
public, never paste the paper's content anywhere public. At submission, with the author:
docs/syw-site.yml: publish: true, and paper: { arxiv: … } (later doi, bibcode).main; docs.yml deploys to nstarkman.space/<repo>/.The workflow refuses to deploy while the repository is private.
To move to a newer syw-site, use the syw-site-upgrade skill.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/syw-site:syw-sitefrom syw-site
syw-site@nstarman-skills is listed by nstarman/skills — review the source before installing
npx claudepluginhub nstarman/skills --plugin syw-site