Datalad log

From nipreps/skills-comm · View interactive version

Datalad log is an AI agent skill from the GitHub repository nipreps/skills-comm. Auto-invoke when the user wants to browse dataset history, find what command produced a specific output, inspect recorded run provenance, or audit past analyses. Trigger on "show run history", "what command produced this", "browse dataset history", "find the run that made this file", "show provenanc

How to use this skill

Skill file

Skill: datalad-log

Browse the recorded history of a DataLad dataset: list run commits, inspect what a

specific run recorded, and trace which command produced a given output file.

Steps

Browsing run history

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

```bash

ls .datalad/ 2>/dev/null

```

If not in a dataset, stop and inform the user.

  1. List recorded runs — show the run history with:

```bash

datalad log --oneline

```

Or to show only datalad run commits (excludes saves, checkpoints, manual commits):

```bash

git log --oneline --grep="datalad run"

```

Present the output as a numbered list showing commit SHA and message.

  1. Inspect a specific run — when the user wants detail on a particular commit:

```bash

datalad rerun --report <sha>

```

This shows the run record (command, inputs, outputs, message) without re-executing.

Report:

Tracing output provenance

When the user asks "what command produced <file>":

  1. Find commits that touched the file:

```bash

git log --oneline -- <path>

```

  1. Check each commit for a run record:

```bash

datalad rerun --report <sha>

```

If the commit is a datalad run commit, this shows the full run metadata.

If it is a plain save or checkpoint, report that instead.

  1. Report the full provenance chain — if the file was produced by a run, show:

Identifying checkpoint commits

The auto-checkpoint hook creates commits with messages like:

[datalad] checkpoint 2026-03-12T14:05:22Z: code/analysis.py outputs/result.csv

These are not run records — they are auto-saves. They will appear in git log and

datalad log output. To show only datalad run commits (excludes checkpoints and saves):

git log --oneline --grep="\[datalad run\]"

Note: using --invert-grep with multiple --grep flags uses OR logic and will not

correctly exclude checkpoints — use the single --grep="\[datalad run\]" form instead.

Constraints

datalad rerun --report for inspection, not datalad rerun alone.

commits or checkpoint commits in your report.

git log --oneline --grep="datalad run" and explain the fallback.

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.