Datalad get

From nipreps/skills-comm · View interactive version

Datalad get is an AI agent skill from the GitHub repository nipreps/skills-comm. Auto-invoke when a user cannot open a file because content is missing or shows as a broken symlink, wants to download annexed file content, fetch data from a sibling, or initialize an absent subdataset. Trigger on "get this file", "download content", "fetch data", "retrieve", "I can't open this file

How to use this skill

Skill file

Skill: datalad-get

Retrieve annexed file content or initialize absent subdatasets. datalad get fetches

content from configured siblings (remotes) and makes files accessible locally.

Steps

  1. Verify DataLad context — check for .datalad/ in the current directory or a

parent:

```bash

ls .datalad/ 2>/dev/null || git rev-parse --show-toplevel

```

If no dataset is found, inform the user and stop — datalad get only works inside

a DataLad dataset.

  1. Identify targets — read paths, globs, or subdataset handles from $ARGUMENTS.

If not specified, ask the user what they want to retrieve. For large datasets with many

files, mention --jobs N (e.g., --jobs 4) to retrieve content in parallel.

Determine the nature of each target:

  1. Determine retrieval mode — ask or infer:

useful to inspect structure before committing to a large download

  1. Construct command:

```

datalad get <path>

```

```

datalad get -r <path>

```

```

datalad get -n <subdataset-path>

```

Show the command before executing.

  1. Execute and confirm — run the command. After completion, verify content is

accessible:

```bash

ls -lh <path>

```

Report whether files are now readable (regular files, not broken symlinks).

Reference

Load ${CLAUDE_PLUGIN_ROOT}/../references/subdataset-patterns.md for the absent/present

subdataset model, the -n handle-only pattern, and the neuroimaging nested layout.

Load ${CLAUDE_PLUGIN_ROOT}/../references/global-options.md when the user asks about

--on-failure behavior during recursive gets, wants JSON output, needs to override a

config value, or asks why a get is failing (suggest -l debug).

Constraints

tracked state or creates new commits.

datalad save) — do not confuse the two.

to initialize it, not manual git submodule commands.

to check available remotes and datalad siblings enable -s <name> if a special

remote needs to be activated.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.