# Datalad Fsck

> >

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

## Install

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

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

## About

# 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.

2. **Determine scope** — ask the user:
   - **Fast check** (`--fast`): verifies file sizes and presence only. Quick, recommended
     for routine checks or large datasets. Does **not** verify checksums.
   - **Full check** (no flag): verifies checksums against stored hashes. Thorough but can
     take a very long time on large datasets. Only recommend if corruption is suspected or
     a transfer completed unexpectedly.
   - **Path-scoped check**: optionally limit to a specific file or directory by passing
     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.

3. **Construct and show command** — display before executing:
   ```bash
   git annex fsck [--fast] []
   ```
   Ask: **"Ready to run?"**

4. **Execute and interpret output** — run the command and summarize results:
   - **OK**: file is present and (for full check) checksum matches — no action needed
   - **corrupt**: checksum mismatch — file content is damaged
   - **missing**: file is not present locally

   Report counts of OK / corrupt / missing files.

5. **Suggest recovery based on findings**:
   - **Missing content**: run `datalad get ` to re-fetch from a known remote
   - **Corrupt content**: drop the corrupt copy with `datalad drop --nocheck `,
     then re-fetch with `datalad get `
   - **Unrecoverable** (no remote has the content): inform the user the content is lost
     and cannot be recovered automatically — escalate to manual investigation

## Constraints

- Always show the full `git annex fsck` command before executing.
- Always warn that a full fsck (without `--fast`) can take a very long time on large
  datasets before starting.
- Never attempt to auto-repair corrupt files without confirming recovery steps with the
  user first.
- Load `${CLAUDE_PLUGIN_ROOT}/../references/troubleshooting.md` when the user needs
  guidance on recovering from corrupt or missing content beyond simple `datalad get`.

## 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-fsck
- 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%.
