MCP HubMCP Hub
SKILL·30ED54

datalad

K-Dense-AI
업데이트됨 Today
3 조회
48,722
4,378
48,722
GitHub에서 보기
기타aidata

정보

이 스킬은 과학적 데이터셋을 DataLad와 git-annex를 사용해 버전 관리, 검색 및 공개합니다. 재현 가능한 분석을 위해 계산적 프로비넌스를 기록하며, DataLad와 일반 Git 중 어떤 것을 사용할지 결정하는 데 도움을 줍니다. OpenNeuro와 같은 저장소에서 데이터셋을 복제하거나, 연결된 파일 포인터를 처리하거나, 스토리지 형제 저장소를 통해 데이터셋을 공개하는 데 활용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add K-Dense-AI/claude-scientific-skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/K-Dense-AI/claude-scientific-skills
Git 클론대체
git clone https://github.com/K-Dense-AI/claude-scientific-skills.git ~/.claude/skills/datalad

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

DataLad

Overview

DataLad is a data management layer over Git and git-annex. Git tracks the dataset structure, small text files, and the history. git-annex tracks the content of large files, storing each file as a key and keeping the bytes somewhere that is not necessarily the local repository.

A normal clone retrieves Git history and the top-level file listing while leaving annexed bytes unfetched. Installed subdatasets have their own histories; a clone does not automatically populate them. Clone cost depends on Git history and file count, not just the data volume. Retrieve annexed bytes selectively with datalad get.

The second thing DataLad adds is provenance. datalad run executes a command and commits the result together with a machine-readable record of the command, its inputs, and its outputs. datalad rerun reads that record back and re-executes it. This turns "how was this figure produced" from an archaeology problem into a command.

When to use DataLad instead of plain Git

Use DataLad when any of the following holds:

  • Files are too large for Git to handle comfortably, or the total exceeds what every collaborator wants on disk.
  • Data lives in more than one place (a lab server, a cluster scratch, S3, a supercomputer) and you need to know which copies exist.
  • The analysis must be re-executable, and a plain commit message is not enough evidence.
  • You are consuming published datasets from OpenNeuro, DANDI, or datasets.datalad.org, which are distributed as DataLad datasets.
  • The project nests other datasets inside it and you want each one to keep its own independent history.

Use plain Git when the repository is code and text only, everything fits comfortably in Git, and nobody needs partial checkouts. DataLad on top of a small pure-code repository adds indirection without buying anything.

Installation

# git-annex is NOT written in Python but is available from PyPI if you already
# have git itself installed:
uv pip install git-annex
# You can also install it first from the system
# (Debian/Ubuntu: apt install git-annex; macOS: brew install git-annex;
#  conda-forge: conda install -c conda-forge git-annex)
uv pip install "datalad==1.6.5"
uv pip install "datalad-container==1.2.6"   # only for containers-run

datalad wtf --section dependencies   # confirm git-annex version is visible

The PyPI git-annex package supplies platform-specific binaries. The reviewed 10.20260901.post1 wheels cover Linux glibc 2.34+ (x86_64/ARM64), macOS ARM64 14+ and x86_64 15+, and Windows x86_64. Use a system package when no wheel matches. Keep its environment on PATH and verify the executable; the wheel does not supply Git itself. Configure Git author name/email before creating or saving a dataset.

datalad wtf prints the resolved environment and is the first thing to run when behaviour looks impossible. An old or missing git-annex is behind a large share of confusing errors.

DataLad is MIT licensed; git-annex has a separate AGPL license. Consult the upstream license when redistributing either tool.

The failure that bites first: pointers are not data

After datalad clone, annexed files exist as symlinks into .git/annex/objects/ (or as small pointer files where symlinks are unavailable, such as on Windows or a crippled filesystem). Nothing has downloaded the content yet.

Illustrative remote-data example; inspect the selected revision for the exact path and install NiBabel before the Python read. The refresh tested equivalent local pointer/get behavior without downloading imaging data.

datalad clone https://github.com/OpenNeuroDatasets/ds000001.git
cd ds000001
ls sub-01/anat/            # the file is listed
python -c "import nibabel; nibabel.load('sub-01/anat/sub-01_T1w.nii.gz')"   # fails
datalad get sub-01/anat/sub-01_T1w.nii.gz                                   # now it works

The failure mode to recognise: a tool reports the file as empty, truncated, corrupt, "not a gzip file", or a broken symlink, and the file size on disk is a few hundred bytes. These symptoms can indicate an unfetched annex pointer; confirm with annex status before diagnosing corruption. Run datalad get before reading data, and treat "file exists" as insufficient evidence that its content is present.

Before an analysis touches a directory, fetch it explicitly:

datalad get sub-01/                  # everything under a path
datalad get -r .                     # everything, including subdatasets
datalad get -n -r .                  # subdataset structure only, no file content

datalad status --annex availability checks which content is present locally, and git annex whereis <path> reports which repositories hold a given file. whereis reads recorded state and does not contact the remotes, so it tells you what git-annex last learned rather than what is true right now.

See data-access.md for finding datasets, subdataset behaviour, dropping content safely, and repairing a dataset.

Recording provenance with datalad run

datalad run is the reason to reach for DataLad in a methods context. It saves the command alongside its effect, in the same commit:

Illustrative FSL example (requires bet and an existing derivatives/ directory):

datalad run -m "extract brain and mask" \
  --input "sub-01/anat/sub-01_T1w.nii.gz" \
  --output "derivatives/sub-01_brain.nii.gz" \
  --output "derivatives/sub-01_brain_mask.nii.gz" \
  "bet {inputs[0]} {outputs[0]} -m"

What each part does, and why skipping it hurts:

  • --input retrieves the content before running, so the command does not fail on a pointer. It also records the dependency, which is what lets rerun fetch the same inputs on a different machine.
  • --output unlocks or removes the target first, so git-annex does not refuse to write over content it is protecting. Without it, a second run of the same command commonly fails with a permission error on an annexed file that looks read-only.
  • {inputs} and {outputs} expand to those values. {pwd}, {dspath}, and {tmpdir} are also available, and {inputs[0]} indexes individual entries.
  • The commit message carries a JSON run record between === Do not change lines below === and ^^^ Do not change lines above ^^^. Do not hand-edit that block; rerun parses it.

datalad run refuses to start when the dataset has unsaved modifications, because an unclean starting state makes the record unreliable. Save or discard first, or pass --explicit to save only declared outputs. This does not capture unsaved input changes; save all dependencies before claiming the run is reproducible. Check a command before committing to it with --dry-run basic or --dry-run command.

A run that changes nothing produces no commit, exactly as datalad save does.

run records the command and dataset state; it does not freeze arbitrary host-installed software or external services. Version an environment lockfile and scripts as declared inputs, or use a tracked container image with containers-run. Record random seeds and relevant runtime settings, then test rerun from a fresh environment before claiming computational reproducibility.

Re-executing

datalad rerun                       # redo the run recorded at HEAD
datalad rerun --report              # show what would be done, change nothing
datalad rerun --script recompute.sh # extract the commands instead of running them
datalad rerun --since <commit> -b check <revision>   # replay a range onto a new branch

--report only inspects the plan; it does not execute or validate the result. A branch (-b) preserves the original commits, but uses the same worktree. See the reference for a --since/--onto replay that starts before the first run, and compare annex keys or content checksums as well as scientific outputs.

Containers

With the datalad-container extension, register an image once and every subsequent run records which image produced the outputs:

Illustrative container workflow using a previously built local SIF image (not executed in this refresh; the runtime and image must be available):

datalad containers-add fsl --url /path/to/fsl.sif \
  --call-fmt 'apptainer exec {img} {cmd}'
datalad containers-run -n fsl -m "brain and mask in container" \
  --input "sub-01/anat/sub-01_T1w.nii.gz" \
  --output "derivatives/sub-01_brain.nii.gz" \
  --output "derivatives/sub-01_brain_mask.nii.gz" \
  "bet {inputs[0]} {outputs[0]} -m"

The image itself is tracked in the dataset, so the software environment travels with the data and the provenance record rather than living in someone's shell history. When only one container is configured, -n may be omitted.

See provenance.md for the STAMPED principles and the YODA project layout, the run record format, --explicit and --assume-ready semantics, and exporting provenance toward W3C PROV.

Saving and inspecting changes

datalad status                 # what changed, including subdataset state
datalad save -m "add QC report" path/to/file
datalad save -m "checkpoint" -r                 # recurse into subdatasets
datalad save -m "small text file" --to-git notes.md

datalad save decides per file whether content goes to Git or to git-annex, following the dataset's .gitattributes. Force a file into Git with --to-git, which is the right call for code and small text files that should stay directly readable. The yoda procedure (datalad create -c yoda) sets this up for code/, README.md, and CHANGELOG.md automatically.

Creating a dataset

datalad create my_dataset               # plain dataset
datalad create -c yoda my_analysis      # analysis layout (code/ tracked in Git,
                                        # README.md and CHANGELOG.md preconfigured)
datalad create -d . inputs/raw          # register a new subdataset under an existing one

-c yoda applies the analysis project layout described in provenance.md. -d . is what registers a new dataset as a subdataset of the parent rather than leaving an unrelated repository inside it.

Publishing

A DataLad dataset is usually published to two places at once: a Git hosting service for the history, and a storage remote for the annexed content.

Illustrative authenticated publication (creates remote resources; requires a GitHub token and S3 credentials). Use myorg/mydataset only for an organization namespace.

datalad create-sibling-github mydataset
git annex initremote store type=S3 bucket=my-bucket protocol=https \
  encryption=none autoenable=true
datalad siblings configure -s github --publish-depends store
datalad push --to github

The Git sibling and the storage sibling are created by different tools on purpose. A Git sibling is a Git remote, and datalad create-sibling-* handles the hosting-service ones. An S3 bucket (or WebDAV, or an SSH directory) is a git-annex special remote, not a Git remote, so it is created with git annex initremote. datalad siblings picks the special remote up afterwards and treats it like any other. Using datalad siblings add --url s3://... here is the mistake this section exists to prevent: --url is a Git remote URL, S3 is not, and the push --to github below then fails on the --publish-depends hop.

--publish-depends is what stops the common broken publication: a Git repository whose history references content that was never uploaded, so collaborators clone successfully and then find every datalad get failing. Declaring the dependency makes the storage sibling publish first, every time.

datalad push sends both the Git history and, by default (--data auto-if-wanted), the annexed content selected by a target's wanted settings; without wanted settings it transfers all selected current content. --data anything bypasses preferred-content filtering, but does not recover missing local bytes or archive every historical version.

See publishing.md for RIA stores, special remotes, credential handling, and configuring which sibling holds what.

Freeing disk space

git annex whereis sub-01/                 # inspect recorded locations first
datalad drop sub-01/                      # remove local content, keep the pointer

datalad drop checks required copies and availability by default. --nocheck is deprecated in favor of --reckless availability, which disables those protections. --if-dirty is deprecated and ignored; it is not an availability-check option. --what selects between filecontent (the default), allkeys, datasets, and all.

Failure modes worth knowing

SymptomCauseFix
File reads as empty, truncated, or a broken symlinkContent not retrieved; only the pointer is presentdatalad get <path>
"Permission denied" writing an existing outputgit-annex write-protects annexed contentDeclare it with --output, or datalad unlock <path>
datalad run refuses to startDataset has unsaved changesdatalad save first, or pass --explicit
datalad drop refusesNo verified second copy of the contentPush to a reachable sibling, then retry the safety check
Collaborator clones but every get failsHistory published without the contentPublish the storage sibling, and set --publish-depends
Clone succeeds, subdataset directories are emptySubdatasets are not installed by defaultdatalad get -n -r ., then get the paths you need
Commands behave impossiblygit-annex missing or too olddatalad wtf --section dependencies

Detailed references

  • data-access.md: finding published datasets (registry.datalad.org, OpenNeuro, DANDI, datasets.datalad.org and the /// shortcut), clone and get options, subdataset handling, annex content states, dropping and removing, and fsck repair.
  • provenance.md: the STAMPED principles and the YODA layout, the run record format, run and rerun options in full, containers-run, and the current state of exporting DataLad provenance toward W3C PROV.
  • publishing.md: siblings and their actions, create-sibling-* variants, RIA stores, special remotes, push semantics, and credential handling.

Related skills

The bids skill covers the Brain Imaging Data Structure that most of the neuroimaging datasets distributed through DataLad are organised in. A typical workflow clones a BIDS dataset with DataLad, validates it with the BIDS tooling, then runs a BIDS-App under datalad containers-run so the derivatives carry provenance.

Validation scope

Reviewed 2026-09-30 against DataLad 1.6.5 and datalad-container 1.2.6 source and current official manuals. Tiny local tests cover clone/get/drop, unlocked saves, subdataset installation, run/rerun, default push selection, and RIA publish/clone/get. Remote hosting, credentials, FSL, and container execution examples are illustrative; no authenticated remote publication or scientific-data downloads were performed.

Primary sources

Acknowledgment

Topic scope for this skill was informed in part by @bcmcpher's MIT-licensed datalad-cli plugin (nineteen per-command slash-command skills). The text here is written independently and grounded in the upstream DataLad documentation; overlap is unavoidable because both cover DataLad, but the structure, style, and specific technical claims are different.

GitHub 저장소

K-Dense-AI/claude-scientific-skills
경로: skills/datalad
0
agent-skillsai-scientistbioinformaticschemoinformaticsclaudeclaude-skills
FAQ

자주 묻는 질문

datalad Skill이란 무엇인가요?

datalad은(는) K-Dense-AI이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 datalad 관련 작업을 수행할 수 있게 합니다.

datalad은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. datalad을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

datalad은(는) 어떤 카테고리에 속하나요?

datalad은(는) 기타 카테고리에 속합니다.

datalad은(는) 무료로 사용할 수 있나요?

네. datalad은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

sports-betting-analyzer
기타

이 Claude Skill은 스프레드, 오버/언더, 프로프 베트를 포함한 스포츠 베팅 시장을 분석합니다. 역사적 추이와 상황별 통계를 검토하여 가치 베트를 발견하고, 교육적 목적으로 실행 가능한 권장 사항이 담긴 구조화된 마크다운 결과를 제공합니다. 개발자는 이 기능을 스포츠 베팅 분석 도구에 활용할 수 있으며, 단순히 엔터테인먼트/교육 목적으로만 설계되었음을 유의해야 합니다.

스킬 보기
llamaguard
기타

LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.

스킬 보기
cost-optimization
기타

이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.

스킬 보기
quantizing-models-bitsandbytes
기타

이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.

스킬 보기