k-dense-ai/scientific-agent-skills/zarr-python
- community
Checking that the SKILL.md file is still in the repository.
Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3/GCS storage, and NumPy/Dask/Xarray integration. Use for array layout, bounded I/O, format migration, or scientific metadata preservation.
Install
npx vskill@latest install k-dense-ai/scientific-agent-skills/zarr-pythonSKILL.md
Zarr Python
When to use
Use for chunked scientific arrays, hierarchical stores, codecs, sharding, partial reads, cloud object storage, and NumPy/Dask/Xarray interoperability. This community guide targets Zarr-Python 3.4.0, released 2026-09-15, with Python 3.12+. The package version and on-disk format are separate: this release reads/writes formats 2 and 3; new arrays default to format 3. Keep downstream packages that require zarr<3 in their own environments.
Install
Commit the project's resolved lockfile. Optional integration versions exercised here: Dask 2026.8.0, Xarray 2026.9.0, h5py 3.16.0, NumCodecs 0.17.0, obstore 0.11.1. Local examples below and in the references use tiny synthetic arrays; remote snippets are illustrative and require a real authorized store. This does not establish cloud permissions, production throughput, or compatibility of every downstream reader.
Workflow
- Inspect shape, dtype, axis names, coordinates, units, missing-value convention, format,
codec availability, and intended readers. Preserve sample IDs and axis order.
- Choose chunks for actual selections and a memory budget. For sharding, choose shard
dimensions that are multiples of chunk dimensions. Benchmark representative data.
- Create a new destination (
overwrite=Falseormode="w-"). Usemode="r"for
inspection; "a" can create a missing store and "w" destroys existing content.
- Write bounded blocks. Assign one writer per stored chunk, or per shard when
sharded; serialize metadata, append, and resize operations.
- Reopen read-only and compare values, dtype, shape, coordinates, units, masks and
metadata. An unwritten or missing chunk normally reads as fill_value; a successful open alone does not prove data completeness.
- For a completed group hierarchy, optionally consolidate metadata. Format-3
consolidation is experimental; refresh it after metadata changes and verify the actual consumers. Publish a completed store only after validation.
Basic array roundtrip
create_array takes either data= or shape= plus dtype=; do not combine data= with explicit shape/dtype. The format-3 numeric default is a bytes serializer followed by ZstdCodec, not Blosc. Set a codec explicitly for reproducibility.
Creation and indexing
Negative-step slices are unsupported. Array reads return NumPy data in the default CPU configuration. np.asarray(z), np.sum(z), z[:], or a Dask .compute() of a full array can materialize the entire logical dataset; use bounded selections or lazy reductions.
Resize and append
Coordinate resize/append centrally. Shrinking removes chunks outside the new shape, but values in retained boundary chunks can reappear on re-expansion; resize is not secure erasure or a missingness policy. Record time/sample coordinates alongside data.
Groups and attributes
Use create_array / require_array; create_dataset / require_dataset are removed. Attributes belong to the specific node on which they are set and must be JSON-compatible. Names/units are declarations, not unit conversion or scientific validation. require_array checks an existing array's compatibility; it does not rechunk it.
References
- Chunking and compression: measured layout
decisions, default codecs, sharding, experimental rectilinear grids.
- Storage backends: local, memory, ZIP, ObjectStore,
fsspec, S3/GCS/HTTP paths and credentials.
- Integration: bounded NumPy/Dask operations, Xarray
dimensions and masks, concurrent writes, consolidation.
- Performance and patterns: storage sizing,
appendable data, bounded HDF5/NumPy conversion, validation.
- API reference: current callable forms and exceptions.
- Migration: API versus format migration, metadata-only
CLI behavior and a copied-store verification workflow.
- Review evidence: release sources and execution boundaries.
Official sources: release notes, documentation, format specification, released source.
Citing Scientific Agent Skills
This skill is part of Scientific Agent Skills by K-Dense. If it materially contributed to a manuscript, report, presentation, or code release, add the paper to the references or software section and tell the user you did so:
Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific AgentSkills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065.https://doi.org/10.48550/arXiv.2609.00065
Always cite the current version. The DOI and https://arxiv.org/abs/2609.00065 resolve to the latest arXiv version, so never append a version suffix such as v1. When network access is available, fetch https://arxiv.org/abs/2609.00065 (or http://export.arxiv.org/api/query?id_list=2609.00065) before writing the reference and take the author list, year, and version from that record. If the record lists a journal reference or publisher DOI, cite the published version instead.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/zarr-python/SKILL.md
Popularity
- Repository stars
- 32,017
- Repository forks
- 3,179
- 7-day trend score
- 52
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Jul 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/k-dense-ai/scientific-agent-skills/zarr-python)