datalad
Skill này làm gì
DataLad là công cụ giúp quản lý các tập dữ liệu khoa học lớn. Nó cho phép bạn tải xuống, sắp xếp và chia sẻ dữ liệu một cách hiệu quả, đồng thời đảm bảo bạn biết các bản sao nằm ở đâu và cách tái tạo phân tích.
Khi nào nên dùng
- ✓Khi bạn cần tải dữ liệu từ các nền tảng như OpenNeuro hoặc DANDI.
- ✓Khi một tệp hiện ra như liên kết bị hỏng hoặc một tệp văn bản nhỏ thay vì dữ liệu thật.
- ✓Khi bạn cần đảm bảo một phân tích có thể được lặp lại chính xác trong tương lai.
Liên kết skill
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/datalad/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để tải toàn bộ dữ liệu cho dự án của tôi?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
DataLad dùng Git để theo dõi cấu trúc tệp và git-annex để quản lý nội dung tệp lớn. Nó lưu thông tin về các lệnh đã chạy và dữ liệu đã dùng, giúp bạn hoặc người khác tái tạo kết quả.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
…
Câu hỏi thường gặp
Tại sao các tệp của tôi trông giống liên kết bị hỏng?
Điều này xảy ra vì DataLad mặc định chỉ tải cấu trúc tệp. Bạn cần dùng lệnh “datalad get” để tải nội dung thật của những tệp bạn muốn dùng.
Làm sao để đảm bảo phân tích của tôi có thể tái tạo?
Dùng lệnh “datalad run” để chạy các lệnh của bạn. Lệnh này tự động ghi lại tệp nào được dùng làm đầu vào và tệp nào được tạo ra làm đầu ra, giúp bạn hoặc người khác tái tạo phân tích sau này.
Git và DataLad khác nhau thế nào?
Git rất tốt cho mã nguồn và tệp văn bản nhỏ. DataLad được xây dựng trên Git và git-annex để quản lý tệp lớn và đảm bảo khả năng tái tạo phân tích khoa học.
Chi tiết
Mô tả gốc của tác giả
Retrieves, versions, and publishes scientific datasets with DataLad and git-annex, and captures computational provenance with datalad run, rerun, and containers-run. Use when cloning or fetching data from OpenNeuro, DANDI, datasets.datalad.org, or any DataLad dataset; when a file in a dataset reads as a broken symlink or a small pointer instead of real data; when an analysis needs a machine-readab
Độ phổ biến
- Sao GitHub
- 51k
- Vị trí xếp hạng
- #3446
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
13c-metabolic-flux
51kƯớc tính thông lượng chuyển hóa bằng dữ liệu theo dõi đồng vị carbon-13. Hữu ích để phân tích chuyển hóa tế bào và các con đường sinh hóa.
adaptyv
51kThiết kế thí nghiệm đặc trưng protein bằng Adaptyv API. Hỗ trợ ước tính chi phí, gửi trình tự và theo dõi kết quả phòng thí nghiệm.
aeon
51kThực hiện các tác vụ học máy trên dữ liệu chuỗi thời gian. Hữu ích để phân loại, dự báo, phát hiện bất thường và tìm mẫu trong dữ liệu tuần tự.
alphagenome
51kTra cứu các tác động di truyền đã được tính trước cho biến thể gen. Cung cấp điểm số và giải thích để hiểu ảnh hưởng của biến thể lên bộ gen.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.