# Datalad Diff

> >

- **Type:** Skill
- **Install:** `agentstack add skill-neuroanalytics-data-science-harness-datalad-diff`
- **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/datalad-cli/skills/datalad-diff

## Install

```sh
agentstack add skill-neuroanalytics-data-science-harness-datalad-diff
```

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

## About

# Skill: datalad-diff

Compare file-level state between two points in a DataLad dataset's history. `datalad diff`
reports which files changed and their annex state transitions — it does not show line-level
content diffs.

## Steps

1. **Verify DataLad context** — check for `.datalad/` in the current directory or any
   parent:
   ```bash
   ls .datalad/ 2>/dev/null || git rev-parse --show-toplevel
   ```
   - **Dataset found**: continue.
   - **No dataset found**: inform the user; suggest plain `git diff` for non-DataLad repos.

2. **Determine the comparison scope** — read `$ARGUMENTS` and conversation context to
   identify what the user wants to compare. Map to one of these forms:

   | User intent | Command form |
   |-------------|-------------|
   | Working tree vs last commit | `datalad diff` (no args) |
   | Working tree vs specific commit | `datalad diff --from ` |
   | Two specific commits | `datalad diff --from  --to ` |
   | Named revision (branch, tag) | `datalad diff --from ` |

   If the scope is ambiguous, ask the user:
   > "Are you comparing the current working tree to HEAD, or two specific commits?
   > If comparing commits, please provide the commit hashes or branch names."

3. **Construct and run the diff command**:
   ```bash
   datalad diff [--from ] [--to ] [paths...]
   ```
   Show the command before running it. Present the full output to the user.

4. **Interpret the output** — explain the change types shown:

   | Type | Meaning |
   |------|---------|
   | `added` | File did not exist in the earlier revision; exists in the later one |
   | `deleted` | File existed in the earlier revision; removed in the later one |
   | `modified` | File content changed between revisions |
   | `untracked` | File is present locally but outside the compared revision range |

   For annexed files, note that `datalad diff` reports pointer-level changes (key
   changed), not byte-level diffs.

5. **Clarify line-level diffs if asked** — `datalad diff` is file-level only. If the
   user needs to see line-by-line content changes, point them to:
   ```bash
   git diff   -- 
   ```
   This works for git-tracked files; annexed file content must be retrieved first with
   `datalad get ` before `git diff` can show it.

## Constraints

- Read-only — never stage, commit, or modify any file.
- Always show the constructed command before running it.
- Always explain that `datalad diff` is file-level, not line-level, and direct the user
  to `git diff` when they need line-level comparisons.
- If the user provides only one hash/ref, treat it as `--from` (compare that ref to the
  current working tree) and confirm this interpretation before running.
- Do not use `git diff` as a substitute — `datalad diff` correctly handles annexed file
  pointers and subdataset boundaries.

## 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-datalad-diff
- 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%.
