/lab-skills:cleanup-scriptsfrom lab-skills
Session-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.
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.
Check and consolidate working scripts from the current session. This skill focuses
on the current session's work — for project-wide script health, use /audit-project.
/done at the end of a coding sessionscripts/scratch/ has accumulated working filesscripts/scratch/List all files in scripts/scratch/. For each file:
.qmd script this code belongs to. If no matching script exists, it may need a new numbered .qmd..qmd chunk (using the quarto-docs skill template) and add it to the target script. Or create a new numbered .qmd if needed.If scripts/scratch/ is empty or doesn't exist, report "No scratch files" and move on.
Scan scripts/ (not subdirectories) for files that violate conventions:
.qmd files: Files matching [0-9]*_*.R, [0-9]*_*.py, [0-9]*_*.Rmd in scripts/. On local, these should be .qmd — unless they carry a # allow-py: <reason> override comment in the first 20 lines, in which case .py is sanctioned. On the cluster, .py is the default and is fine without the override. Helpers belong in R//python/; superseded scripts in scripts/old/.scripts/old/, scripts/scratch/, scripts/exploratory/, unnumbered files (legacy).For each violation:
.qmd, move to helper dir (R/ or python/), or archive to scripts/old/?For each numbered .qmd in scripts/:
15 from 15a_threshold.qmd).outs/{number}_{topic}/ exists (using the lettered script convention — all scripts with the same number share one output dir).status: development).For each output directory in outs/:
scripts/.Summarize:
/audit-project..Rmd files in scripts/ are legacy — do not flag them as violations.enforce-qmd-scripts.sh hook blocks creation of numbered non-.qmd files unless the file content carries a # allow-py: <reason> override comment in its first 20 lines. The hook auto-skips on the cluster (detected by /nfs/roberts/), where .py is the default. This skill catches anything that slipped through, pre-dates the hook, or used the override.What SKILL.md sets; muted values are Claude Code's defaults
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-skillsOther plugins' skills for the same job