Source profileQuality 83/100

K-Dense-AI/scientific-agent-skills/skills/zarr-python/SKILL.md

zarr-python

Chunked N-D arrays for cloud storage (Zarr-Python 3). Compressed arrays, parallel I/O, S3/GCS via fsspec, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.

Source repository stars
31,966
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Chunked N-D arrays for cloud storage (Zarr-Python 3). Compressed arrays, parallel I/O, S3/GCS via fsspec, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill "skills/zarr-python"
    Safe inspection promptEditorial

    Inspect the Agent Skill "zarr-python" from https://github.com/K-Dense-AI/scientific-agent-skills/blob/e7ac42510774624f327003c95b6650e2883bc01d/skills/zarr-python/SKILL.md at commit e7ac42510774624f327003c95b6650e2883bc01d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Quick Start

      Requires Python 3.12+ and NumPy 2.0+ for current stable Zarr-Python. For remote stores (S3, GCS, HTTP), pin the optional extras/backends in your project lockfile:

      Requires Python 3.12+ and NumPy 2.0+ for current stable Zarr-Python. For remote stores (S3, GCS, HTTP), pin the optional extras/backends in your project lockfile:Use a version range such as zarr=3,<4 only when your project has a committed lockfile and compatibility tests. For Zarr-Python 2 / Python 3.10–3.11 workflows, choose an exact zarr==2.x.y patch version from the support-v…python import zarr import numpy as np
    2. 02

      Installation

      Requires Python 3.12+ and NumPy 2.0+ for current stable Zarr-Python. For remote stores (S3, GCS, HTTP), pin the optional extras/backends in your project lockfile:

      Requires Python 3.12+ and NumPy 2.0+ for current stable Zarr-Python. For remote stores (S3, GCS, HTTP), pin the optional extras/backends in your project lockfile:Use a version range such as zarr=3,<4 only when your project has a committed lockfile and compatibility tests. For Zarr-Python 2 / Python 3.10–3.11 workflows, choose an exact zarr==2.x.y patch version from the support-v…
    3. 03

      Basic Array Creation

      python import zarr import numpy as np

      python import zarr import numpy as np
    4. 04

      Create a 2D array with chunking and compression

      z = zarr.createarray( store="data/myarray.zarr", shape=(10000, 10000), chunks=(1000, 1000), dtype="f4" )

      z = zarr.createarray( store="data/myarray.zarr", shape=(10000, 10000), chunks=(1000, 1000), dtype="f4" )
    5. 05

      Write data using NumPy-style indexing

      z[:, :] = np.random.random((10000, 10000))

      z[:, :] = np.random.random((10000, 10000))

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score83/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars31,966SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    K-Dense-AI/scientific-agent-skills
    Skill path
    skills/zarr-python/SKILL.md
    Commit
    e7ac42510774624f327003c95b6650e2883bc01d
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    Zarr Python

    Overview

    Zarr is a Python library for storing large N-dimensional arrays with chunking and compression. Apply this skill for efficient parallel I/O, cloud-native workflows, and seamless integration with NumPy, Dask, and Xarray.

    Current upstream: zarr 3.2.1 (released 2026-05-05). Docs: zarr.readthedocs.io. New arrays default to Zarr format 3; set zarr_format=2 for legacy interop. Zarr 3.2 adds rectilinear chunks and continues to refine the v3 codec pipeline. This skill is a community guide maintained by K-Dense Inc., not an official zarr-developers package.

    Quick Start

    Installation

    uv pip install "zarr==3.2.1"
    

    Requires Python 3.12+ and NumPy 2.0+ for current stable Zarr-Python. For remote stores (S3, GCS, HTTP), pin the optional extras/backends in your project lockfile:

    uv pip install "zarr[remote]==3.2.1" "s3fs==2026.4.0" "gcsfs==2026.5.0"
    

    Use a version range such as zarr>=3,<4 only when your project has a committed lockfile and compatibility tests. For Zarr-Python 2 / Python 3.10–3.11 workflows, choose an exact zarr==2.x.y patch version from the support-v2 release notes and commit the resulting lockfile.

    Basic Array Creation

    import zarr
    import numpy as np
    
    # Create a 2D array with chunking and compression
    z = zarr.create_array(
        store="data/my_array.zarr",
        shape=(10000, 10000),
        chunks=(1000, 1000),
        dtype="f4"
    )
    
    # Write data using NumPy-style indexing
    z[:, :] = np.random.random((10000, 10000))
    
    # Read data
    data = z[0:100, 0:100]  # Returns NumPy array
    

    Core Operations

    Creating Arrays

    Zarr provides multiple convenience functions for array creation:

    # Create empty array
    z = zarr.zeros(shape=(10000, 10000), chunks=(1000, 1000), dtype='f4',
                   store='data.zarr')
    
    # Create filled arrays
    z = zarr.ones((5000, 5000), chunks=(500, 500))
    z = zarr.full((1000, 1000), fill_value=42, chunks=(100, 100))
    
    # Create from existing data
    data = np.arange(10000).reshape(100, 100)
    z = zarr.array(data, chunks=(10, 10), store='data.zarr')
    
    # Create like another array
    z2 = zarr.zeros_like(z)  # Matches shape, chunks, dtype of z
    

    Opening Existing Arrays

    # Open array (read/write mode by default)
    z = zarr.open_array('data.zarr', mode='r+')
    
    # Read-only mode
    z = zarr.open_array('data.zarr', mode='r')
    
    # The open() function auto-detects arrays vs groups
    z = zarr.open('data.zarr')  # Returns Array or Group
    

    Reading and Writing Data

    Zarr arrays support NumPy-like indexing:

    # Write entire array
    z[:] = 42
    
    # Write slices
    z[0, :] = np.arange(100)
    z[10:20, 50:60] = np.random.random((10, 10))
    
    # Read data (returns NumPy array)
    data = z[0:100, 0:100]
    row = z[5, :]
    
    # Advanced indexing
    z.vindex[[0, 5, 10], [2, 8, 15]]  # Coordinate indexing
    z.oindex[0:10, [5, 10, 15]]       # Orthogonal indexing
    z.blocks[0, 0]                     # Block/chunk indexing
    

    Resizing and Appending

    # Resize array (v3: pass shape as a tuple)
    z.resize((15000, 15000))
    
    # Append data along an axis
    z.append(np.random.random((1000, 10000)), axis=0)  # Adds rows
    

    Groups and Hierarchies

    Groups organize multiple arrays hierarchically, similar to directories or HDF5 groups.

    Creating and Using Groups

    # Create root group
    root = zarr.group(store='data/hierarchy.zarr')
    
    # Create sub-groups
    temperature = root.create_group('temperature')
    precipitation = root.create_group('precipitation')
    
    # Create arrays within groups
    temp_array = temperature.create_array(
        name='t2m',
        shape=(365, 720, 1440),
        chunks=(1, 720, 1440),
        dtype='f4'
    )
    
    precip_array = precipitation.create_array(
        name='prcp',
        shape=(365, 720, 1440),
        chunks=(1, 720, 1440),
        dtype='f4'
    )
    
    # Access using paths
    array = root['temperature/t2m']
    
    # Visualize hierarchy
    print(root.tree())
    # Output:
    # /
    #  ├── temperature
    #  │   └── t2m (365, 720, 1440) f4
    #  └── precipitation
    #      └── prcp (365, 720, 1440) f4
    

    Group API (v3)

    Use create_array / require_array (h5py-style create_dataset / require_dataset were removed in v3):

    root = zarr.group('data.zarr')
    arr = root.create_array('my_data', shape=(1000, 1000), chunks=(100, 100), dtype='f4')
    
    grp = root.require_group('subgroup')
    arr2 = grp.require_array('array', shape=(500, 500), chunks=(50, 50), dtype='i4')
    

    Attributes and Metadata

    Attach custom metadata to arrays and groups using attributes:

    # Add attributes to array
    z = zarr.zeros((1000, 1000), chunks=(100, 100))
    z.attrs['description'] = 'Temperature data in Kelvin'
    z.attrs['units'] = 'K'
    z.attrs['created'] = '2024-01-15'
    z.attrs['processing_version'] = 2.1
    
    # Attributes are stored as JSON
    print(z.attrs['units'])  # Output: K
    
    # Add attributes to groups
    root = zarr.group('data.zarr')
    root.attrs['project'] = 'Climate Analysis'
    root.attrs['institution'] = 'Research Institute'
    
    # Attributes persist with the array/group
    z2 = zarr.open('data.zarr')
    print(z2.attrs['description'])
    

    Important: Attributes must be JSON-serializable (strings, numbers, lists, dicts, booleans, null).

    Chunking, Compression, Storage, and Performance

    Additional Resources

    Bundled references

    FileContents
    references/api_reference.mdFunction signatures, stores, codecs, indexing
    references/v3_migration.mdZarr-Python 2→3 breaking changes and WIP features

    Official upstream

    Related libraries: Xarray, Dask, NumCodecs

    Alternatives

    Compare before choosing

    Computed 9831,966

    K-Dense-AI/scientific-agent-skills

    dask

    Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.

    Computed 9831,966

    K-Dense-AI/scientific-agent-skills

    medchem

    Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.

    Computed 9831,966

    K-Dense-AI/scientific-agent-skills

    neurokit2

    Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.

    Computed 9637,126

    github/awesome-copilot

    flowstudio-power-automate-mcp

    Foundation skill for Power Automate via FlowStudio MCP — auth setup, the reusable MCP helper (Python + Node.js), tool discovery via `list_skills` / `tool_search`, and oversized-response handling. Load this skill first when connecting an agent to Power Automate. For specialized workflows, load `flowstudio-power-automate-build`, `flowstudio-power-automate-debug`, `flowstudio-power-automate-monitoring` (Pro+), or `flowstudio-power-automate-governance` (Pro+) — each contains the workflow narrative,