Skip to content

Guide · Agent skill

How to use the AnnData agent skill: install and prompts

Updated · written with AI from the project's own documentation and checked against our catalogue data

The anndata skill gives an AI coding agent working knowledge of AnnData, a Python format for storing a table of measurements, such as gene activity per cell, together with labels for its rows and columns. It is aimed at single-cell researchers, pipeline developers and students who need correct AnnData code. After this guide you will know what the skill covers, how to install it, how to phrase requests so it triggers, and what to check before trusting its output.

AnnData Single-Cell Data FormatK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download the skill ZIP. Get the anndata skill ZIP from the skill's page on this directory.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project.
  3. 3Or upload it in the Claude apps. Open Settings, go to Capabilities, and upload the skill under Skills.
  4. 4Install anndata 0.13.4. Install Python 3.12 or newer, then run uv pip install "anndata==0.13.4" in your environment.
  5. 5Ask for an AnnData task. Describe the file type, object and operation, such as reading an h5ad file and subsetting it.
  6. 6Check the code. Review the generated code for the 0.13 API rules and run it on a copy of your data first.

What the anndata skill makes the agent do

An agent skill is a folder of instructions and reference files that an agent loads when a task matches its description. This one covers the AnnData data structure: the matrix X, the observation table obs, the variable table var, and the extra annotation slots such as layers, obsm, varm, obsp, varp, uns and raw.

Once installed, the agent can build AnnData objects, read and write .h5ad, Zarr and other common formats, filter and subset objects, and concatenate several datasets using the ad.concat rules for the 0.13 API. The skill is a data-format helper. Analysis workflows such as clustering or cell-type annotation are pointed to other skills, mainly scanpy.

Install the anndata skill

Option 1: download the ZIP from the skill's page, then unzip it into your personal skills folder ~/.claude/skills/ or into a project's .claude/skills/ folder so it is available only to that project.

Option 2: in the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.

Requirements: Python 3.12 or newer and anndata 0.13.4, which the skill's instructions install with uv. The skill's install commands are shown below, copied from its SKILL.md.

  • Required: Python 3.12+ and anndata 0.13.4
  • Optional extras: dask/lazy extras for lazy I/O, openpyxl for Excel, loompy for legacy Loom, fsspec adapters for remote stores
uv pip install "anndata==0.13.4" # Lazy I/O and dask-backed operations uv pip install "anndata[dask,lazy]==0.13.4"

Trigger the skill with natural requests

You do not need to name the skill. The agent loads it when your request involves AnnData objects, h5ad or Zarr files, subsetting or concatenating annotated matrices, or scverse integration. Say what data you have and what you want to end up with.

Requests that trigger it well name the file type, the object, and the operation, for example: 'Read data.h5ad in backed mode, keep only cells where obs cell_type is T cell, and write the result to subset.h5ad.' Mention if you need a lazy or on-disk approach, since the skill covers backed mode and on-disk concatenation.

  • Write an AnnData object from a NumPy matrix with obs and var tables
  • Convert a CSV file to AnnData and save it as h5ad
  • Concatenate three h5ad files along observations and label each batch
  • Subset an AnnData object to rows matching a metadata condition

Example: create, filter and save an AnnData object

The skill's basic pattern is to build the object with labelled obs and var tables, subset it by a metadata condition, and write it out. The example below is adapted from the skill's quick start. The data is random and the labels are placeholders, so it demonstrates the API rather than real biology.

import anndata as ad import numpy as np import pandas as pd X = np.random.rand(100, 2000) obs = pd.DataFrame({'cell_type': ['T cell', 'B cell'] * 50}, index=[f'cell_{i}' for i in range(100)]) var = pd.DataFrame(index=[f'ENSG{i:05d}' for i in range(2000)]) adata = ad.AnnData(X=X, obs=obs, var=var) t_cells = adata[adata.obs['cell_type'] == 'T cell'] t_cells.write_h5ad('output.h5ad')

Know the 0.13 API changes

The skill is written against AnnData 0.13.4 and flags several changes that older code gets wrong. Use ad.concat, because AnnData.concatenate() was removed in 0.13. Use anndata.io for non-native readers such as read_csv, read_loom and read_mtx. The top-level read_h5ad and read_zarr remain supported.

The skill also tells the agent to avoid the old ad.read function and the anndata.__version__ attribute. In 0.13, .X is also layers[None], so use key is not None when selecting named layers. Check these points when you review agent-written code.

  • Use ad.concat instead of AnnData.concatenate()
  • Use anndata.io for read_csv, read_loom, read_mtx
  • Avoid ad.read and anndata.__version__
  • AnnLoader and Loom reading/writing are deprecated

Safety notes: scripts and network access

The skill runs scripts (its examples execute Python code) and uses the network. Network access is needed only for installation and for remote data. The skill's own notes say the examples are illustrative: file paths, biological analysis and remote-store examples are not validated on real datasets.

Review generated code before running it on important files, and never point it at sensitive or clinical data without checking the output yourself. Keep backups of original files, because some operations write to disk.

  • Requires network only for install and remote data
  • Runs Python code, so read it before running on critical data
  • Examples use synthetic checks; validate biological results yourself

What people use it for

  • Build an AnnData object from a count matrix with cell and gene labels
  • Convert a CSV or MTX export into an h5ad file for downstream tools
  • Concatenate several sample files into one object and record each batch in a label column
  • Subset large h5ad files in backed mode without loading everything into memory
  • Write Zarr output for a pipeline that reads Zarr stores

Frequently asked questions

How do I install the anndata agent skill?

Download the ZIP from the skill's page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. Alternatively, in the Claude apps open Settings, go to Capabilities, and upload it under Skills.

What are the requirements for the anndata skill?

The skill requires Python 3.12 or newer and anndata 0.13.4, installed with uv. Optional extras include dask/lazy support, openpyxl for Excel, loompy for legacy Loom and fsspec adapters for remote stores.

Is the anndata skill free?

The skill is licensed under MIT, as listed on this page. Check the licence file in the download for the terms that apply to you.

Should I use anndata or scanpy for single-cell analysis?

Use anndata for the data format: building, reading, writing and subsetting objects. The skill points analysis workflows such as clustering and cell-type annotation to scanpy, and probabilistic models to scvi-tools.

Why does the agent use ad.concat instead of concatenate?

AnnData.concatenate() was removed in version 0.13. The skill tells the agent to use ad.concat, which takes the same kinds of arguments such as axis, join and label.

Can the skill handle very large files?

The skill covers backed mode for h5ad files, lazy I/O with the optional dask extras and on-disk concatenation. Remote data needs network access and the matching fsspec adapter.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Choose this skill if you are a single-cell researcher, a pipeline developer or a student who needs correct AnnData code for h5ad or Zarr files. Pick scanpy for full analysis workflows such as clustering or cell-type annotation, and check all output yourself before using it on sensitive or clinical data.

Download the skill