/lab-skills:donefrom lab-skills
Use when ending a session, wrapping up work, or when the user says "done", "wrap up", "let's commit", or "end of session". Summarizes work, updates docs, and commits.
Ships in lab-skills. 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.
None: SKILL.md is the whole skill.
When the user invokes /done, perform these end-of-session tasks in order.
Check the project's .claude/CLAUDE.md for a project-type: field:
data-science — Full wrap-up including all stepsgeneral (or no field found) — Skip steps marked [Data Science only]If no field exists, infer: renv.lock, outs/, or numbered XX_*.qmd scripts → data science. Otherwise → general.
Collaborator mode — <!-- done-mode: collaborator --> (optional):
For repos you don't own (e.g. a student's project you're reviewing). Set it in your personal CLAUDE.local.md so it applies only to you, not the repo owner.
In collaborator mode, /done keeps your session-management artifacts private to your clone:
CLAUDE.local.md, not the shared .claude/CLAUDE.md./done does the push-vs-hold triage for you and recommends a set to push (one-line rationale each); you approve or adjust rather than adjudicating file-by-file. Nothing is pushed without your OK, and nothing pushable is silently left behind..claude/local/) → update as normal but never commit them (the folder is gitignored locally); register them in CLAUDE.local.md, not the shared .claude/CLAUDE.md.Push-vs-hold triage — Claude runs this classification and recommends a push set; the user approves or adjusts (they don't decide each file). Default to a recommendation; only ask about genuinely ambiguous items:
.claude/CLAUDE.md, project_plan.md/project_summary.md, docs/feedback/), shared inputs (data/), reference/lookup files, finished scripts or analysis, and doc-accuracy fixes.scripts/<you>/, drafts, prototypes — anything you'd only share once polished..claude/local/, outs/<you>/, CLAUDE.local.md.Granular alternative: <!-- done-autopush: false --> disables only the auto-push and leaves the rest normal.
Also read
CLAUDE.local.md(gitignored, personal) for these markers — it overrides.claude/CLAUDE.md, so a collaborator can set personal wrap-up behavior without touching the shared repo.
Check if .claude/done_extensions.md exists in the project root. If it does, read it
and incorporate its steps into the wrap-up at the points it specifies (e.g., "run after
Step 2" or "run before Step 4"). Extension steps are additional — they never replace
core steps.
If no extension file exists, skip silently.
Briefly list what was completed this session:
Append a new entry to the Session Log section at the bottom of the project's .claude/CLAUDE.md. This is a rolling log of the last 5 sessions — it's the primary place future sessions look for "what to do next."
Collaborator mode (Step 0): append the session log to your private
CLAUDE.local.mdinstead of the shared.claude/CLAUDE.md— same format and same last-5 trim — so your entries stay in your clone and don't reach the repo owner.
## Session Log
<!-- Maintained by /done. Most recent first. Keep last 5 entries. -->
### YYYY-MM-DD — Short title
- **Plans:** [plan name(s) worked on, or "None"]
- **Work:** [1-2 sentences on what was done]
- **Next:** [bullet list of follow-up items for future sessions]
/done run in this session), replace it rather than adding a duplicate. Merge the work descriptions and update the Next items. This allows /done to be run multiple times per session without cluttering the log.### 2026-03-22 (session 1) — Title, ### 2026-03-22 (session 2) — Title, etc. This makes the log scannable when intensive work produces multiple sessions per day. The number reflects chronological order within that day.figure_plan.md"). Write "None" if no plans were involved. This helps track work that falls outside of plans.Only update planning documents directly relevant to this session's work. Do NOT read all registered documents — identify the 1-2 that matter from session context.
For each relevant planning document:
a. Status tables — Mark completed phases/tasks. Add new phases if needed. When a phase is marked complete, collapse its detailed content to a 3-5 line summary (what was done, key outcomes). Before collapsing, ensure any forward-looking information needed by future phases is already captured elsewhere in the plan.
b. Script and file tracking — Add new scripts, mark replaced ones as legacy, update modified entries.
c. Task lists — Check/uncheck items as appropriate.
Show proposed changes before editing.
If a plan file from plan mode exists in ~/.claude/plans/ and is relevant:
.claude/ documentOnly do these checks if the session actually changed something relevant. Skip silently otherwise.
If canonical data files were created, replaced, or had format changes:
If new conventions, gotchas, or important patterns were discovered this session, propose additions. Only record things that are surprising or counter-default — skip anything Claude would infer from the codebase.
If reusable lessons or gotchas were discovered, or existing entries proved wrong/outdated, propose updates. Keep under 200 lines.
.claude/*.md filesIf new .claude/*.md files were created this session, add them to the Project Document Registry.
If the project has a CHANGELOG.md in its root directory:
CHANGELOG.md exists, skip silently — do not suggest creating oneRun only on the HPC cluster. Guard: if command -v sacct fails (e.g., on local macOS), skip this step silently — it does not apply off-cluster.
If SLURM batch jobs were submitted and completed this session, capture their observed usage so future jobs can be right-sized instead of re-discovering it:
jobstats <jobid> (or seff <jobid> / sacct -j <jobid> --format=Elapsed,MaxRSS,ReqMem,AllocCPUS,State).
Record peak memory, CPU efficiency, elapsed walltime, and the input scale (e.g. read/sequence count) — the scale is what makes the number reusable.Run git status to check for uncommitted changes.
If there are changes:
git add file1 file2), NEVER use git add . or git add -A for the project repo — broad staging will pick up changes from parallel Claude Code sessionsgit status) is a cross-check — files
appearing in current but not initial are candidates but not certaintiesgit push) — unless collaborator mode or done-autopush: false is set (see Step 0; typically in CLAUDE.local.md for collaborative repos). If auto-push is off, do NOT push automatically — but DO surface and pre-triage the decision: gather every local commit not yet on the remote (git log @{u}..HEAD --oneline), this session's and any earlier unpushed ones, classify each with the push-vs-hold heuristics (Step 0), and present a recommended push set and a hold set with a one-line reason each. Ask the user to approve or tweak the recommendation — Claude does the legwork; the user doesn't adjudicate every file. The final call is theirs. Only ask the user if an attempted push fails (e.g., rejected by remote, no remote configured).~/.claude)Check for uncommitted changes:
git -C ~/.claude status --short
If there are changes (skills, CLAUDE.md, etc.):
&&):
git -C ~/.claude add -Agit -C ~/.claude commit -m "Title" -m "Co-Authored-By: Claude <[email protected]>" (use multiple -m flags, NOT heredocs)git -C ~/.claude pushSkill registration check: If new skills were created in ~/.claude/skills/ this session, verify each appears in the Available Skills table in ~/.claude/CLAUDE.md. If any are missing, add them before committing.
Sync reminder: After committing, check if ~/.claude/.sync-canonical/ exists (indicates a two-repo sync setup). If it does, compare the cluster repo HEAD against the canonical staging HEAD. If they differ:
"You have changes in
~/.claudethat haven't been synced to canonical. Run/sync-clusternow to review and push them." If on the cluster, offer to run it immediately. If on macOS (canonical machine), remind the user to run/sync-clusteron the cluster next time they're there — macOS mode only pulls, it can't push cluster changes to canonical. Do NOT run/sync-clusterautomatically — it's an interactive skill that requires decisions about what to push/modify/skip.
Only if conda or pip packages were installed/updated this session. Do NOT blindly
overwrite environment.yml (it's hand-curated and grouped) — detect drift and reconcile.
conda env export --from-history # conda (explicit installs)
conda list | awk 'NR>3 && $NF=="pypi" {print $1"=="$2}' # pip-installed (channel = pypi)
--from-history does not include pip packages — that's why the second command is
required. Skipping it silently drops pip installs from the spec.environment.yml (its dependencies: list and its pip:
subsection). Identify packages in the env but not in the spec (and vice versa).dependencies:pip: subsection (ensure pip is a conda dependency)prefix: line and defaults channel; verify conda-forge is present.environment.yml in the commit.Reconcile the curated file rather than replacing it with a full conda env export, which
records pinned, platform-specific build strings that aren't portable.
Only if R packages were installed or updated during this session:
Rscript -e "renv::status()" 2>/dev/null
If out of sync, ask about renv::snapshot(). Include updated renv.lock in the commit.
Check if this is a publishable Quarto project (all three must be true):
_quarto.yml existstype: book or type: website)gh-pages branch existsIf yes, ask: "This is a Quarto book/website with GitHub Pages. Publish now?"
Do NOT offer for regular .qmd analysis scripts, projects without gh-pages, or type: default.
Brief "Session complete" message listing:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub musserlab/lab-claude-skills --plugin lab-skills34 skills in this plugin
/audit-projectPeriodic project health check - cross-check docs, prune conventions, find drift. Use when project documentation feels stale, before milestones, or when CLAUDE.md is getting long. Do NOT load for auditing skills (use /audit-skills) or data analysis scripts (use /audit-script).
/audit-scriptSystematic audit of data analysis scripts for bugs, analytical reasoning, data handling, style, and reproducibility. Includes domain verification phase that researches tools, file formats, and methods to catch domain-specific errors (not just code bugs). Use when auditing a script, reviewing code for correctness, checking for bugs, preparing a script for publication, or when the user says "audit this script", "review this code", "check this for bugs", or "is this script correct". Three modes: thorough (collaborative section-by-section), fast (Claude-driven with discussion), and report-only. Do NOT load for quick one-off questions about a single line or function.
/audit-skillsAudit Claude Code skills for bloat, trigger accuracy, structural quality, redundancy, and pruning opportunities. Use when skills feel bloated, before publishing to lab repo, after building several new skills, when reviewing a single newly-created skill before publishing, or when the user says "audit my skills", "review skills", "check skill quality", "audit this skill", or invokes /audit-skills. Covers both user-level (~/.claude/skills/) and project-level (.claude/skills/) skills, and supports both full-library scans and single-skill reviews. Do NOT load for auditing data analysis scripts (use /audit-script) or project documentation (use /audit-project).
/cleanup-scriptsSession-scoped script cleanup for data science projects. Checks scripts/scratch/ for working files that need consolidation into .qmd scripts, flags numbered non-.qmd files in scripts/, and verifies script-output directory correspondence. Use when finishing a coding session, when scripts/scratch/ has accumulated files, or when the user says "clean up scripts", "consolidate scratch", or "check script conventions". Lightweight and fast — reads files, no expensive computation.
/conda-envConda environment activation for Python commands. Use when running Python scripts, pip, or conda-dependent tools./data-handlingData handling best practices for R and Python data science analysis scripts. Use when writing data manipulation code, analysis pipelines, or .qmd scripts that process scientific/analytical data (e.g., filtering, joining, normalizing datasets). Do NOT load for general Python scripting, infrastructure code, or configuration management.