/analysis-workflow:analysis-workflowfrom analysis-workflow
Conventions for analysis repos where humans and coding agents work side by side. Use when starting, running or finishing an analysis task; writing any output from an analysis script; reading or writing a shared AnnData working object; adding a dataset path or constant; starting a new analysis project or adopting these conventions in an existing repo; or reviewing an analysis pull request.
Ships in analysis-workflow. 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.
Humans and several agents share one analysis repo, isolated by git worktrees, pull requests and task directories. These rules keep that safe.
First, check for the repo. Outside a repo whose .claude/settings.json enables this plugin, set one up with the
human before anything else: create the analysis repo and, if wanted, its code repo, or adopt an existing repo.
Steps: references/repos.md.
Elsewhere:
CONVENTIONS.md, which humans follow too: task directories, their layout and versions, data/,
working objects and how to write to them. Read it first; this skill adds what only agents do;AGENTS.md: its datasets, where its working objects live, its environments. It wins over examples here;declare-inputs and trace-lineage skills;references/storage.md.FilePaths, dataset versioning and a CLI.git -C <code repo> worktree add .claude/worktrees/<task> -b <branch>._constants.py when it is a stable project fact that several scripts would
otherwise hardcode (a dataset root, a registered resource). Not task outputs, not the current working object
(stated per session), not parameters (they stay in their script).Humans work in the main checkout, in human_ task directories. An agent's task is one session, one worktree and one
branch, merged through one or more PRs; a later answer to the same question is the next version, in a new session.
Start
analysis-workflow new analysis/<dataset>/<topic>/agent_<name>_vN --author "<your model>"; if vN is not the
next version, it names the one that is.scripts/_common.py, and the
deliverables, recorded in the README. Deliverables are any of a report, a figure, an HTML page, just results in
outputs/ and a write-back; start from the default the session start lists, if any, which the human may change
for this task.Run
PATHS = task_paths(__file__) lives in scripts/_common.py; call PATHS.ensure() in the writer. The tracked
directories stay in the worktree; task_paths anchors the untracked ones (figures/, outputs/, logs/) to the
main checkout, so they outlive it.task_paths(<its _common.py>).outputs. Read the main checkout by absolute
path; never cd into it.$MAIN from the submit
command, never hardcoded, and logs to PATHS.logs; how to submit it is the compute environment's concern.scripts/verify.py re-deriving it. A code package's invariants
belong in that package's tests.Record. The task README, in the task template's layout, is the overview, kept current. The deliverables hold the
findings; the README links to them rather than restating them. The details of each PR go in its body, laid out by
the repo's .github/pull_request_template.md; the README gives each PR, and each issue the session opened in any
repo, a short summary.
Finish
yes=True inside with writes(<store>):.data/<dataset>/processed/ at sign-off, written, copied or
moved there inside a writes block. Ask which subdirectory; record the path.analysis-workflow tidy <task>, then the declare-inputs skill on the task, before every PR that changes its
code, not only the last. Then analysis-workflow check layout, check inputs <task> and, for each store written
to, check provenance <store>; then push.pixi.toml is shared; reusability decides what goes in. A benchmark's candidates go task-local.python … directly. Anything run outside a session uses
pixi run --manifest-path <main>/pixi.toml --as-is …, as batch jobs do; without --as-is, pixi relocks or
installs into main whenever its manifest or lock is ahead of the environment.pixi.toml locks, installs and tests it in a temporary checkout beside the main one, where
the relative path dependencies resolve; main's environment stays untouched. Commit pixi.toml, then
git worktree add --detach <main>-lock HEAD (<main> is the main checkout's path), and pass
--manifest-path <main>-lock/pixi.toml to pixi lock, pixi install --frozen and the checks'
pixi run --as-is. Then, in this order: copy its pixi.lock into the task's worktree, check
git diff --stat pixi.lock, commit, and git worktree remove --force the temporary checkout. The repo's settings
list ../<main checkout's directory>-lock under permissions.additionalDirectories, so the copy needs no
approval. After the merge the main checkout is pulled and, by whom rule 5 names, every environment whose lock
entries changed is installed there: pixi install -e <env> for each (plain pixi install installs only default).src/ first on PYTHONPATH, so the repo's own package is imported from the
worktree. An editable code repo still imports from its main checkout; to run a code-repo worktree's edits, prepend
its src/ too. Paths to shared data come from main_checkout(__file__), never from __file__ alone, which
follows the worktree; tracked repo files (e.g. resources/) from checkout(__file__), so a worktree reads its
branch's copy.python, skips pixi's activation: variables the
environment sets (such as CONDA_PREFIX) are missing unless the kernelspec passes them.--help, not by re-running analyses.A repo's CONVENTIONS.md, its PR template and the generic half of its REVIEW_GUIDE.md, for humans and reviewers
that cannot load this plugin, come from the analysis template.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/allowLift one guard hook of the analysis-workflow conventions for this session. Only the human runs it, by typing `/analysis-workflow:allow <guard>` after a guard refused something they want done./declare-inputsWrite down what an analysis task consumed: read its scripts and notebooks and list, in the task's `inputs.yaml`, the stores with the keys it used, other tasks' files and data files. Use before each PR that changes a task's code; when `analysis-workflow trace` or `check inputs` names tasks without declared inputs; or when asked to declare or update the inputs of one or several task directories./trace-lineageExplain how a data artifact was made: trace a key in a shared AnnData or SpatialData store, or a file in a task's outputs, back through the tasks that produced it, and write a summary of its history. Use when asked what created an artifact, what it is based on, for its lineage or provenance, or which tasks a published artifact rests on.analysis-workflow@quadbio is listed by quadbio/claude-plugins — review the source before installing
npx claudepluginhub quadbio/claude-plugins --plugin analysis-workflow