Datalad update

From nipreps/skills-comm · View interactive version

Datalad update is an AI agent skill from the GitHub repository nipreps/skills-comm. Auto-invoke when the user wants to fetch changes from a sibling, sync a dataset from a remote, pull the latest version of a dataset, or update from a collaborator's push. Trigger on "pull updates", "sync from remote", "get latest version", "update from sibling", "someone pushed new data", "fetch ups

How to use this skill

Skill file

Skill: datalad-update

Fetch changes from a sibling and optionally integrate them into the current branch.

Handles recursive updates across nested subdataset trees.

Steps

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

parent:

```bash

ls .datalad/ 2>/dev/null

```

If no dataset is found, inform the user and stop.

  1. Identify source sibling — read from $ARGUMENTS. If not specified, list available

siblings and ask:

```bash

datalad siblings

```

  1. Determine merge strategy — ask or infer from context. Present the options:

but does not touch the working tree. Safe to run anytime; inspect with git log.

commit if histories have diverged.

diverged — use when you want to be sure no unexpected merge occurs.

Never silently choose a strategy — always make the choice explicit.

  1. Determine recursion — ask if the update should recurse into subdatasets:

> "Update subdatasets recursively too? (-r)"

  1. For recursive updates with merging — ask about the --follow policy:

> "When updating subdatasets, should they be pinned to the version recorded in the

> superdataset (--follow=parentds, recommended for reproducibility), or advanced

> to the sibling's HEAD (--follow=sibling)?"

Explain the difference:

preserves the superdataset's pinned, reproducible state

intentionally want to upgrade all subdatasets and will re-save the superdataset

  1. Construct and show command:

```

datalad update -s <sibling> --how=<strategy> [--follow=parentds] [-r]

```

Show the full command before executing.

  1. Execute and report — run the command. After completion:

before merging

Reference

Load ${CLAUDE_PLUGIN_ROOT}/../references/siblings-and-remotes.md for --follow

semantics and ${CLAUDE_PLUGIN_ROOT}/../references/subdataset-patterns.md for recursive

update behavior and subdataset pinning.

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

--on-failure for recursive updates, wants structured output, or needs to debug a

failed update (-l debug).

Constraints

create unwanted merge commits.

subdataset pinning may be surprised that subdatasets do not advance to the latest HEAD.

and --follow policy.

git merge --allow-unrelated-histories may be needed as a fallback for first-time

merges after non-linear setup.

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.