Datalad fsck

From nipreps/skills-comm · View interactive version

Datalad fsck is an AI agent skill from the GitHub repository nipreps/skills-comm. Auto-invoke when the user wants to check annex integrity, verify dataset content, check for missing or corrupt files, or recover from suspected data corruption. Trigger on "check annex integrity", "verify dataset content", "annex fsck", "are my files corrupt", "check for missing content", "fsck", "d

How to use this skill

Skill file

Skill: datalad-fsck

Check the integrity of annexed file content in a DataLad dataset using git annex fsck.

Identifies missing, corrupt, or unreachable content and guides recovery.

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. Determine scope — ask the user:

for routine checks or large datasets. Does not verify checksums.

take a very long time on large datasets. Only recommend if corruption is suspected or

a transfer completed unexpectedly.

the path as an argument.

Warn the user: a full fsck on a large dataset can take a very long time. Recommend

--fast first unless there is specific reason to suspect checksum-level corruption.

  1. Construct and show command — display before executing:

```bash

git annex fsck [--fast] [<path>]

```

Ask: "Ready to run?"

  1. Execute and interpret output — run the command and summarize results:

Report counts of OK / corrupt / missing files.

  1. Suggest recovery based on findings:

then re-fetch with datalad get <path>

and cannot be recovered automatically — escalate to manual investigation

Constraints

datasets before starting.

user first.

guidance on recovering from corrupt or missing content beyond simple datalad get.

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.