# Raw To Bids

> >

- **Type:** Skill
- **Install:** `agentstack add skill-neuroanalytics-data-science-harness-raw-to-bids`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [neuroanalytics](https://agentstack.voostack.com/s/neuroanalytics)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [neuroanalytics](https://github.com/neuroanalytics)
- **Source:** https://github.com/neuroanalytics/data-science-harness/tree/main/plugins/curate/skills/raw-to-bids

## Install

```sh
agentstack add skill-neuroanalytics-data-science-harness-raw-to-bids
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Skill: raw-to-bids

Get raw imaging data into a standardized, **self-contained BIDS** layout so everything downstream
(annotate, process, analyze) has a canonical structure to work from — and do it **provenanced**:
nipoppy runs the containerized converter (dcm2bids / HeuDiConv / BIDScoin → Portability/Ephemerality)
and DataLad wraps it (`datalad run`) so inputs, command, and outputs are recorded. You orchestrate
two doers: the **nipoppy doer** constructs/validates the `bidsify` command; the **datalad doer**
runs it with provenance. You never run tools yourself.

> Design note: like `process/run-pipeline`, the nipoppy command is executed *through* `datalad run`
> — a bare `nipoppy bidsify` is never the final step. The converter container is pinned by nipoppy's
> `config.json` + Boutiques, so datalad's own `container-run` image-capture is not needed here.

## When to use
- A nipoppy dataset (`config.json` + `manifest.tsv`) has raw DICOMs staged (post-reorg) and needs
  BIDS conversion.
- Do NOT use to run a processing pipeline (`process/run-pipeline`), to add descriptive metadata to
  an already-BIDS dataset (`curate/annotate`), or to initialize a project (`project/new-project`).

## Steps
1. **Confirm readiness** — determine the converter (`--pipeline` name/version as configured) and
   any `--participant-id` / `--session-id` scope from the user. Raw data must be staged where
   nipoppy expects it (post-reorg); if it is not, direct the user to nipoppy `reorg` first.
2. **Validate + construct (nipoppy doer)** — delegate:
   > "Validate this nipoppy dataset (config.json, manifest.tsv, Linux+Apptainer, converter version
   > matches a pulled image) and construct the `nipoppy bidsify [--pipeline ... scope ...]` command;
   > run it once with `--simulate` to preview, and return the exact command plus the inputs it reads
   > (sourcedata/post-reorg) and outputs it writes (`bids/`)."
   If it returns `result: failed` (state/platform gap), relay the fix and stop.
3. **Ensure a clean tree (datalad doer)** — `datalad run` requires a clean tree:
   > "status: report modified/untracked files and the current branch."
   If dirty, route to `analyze/checkpoint` first.
4. **Run with provenance (datalad doer)** — delegate:
   > "run: `datalad run -m 'bidsify  on '` with inputs `` and
   > outputs ``, command `''`."
   Wait for the structured result (commit sha, recorded outputs, pass/fail). On failure, relay the
   doer's error + the nipoppy log path; nothing was committed. Stop.
5. **Update curation status (nipoppy doer → datalad doer)** — after success:
   > nipoppy doer: "track-curation to update `tabular/curation_status.tsv` after bidsify."
   > then datalad doer: "save: `datalad save -m 'track-curation: post-bidsify'`."
6. **Log it** — append to `project.yaml`:
   `{ ts, op: raw-to-bids, stage: curate, note: "datalad run nipoppy bidsify  on ; commit ; outputs bids/", branch:  }`.
7. **Report** — the converter/scope, the provenance commit, the `bids/` output, and the next step:
   `curate/annotate` to enrich metadata, or `process/run-pipeline` to process the BIDS data.
   Suggest `govern/qc-review` (bids-validator) to confirm BIDS validity.

## Constraints
- Always execute the converter through the datalad doer's `datalad run` — never let a
  dataset-mutating `nipoppy bidsify` run bare. Provenance is the point.
- Require a meaningful `-m` message naming the converter and scope; never a placeholder.
- Declare inputs/outputs from the nipoppy doer's report — do not invent paths.
- Do not hand-edit `manifest.tsv` or restructure the raw data yourself — nipoppy owns the layout.
- Keep `project.yaml` append-only and schema-valid; delegate every tool operation to a doer.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [neuroanalytics](https://github.com/neuroanalytics)
- **Source:** [neuroanalytics/data-science-harness](https://github.com/neuroanalytics/data-science-harness)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-neuroanalytics-data-science-harness-raw-to-bids
- Seller: https://agentstack.voostack.com/s/neuroanalytics
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
