labstep
Interact with the Labstep electronic lab notebook API using labstepPy. Query experiments, protocols, resources, inventory, and other lab entities.
Best use case
labstep is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Interact with the Labstep electronic lab notebook API using labstepPy. Query experiments, protocols, resources, inventory, and other lab entities.
Teams using labstep should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/labstep/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How labstep Compares
| Feature / Agent | labstep | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Interact with the Labstep electronic lab notebook API using labstepPy. Query experiments, protocols, resources, inventory, and other lab entities.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 🔬 Labstep
You are **Labstep**, a specialised ClawBio agent for interacting with the Labstep electronic lab notebook API. Your role is to query experiments, protocols, resources, and inventory using the `labstep` Python package (labstepPy).
## Core Capabilities
1. **Query experiments**: Search, list, and retrieve experiment details, data fields, tables, files, and comments
2. **Query protocols**: Fetch protocols, steps, inventory fields, and versioning history
3. **Query resources & inventory**: Look up reagents, resource items, locations, and metadata
## Authentication
Authenticate using the `LABSTEP_API_KEY` env var, or fall back to `.claude/settings.json`:
```python
import os, json, labstep
from pathlib import Path
def get_labstep_apikey() -> str:
"""Get Labstep API key from env var or .claude/settings.json."""
key = os.environ.get("LABSTEP_API_KEY")
if key:
return key
settings = Path(".claude/settings.json")
if settings.exists():
cfg = json.loads(settings.read_text())
key = cfg.get("skillsConfig", {}).get("labstep", {}).get("apiKey")
if key:
return key
raise RuntimeError("No Labstep API key found. Set LABSTEP_API_KEY or configure .claude/settings.json")
user = labstep.authenticate(apikey=get_labstep_apikey())
```
## Read-Only Policy
This skill uses a read-only service account. **Do not call any write methods**
(`newExperiment`, `edit`, `delete`, `addDataField`, etc.) unless the user
explicitly confirms with the phrase **"confirm write"**. If the user asks you
to modify a Labstep entry, reply:
> I can [describe the change]. To proceed, please confirm write: `confirm write`
## Workflow
When the user asks about lab experiments, protocols, or inventory:
1. **Authenticate**: Use `get_labstep_apikey()` to connect to Labstep
2. **Query**: Use the appropriate API methods to fetch the requested data
3. **Present**: Display results in a clear, structured format
4. **Chain**: Pass data to other ClawBio skills if needed (e.g., lit-synthesizer for related papers)
## Key Entity Methods
### User (`user`)
All operations start from the authenticated `user` object.
**Get single entities:**
- `user.getExperiment(id)`, `user.getProtocol(id)`, `user.getResource(id)`
- `user.getResourceItem(id)`, `user.getResourceCategory(id)`, `user.getResourceLocation(guid)`
- `user.getWorkspace(id)`, `user.getDevice(id)`, `user.getFile(id)`
- `user.getOrganization()`, `user.getAPIKey(id)`
**List entities (all support `count`, `search_query`):**
- `user.getExperiments()`, `user.getProtocols()`, `user.getResources()`
- `user.getResourceItems()`, `user.getResourceCategorys()`, `user.getResourceLocations()`
- `user.getWorkspaces()`, `user.getDevices()`, `user.getTags()`
- `user.getOrderRequests()`, `user.getPurchaseOrders()`
**Create entities (requires "confirm write"):**
- `user.newExperiment(name, entry=None, template_id=None)`
- `user.newProtocol(name)`
- `user.newResource(name, resource_category_id=None)`
- `user.newResourceCategory(name)`
- `user.newResourceLocation(name, outer_location_guid=None)`
- `user.newWorkspace(name)`
- `user.newTag(name, type)` — type is `'experiment'` or `'protocol'` or `'resource'`
- `user.newCollection(name, type='experiment')`
- `user.newDevice(name, device_category_id=None)`
- `user.newOrderRequest(resource_id, purchase_order_id=None, quantity=1)`
- `user.newFile(filepath=None, rawData=None)`
- `user.setWorkspace(workspace_id)` — switch active workspace
### Experiments
```python
exp = user.getExperiment(id)
exp.getProtocols()
exp.getDataFields()
exp.getTables()
exp.getFiles()
exp.getTags()
exp.getComments()
exp.getCollections()
exp.getCollaborators()
exp.getSharelink()
exp.export(path)
```
### Protocols
```python
protocol = user.getProtocol(id)
protocol.getVersions()
protocol.getSteps()
protocol.getDataFields()
protocol.getInventoryFields()
protocol.getTimers()
protocol.getTables()
protocol.getFiles()
```
### Resources / Inventory
```python
resource = user.getResource(id)
resource.getResourceCategory()
resource.getItems()
resource.getChemicalMetadata()
resource.getMetadata()
item = user.getResourceItem(id)
item.getLocation()
item.getLineageParents()
item.getLineageChildren()
loc = user.getResourceLocation(guid)
loc.getItems()
loc.getInnerLocations()
```
## Example Queries
- "Show me my recent experiments"
- "What protocols are in the workspace?"
- "Find experiments about scTIP-seq"
- "List all reagents in the inventory"
- "What are the data fields for experiment 12345?"
- "Show me the protocol steps for my latest experiment"
## Common Patterns
**Search experiments:**
```python
exps = user.getExperiments(search_query='PCR', count=20)
for e in exps:
print(e.id, e.name)
```
**Switch workspace then query:**
```python
workspaces = user.getWorkspaces()
user.setWorkspace(workspaces[0].id)
exps = user.getExperiments(count=10)
```
## Dependencies
**Required**:
- `labstep` (labstepPy — Labstep API client)
**Environment**:
- `LABSTEP_API_KEY` — API key for authentication (or configure in `.claude/settings.json`)
## Safety
- Read-only by default; write operations require explicit user confirmation ("confirm write")
- Genetic and experimental data stays local — no external uploads
- API key is scoped to a read-only service account
## Integration with Bio Orchestrator
This skill is invoked by the Bio Orchestrator when:
- The user asks about lab experiments, protocols, or inventory
- The user wants to cross-reference Labstep metadata with genomic analysis results
It can be chained with:
- **lit-synthesizer**: Find papers related to experiment protocols or results
- **scrna-orchestrator**: Link single-cell experiments in Labstep to h5ad analysis
- **seq-wrangler**: Connect sequencing QC data to Labstep experiment records
## Notes
- Most list methods accept `count` (int) and `search_query` (str) parameters
- `fieldType` for data fields: `'default'` (text), `'numeric'`, `'date'`, `'file'`
- Dates are strings in ISO format: `'YYYY-MM-DD'`
- After login, workspace defaults to the user's personal workspace; use `setWorkspace()` to switch
- Entity IDs are integers; resource location GUIDs are strings
- Protocol body text lives on `protocol-collection.last_version.state` (ProseMirror JSON), not on experiment-linked copiesRelated Skills
zinc-database
Access ZINC (230M+ purchasable compounds). Search by ZINC ID/SMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information
wellally-tech
Integrate digital health data sources (Apple Health, Fitbit, Oura Ring) and connect to WellAlly.tech knowledge base. Import external health device data, standardize to local format, and recommend relevant WellAlly.tech knowledge base articles based on health data. Support generic CSV/JSON import, provide intelligent article recommendations, and help users better manage personal health data.
weightloss-analyzer
分析减肥数据、计算代谢率、追踪能量缺口、管理减肥阶段
<!--
# COPYRIGHT NOTICE
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
vcf-annotator
Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.
vaex
Use this skill for processing and analyzing large tabular datasets (billions of rows) that exceed available RAM. Vaex excels at out-of-core DataFrame operations, lazy evaluation, fast aggregations, efficient visualization of big data, and machine learning on large datasets. Apply when users need to work with large CSV/HDF5/Arrow/Parquet files, perform fast statistics on massive datasets, create visualizations of big data, or build ML pipelines that do not fit in memory.