opentrons
БесплатноБез исполняемых скриптовНе проверенExpert guidance for Opentrons Python API v2 - automated liquid handling, protocol development, labware management, and hardware module integration for OT-2…
Об этом скилле
Opentrons Python API v2
Overview
The Opentrons Python API v2 enables laboratory automation through Python protocols that control liquid handling robots (OT-2 and Flex). Write protocols that automate pipetting, temperature control, magnetic separation, plate reading, and complex multi-step workflows with reproducible precision.
Core value: Transform manual, error-prone pipetting workflows into automated, reproducible protocols. A 100-line protocol can replace hours of manual work with precise, documented liquid handling.
When to Use
Use the Opentrons skill when:
- Writing automated liquid handling protocols
- Setting up serial dilutions, plate replication, or reagent distribution
- Integrating temperature control, magnetic separation, or plate reading into workflows
- Adapting OT-2 protocols for Opentrons Flex
- Troubleshooting protocol execution or hardware integration
- Optimizing pipetting parameters (flow rates, tip positions, mixing)
Specialized subskills available:
heater-shaker- Temperature control with orbital mixingabsorbance-reader- Microplate spectrophotometrygripper- Automated labware movement (Flex only)thermocycler- PCR thermal cyclingtemperature-module- Precise heating/cooling (4-95°C)magnetic-block- Magnetic bead separation (Flex only)
Don't use when:
- Working with non-Opentrons liquid handlers
- Writing general Python code unrelated to lab automation
- You need detailed module-specific guidance (use the specialized subskills)
Robot Platforms
Opentrons Flex
Modern platform with advanced capabilities:
- Gripper for automated labware movement
- 96-channel pipetting
- Coordinate-based deck slots (A1-D3)
- Larger working volume and deck space
- Trash bin requires explicit loading (API 2.16+)
- Staging area slots in column 4
OT-2
Established platform:
- Numeric deck slots (1-12)
- Fixed trash in slot 12
- 1-channel and 8-channel pipettes
- Proven reliability for standard protocols
Both platforms use identical API syntax with platform-specific parameters.
Protocol Structure
Every Opentrons protocol follows this framework:
from opentrons import protocol_api
# 1. Metadata - Protocol identification
metadata = {
'protocolName': 'My Protocol',
'author': 'Name <[email protected]>',
'description': 'Brief description of what this protocol does',
'apiLevel': '2.19'
}
# 2. Requirements - Robot specification (Flex)
requirements = {"robotType": "Flex", "apiLevel": "2.19"}
# 3. Main function - Setup and commands
def run(protocol: protocol_api.ProtocolContext):
# Setup: Load labware, pipettes, modules
tips = protocol.load_labware("opentrons_flex_96_tiprack_1000ul", "A1")
plate = protocol.load_labware("corning_96_wellplate_360ul_flat", "B1")
pipette = protocol.load_instrument("flex_1channel_1000", "left", tip_racks=[tips])
# Commands: Sequential robot instructions
pipette.pick_up_tip()
pipette.aspirate(100, plate["A1"])
pipette.dispense(100, plate["B1"])
pipette.drop_tip()
Key principles:
- Protocols execute completely linearly - follow line-by-line to understand robot actions
- Use descriptive variable names that mirror lab terminology
- Add comments to document workflow steps
- Group related operations logically
Core API Components
1. Loading Equipment
Labware - Plates, tubes, reservoirs:
# Load standard labware from registry
plate = protocol.load_labware("corning_96_wellplate_360ul_flat", "B1")
tips = protocol.load_labware("opentrons_flex_96_tiprack_1000ul", "A1")
# Load custom labware (JSON definition required)
custom = protocol.load_labware("custom_24_tuberack_1500ul", "C1")
Pipettes - Single, 8-channel, or 96-channel:
# Flex pipettes
left_pip = protocol.load_instrument("flex_1channel_1000", "left", tip_racks=[tips])
right_pip = protocol.load_instrument("flex_8channel_1000", "right", tip_racks=[tips])
# OT-2 pipettes
p300 = protocol.load_instrument("p300_single_gen2", "left", tip_racks=[tips])
Modules - Temperature, magnetic, thermocycler:
# Load module in specific deck slot
temp_mod = protocol.load_module("temperature module gen2", "D1")
# Load labware on module
temp_plate = temp_mod.load_labware("opentrons_96_aluminumblock_generic_pcr_strip_200ul")
Trash bin (Flex, API 2.16+):
trash = protocol.load_trash_bin("A3")
2. Accessing Wells
Individual wells:
plate["A1"] # Single well by name
plate.wells()[0] # First well by index
plate.wells_by_name()["A1"] # Dictionary access
Well ranges and groups:
plate.wells()[:8] # First row (A1-H1)
plate.rows()[0] # All wells in row A
plate.columns()[0] # All wells in column 1
plate.wells("A1", "H12") # Range from A1 to H12
8-channel pipetting patterns:
# Pipette to entire column with 8-channel
pipette.transfer(100, reservoir["A1"], pl
Установить opentrons в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
*FAQ
Что делает скилл opentrons?
Expert guidance for Opentrons Python API v2 - automated liquid handling, protocol development, labware management, and hardware module integration for OT-2 and Flex robots
Как установить скилл opentrons?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл opentrons запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic