# Datalad Init

> >

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

## Install

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

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

## About

# Skill: datalad-init

Create a new DataLad dataset following YODA principles for reproducible, provenance-tracked
local analysis projects. The `-c yoda` configuration is always applied — it sets up the
correct directory layout and `.gitattributes` rules.

## Steps

1. **Determine target path** — read `$ARGUMENTS`. If a path is given, use it. If empty,
   use the current working directory. Show the resolved absolute path and ask the user to
   confirm before proceeding.

2. **Pre-flight checks** — before running any command:
   - Check for an existing `.datalad/` directory at the target path. If found, stop:
     > "A DataLad dataset already exists at ``. Re-initializing would overwrite
     > dataset configuration. Run `datalad status` to check its state."
   - Check whether `.git/annex/` already exists at the target path:
     ```bash
     git annex config annex.backend 2>/dev/null
     ```
     If it returns `MD5E`, warn:
     > "The existing annex uses the legacy MD5E backend. Migrating backends after the
     > fact is complex. Consider initializing a fresh dataset at a new path and
     > re-ingesting data."
     Stop unless the user explicitly asks to continue anyway.
   - Check whether the target path is inside a plain git repository (not a datalad dataset):
     run `git rev-parse --git-dir` from the target path. If a `.git/` is found but no
     `.datalad/`, warn:
     > "Target path is inside a plain git repository. Creating a DataLad dataset here
     > will nest it inside an untracked git repo, which can cause unexpected behavior.
     > Consider initializing at the git repo root, or outside the git tree. Proceed anyway?"
     Wait for user confirmation before continuing.

3. **Create the dataset** — run:
   ```
   datalad create -c yoda 
   ```
   Show the command before executing. Report the full output. Optionally suggest adding
   `--annex-backend SHA256E` (recommended; avoids the legacy MD5E backend which causes
   compatibility issues with some special remotes):
   ```
   datalad create -c yoda --annex-backend SHA256E 
   ```

4. **Report the YODA structure** — after creation, display what was created:
   ```
   /
   ├── code/          ← version-controlled scripts and notebooks (annexed: never)
   ├── outputs/       ← results produced by datalad run (annexed: everything)
   ├── inputs/        ← input data, ideally linked as subdatasets (annexed: everything)
   └── README.md      ← dataset description
   ```
   Explain each directory's role briefly (see `${CLAUDE_PLUGIN_ROOT}/../references/yoda-layout.md`
   for full detail).

5. **Explain YODA principles** — briefly state the three principles:
   - **P1 — Everything is a dataset**: input data should be linked as subdatasets, not copied
   - **P2 — Record data origins**: use `datalad download-url` or `datalad clone` with provenance
   - **P3 — Never modify a dataset you didn't create**: work only in `outputs/` and `code/`

6. **Suggest next steps** — close with:
   - Put scripts and analysis code in `code/`
   - Link input data as a subdataset: `datalad clone  inputs/`
   - Use `datalad run` to execute scripts so commands and outputs are recorded
   - Use `datalad save -m "..."` to record code changes

## Constraints

- Never run `datalad create` without explicit path confirmation from the user.
- Never re-initialize an existing DataLad dataset — always stop and explain.
- Always use `-c yoda` — never create a bare dataset without the YODA configuration.
- Always warn when the target path is inside a plain git repo, and require explicit
  confirmation before proceeding.
- Load `${CLAUDE_PLUGIN_ROOT}/../references/yoda-layout.md` if the user asks for more detail
  about YODA conventions, `.gitattributes` behavior, or subdataset patterns.

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