/sdrf-skills:sdrf-contribute [PXD accession and SDRF file path]from sdrf-skills
Guides contributing a completed SDRF annotation for a ProteomeXchange dataset to the community via a PR to bigbio/sdrf-annotated-datasets, including checking prerequisites and classifying new vs. update contributions.
Ships in sdrf-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.
Bundle paths.
spec/,tools/anddata/ship with this skill, not with your working directory. Resolve every such path below against the bundle root (SDRF_SKILLS_ROOT, elseCLAUDE_PLUGIN_ROOT, else your sdrf-skills checkout):${SDRF_SKILLS_ROOT:-${CLAUDE_PLUGIN_ROOT}}/spec/sdrf-proteomics/TERMS.tsv. The helpers are thesdrf-toolscommand (install notes:sdrf-annotate/references/setup.md; check withsdrf-tools doctor); noPYTHONPATHor bundle-root variable is needed to run them. Files the user is annotating stay relative to the working directory.
You are helping the user contribute an annotated SDRF file back to the community repository
(bigbio/sdrf-annotated-datasets). This is the final step after annotation, validation,
and review — closing the loop from "I annotated a dataset" to "the community can reuse it."
/sdrf-skills:sdrf-annotate, the content is in the conversationCheck if the PXD already exists in the community repository
(bigbio/sdrf-annotated-datasets):
Look for: datasets/{PXD}/{PXD}.sdrf.tsv
You can check via the GitHub API without cloning:
gh api repos/bigbio/sdrf-annotated-datasets/contents/datasets/{PXD} \
--silent && echo "exists" || echo "new"
Classify at the level of the file you are about to write, not the directory.
A PXD folder may legitimately hold several SDRFs with descriptive suffixes
(PXD006430-tmt.sdrf.tsv + PXD006430-silac.sdrf.tsv), so an existing folder
does not mean you are replacing anything:
gh api repos/bigbio/sdrf-annotated-datasets/contents/datasets/{PXD} \
--jq '.[] | select(.name | endswith(".sdrf.tsv")) | .name' 2>/dev/null
For the update case, do not open the PR yet. Audit the file you are about to replace, so the PR can say what was actually wrong with it. Abort on a failed fetch rather than auditing a truncated or error-page file:
set -euo pipefail
url=$(gh api "repos/bigbio/sdrf-annotated-datasets/contents/datasets/{PXD}/{FILE}" --jq .download_url)
[ -n "$url" ] || { echo "could not resolve download URL — abort"; exit 1; }
curl -fsSL "$url" -o existing.sdrf.tsv
[ -s existing.sdrf.tsv ] || { echo "empty download — abort"; exit 1; }
sdrf-tools audit-existing existing.sdrf.tsv --accession {PXD} \
--runs deposited_runs.txt --organism "<each organism PRIDE registers>"
Then:
If /sdrf-skills:sdrf-annotate already ran its Step 0.5 gate for this accession, reuse that
audit instead of repeating it, and confirm the user chose fix or reannotate.
Never open a PR that silently overwrites an existing annotation.
Before contributing, the SDRF must pass validation:
Suggest programmatic validation — run once per declared comment[sdrf template], each against the rows that declare it; every run must pass:
pip install sdrf-pipelines
parse_sdrf validate-sdrf --sdrf_file datasets/{PXD}/{PXD}.sdrf.tsv --template ms-proteomics
# repeat --template <organism/experiment template> for each declared template
The target repo's CI SDRF review gate also checks coordinate collisions and ragged rows on every changed file — reproduce those locally before pushing.
Zero-deletion guard (mandatory before PR): stage only your new folder (git add datasets/{PXD}/, never git add -A), then run git diff --cached --name-status and confirm every line is A — abort if any D/M/R touches a dataset you did not create.
Run ``/sdrf-skills:sdrf-annotate <file.sdrf.tsv> (review mode) for a thorough check including ontology verification
Require independent adversarial approval:
python3 <sdrf-skills-root>/tools/review_gate.py gate
If the artifact is pending, dispatch a fresh reviewer using
skills/sdrf-adversarial-review/SKILL.md. The contributing/producer context
must not create its own approval receipt. Any edit after approval requires a
new review.
Check file structure:
.sdrf.tsvDo NOT proceed to contribution if there are validation errors. Warnings are acceptable — mention them but allow the user to proceed.
The community repository (bigbio/sdrf-annotated-datasets) uses this structure:
datasets/
└── {PXD}/
└── {PXD}.sdrf.tsv
For datasets with multiple sub-experiments:
datasets/
└── {PXD}/
├── {PXD}-celllines.sdrf.tsv
└── {PXD}-tissues.sdrf.tsv
Save the SDRF content to the correct path (note the top-level datasets/):
datasets/{PXD}/{PXD}.sdrf.tsv
If the SDRF still has unverifiable sample->file/channel maps or demographics, put it under
sandbox/{PXD}/ instead (CI-exempt) with a BLOCKED: note — never PR unresolved data to datasets/.
Ensure the file:
Ask the user which mode they prefer:
gh CLI is available)Execute the full contribution flow:
# 1. Fork the repository (if not already forked)
gh repo fork bigbio/sdrf-annotated-datasets --clone=false
# 2. Clone the user's fork
gh repo clone {username}/sdrf-annotated-datasets /tmp/sdrf-annotated-datasets
cd /tmp/sdrf-annotated-datasets
# 3. Create a branch
git checkout -b annotation/{PXD}
# 4. Create the directory and copy the file
mkdir -p datasets/{PXD}
cp {source_path}/{PXD}.sdrf.tsv datasets/{PXD}/
# 5. Commit
git add datasets/{PXD}/
git commit -m "Add SDRF annotation for {PXD}"
# 6. Push
git push -u origin annotation/{PXD}
# 7. Create the PR
gh pr create \
--repo bigbio/sdrf-annotated-datasets \
--title "Add SDRF annotation for {PXD}" \
--body "$(cat <<'EOF'
## Add SDRF annotation for {PXD}
**Dataset**: [{PXD}](https://www.ebi.ac.uk/pride/archive/projects/{PXD})
**Organism**: {organism}
**Templates**: {template_list}
**Rows**: {row_count} | **Columns**: {col_count}
**Factor values**: {factor_description}
### Validation
- [ ] Validated with `parse_sdrf validate-sdrf` (per declared template)
- [ ] Ontology terms verified via OLS
- [ ] Coordinate rows unique; no ragged rows
_Tick each box only after it actually passes._
EOF
)"
Before executing, present the full plan to the user and ask for confirmation. Fill in the template variables from the SDRF content:
{organism}: from characteristics[organism] unique values{template_list}: from comment[sdrf template] columns{row_count}: number of data rows (excluding header){col_count}: number of columns{factor_description}: from factor value[...] column names and unique valuesPresent the same sequence of commands as Mode A, but as a copyable code block with all variables already filled in. The user copies and executes them.
Preface with:
Here are the commands to contribute your SDRF annotation to the community repository.
Copy and run them in your terminal:
If the PXD already exists, adjust:
Update SDRF annotation for {PXD}Update SDRF annotation for {PXD}annotation/{PXD}-updateAfter the PR is created:
sdrf-pipelines validate-sdrf on the PR(patterns:sdrf-annotate/references/fix-patterns.md) and /sdrf-skills:sdrf-annotate <file.sdrf.tsv> (review mode) are for)gh CLI installed, always fall back to Mode B (guided commands)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/sdrf-adversarial-reviewIndependently falsify and review a created, modified, or proposed SDRF against its specification, ontology terms, source evidence, repository files, and experimental design. Use after SDRF annotation or repair, before contribution or completion, when a review gate reports a pending artifact, or whenever an isolated reviewer must distrust the producer's self-assessment and issue a hash-bound verdict./sdrf-annotateUse for anything about one SDRF file - create it from a PXD accession (always followed by an independent review), review, validate, check, score or fix an existing .sdrf.tsv, look up a cell line or an ontology term, verify technical metadata from raw files, plan what to capture before there is a file, or explain what a column, value, error or concept means. Triggers on PXD accessions, .sdrf.tsv paths, and any question about the SDRF format, its templates, reserved words, modifications or ontology terms./sdrf-campaignnpx claudepluginhub bigbio/sdrf-skills --plugin sdrf-skillsOther plugins' skills for the same job