Guide · Agent skill
How to use the DataLad Data Management agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The DataLad Data Management agent skill is a set of instructions that teaches an AI agent how to work with DataLad, a tool that versions large scientific datasets on top of Git and git-annex. This guide explains what the skill changes in the agent's behaviour, how to install it, how to trigger it, and what it needs. After reading it you will be able to install the skill, ask an agent to fetch and record data safely, and decide when DataLad is worth using.
Quick start
- 1Download the skill ZIP. Download the datalad skill ZIP from this page.
- 2Unzip into a skills folder. Unzip into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Install DataLad and git-annex. Install git-annex, then datalad 1.6.5, and datalad-container 1.2.6 only if you need containers-run.
- 4Verify the environment. Run datalad wtf --section dependencies to confirm the git-annex version is visible.
- 5Ask in plain language. Describe the data or analysis task. The agent loads the skill when your request matches its triggers.
- 6Review commands before running. Check fetch, publish, and drop commands, since they use the network and move real data.
What the datalad skill makes the agent do
Once installed, the agent knows to fetch real file contents before reading data, instead of treating a placeholder link as the file. It also knows to use datalad run and datalad rerun so each output has a machine-readable record of the command that produced it. Finally, it can decide whether DataLad is worth using over plain Git for a given repository.
The skill also covers publishing datasets to sibling repositories and storage remotes, such as a GitHub repository plus a storage remote.
- Fetch annexed file content with datalad get before analysis reads it
- Record commands and their inputs and outputs with datalad run
- Re-execute recorded commands with datalad rerun
- Publish a dataset to a Git sibling and a storage sibling
- Advise whether DataLad or plain Git suits a repository
How to install the datalad skill
Download the ZIP for the datalad skill from this page. Then choose one of two routes. For a personal setup, unzip it into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder. Alternatively, in the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
The skill's own tool requirements still apply. You need Python 3.10+, DataLad 1.6.5, Git, and git-annex 10.x. Containers-run also needs datalad-container 1.2.6 and one of Singularity, Apptainer, or Docker.
- Personal: unzip into ~/.claude/skills/
- Project: unzip into the project's .claude/skills/
- Claude apps: Settings → Capabilities → Skills, then upload
Install DataLad and git-annex
The skill's reference install commands use uv. Install git-annex first if you can, from your system package manager or from PyPI, then install DataLad. Run the check command afterwards, because an old or missing git-annex causes many confusing errors.
The PyPI git-annex package supplies platform-specific binaries, and it does not supply Git itself. Configure your Git author name and email before creating or saving a dataset.
uv pip install git-annex
uv pip install "datalad==1.6.5"
uv pip install "datalad-container==1.2.6" # only for containers-run
datalad wtf --section dependenciesHow to trigger the skill with natural requests
You do not need special syntax. Describe what you want in plain language, and the agent loads the skill when your request matches its trigger situations. These include cloning or fetching data from OpenNeuro, DANDI, datasets.datalad.org, or any DataLad dataset; a file that reads as a broken symlink or a small pointer; an analysis that needs a re-runnable record; publishing to a GitHub repository plus a storage remote; and deciding between DataLad and plain Git.
- Clone this OpenNeuro dataset and load one T1 image for me
- My NIfTI file says 'not a gzip file', check whether it is just an unfetched pointer
- Wrap this brain extraction step so the output can be rerun later
- Should this repository use DataLad or plain Git?
- Publish this dataset to GitHub with the data on a storage remote
Example: fetch data before reading it
A cloned dataset lists its files, but annexed content is usually not downloaded yet. Annexed files appear as symlinks into .git/annex/objects/, so a reader can fail on what looks like a real file. The skill directs the agent to run datalad get on the path first.
The example below is illustrative. Inspect the selected revision for the exact path, and install NiBabel before the Python read.
datalad clone https://github.com/OpenNeuroDatasets/ds000001.git
cd ds000001
datalad get sub-01/anat/sub-01_T1w.nii.gzExample: record a reproducible run
datalad run executes a command and saves it in the same commit as its outputs, together with a machine-readable record. The example below is illustrative and requires bet and an existing derivatives/ directory. Declaring --input fetches the content before the command runs, and declaring --output unlocks the target so a second run does not fail on a read-only annexed file.
If the dataset has unsaved changes, datalad run refuses to start. Save or discard them first, or use --explicit to save only declared outputs. Check a command with --dry-run basic or --dry-run command before committing to it.
- Do not hand-edit the JSON run record in the commit message, because rerun parses it
- Save all input changes before claiming a run is reproducible
datalad run -m "extract brain and mask" \
--input "sub-01/anat/sub-01_T1w.nii.gz" \
--output "derivatives/sub-01_brain.nii.gz" \
--output "derivatives/sub-01_brain_mask.nii.gz" \
"bet {inputs[0]} {outputs[0]} -m"Safety notes: scripts and network access
This skill runs scripts and uses the network. Fetching and publishing move real data over the network, and remote data may require provider credentials. Local filesystem workflows work offline. Before fetching or publishing sensitive or protected data, check the access rules of that dataset.
The skill also lists Read, Write, Edit, and Bash among its allowed tools, so review what the agent runs, especially commands that save, drop, or publish data.
- Runs scripts: yes
- Uses network: yes
- Check access rules before handling sensitive or protected data
- Review publish and drop commands before the agent runs them
Tips for getting good results
Ask the agent to run datalad status --annex availability before diagnosing a file as corrupt. Many apparent corruption errors are unfetched pointers. Use datalad get on a directory rather than fetching files one by one.
Remember that git-annex whereis reads recorded state and does not contact remotes, so it shows what was last known rather than what is true now. Keep code-only repositories on plain Git.
- Confirm pointers with datalad status --annex availability first
- Fetch directories with datalad get sub-01/
- Use datalad wtf --section dependencies when behaviour looks impossible
What people use it for
- Clone a public OpenNeuro dataset and fetch only the files an analysis needs.
- Diagnose a file that fails to load because it is an unfetched annex pointer.
- Record a brain-extraction step with datalad run so the output can be re-executed later.
- Publish a dataset to a GitHub repository with its content on a storage remote.
- Decide whether a code-and-text project should stay on plain Git.
Frequently asked questions
Is the datalad agent skill free?
The skill is published under the MIT licence. DataLad is also MIT licensed, while git-annex has a separate AGPL licence that you should check when redistributing it.
What do I need to install before using the datalad skill?
You need Python 3.10+, DataLad 1.6.5, Git, and git-annex 10.x. Containers-run additionally needs datalad-container 1.2.6 and Singularity, Apptainer, or Docker. Remote data access needs network access and may need provider credentials.
Why does my NIfTI file say it is not a gzip file after cloning?
The file may be an unfetched annex pointer rather than real data. Run datalad get on the file, then try reading it again. Check with datalad status --annex availability before diagnosing corruption.
Where do I put the skill folder for Claude?
Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.
When should I use plain Git instead of DataLad?
Use plain Git when the repository is code and text only, everything fits comfortably in Git, and nobody needs partial checkouts. The skill notes that DataLad on a small pure-code repository adds indirection without benefit.
Does datalad run capture the software version automatically?
No. The source says datalad run records the command and tracked inputs and outputs, but capturing software versions needs a versioned environment specification or a tracked container, because an executable name alone does not identify its build.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
The datalad skill suits researchers working with public datasets from OpenNeuro, DANDI, or datasets.datalad.org, and lab members who need re-runnable analysis records. It is not a good fit for code-only repositories, for users who cannot install git-annex or Git, or for sensitive data handled without checking access rules first.
Download the skill