Python API v2 for Opentrons OT-2/Flex liquid handlers: protocols as Python files with metadata and run(); control pipettes, labware, and modules (thermocycler, heater-shaker, magnetic, temperature). Simulate via opentrons_simulate then upload. Use PyLabRobot for vendor-agnostic scripts (Hamilton, Tecan).
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/23/2026
What it changes
Passed 24 of 24 test cases with the skill, and 20 of 24 without it.
Without skill83%
With skill100%
Checks it passed that the model alone missed
Uses 'p1000_single_flex' as the instrument model load string.
Calls close_labware_latch() before starting heating or shaking.
Uses 'thermocyclerModuleV2' as the thermocycler module model string.
and 2 more in the full report
4 fixed20 passed either way0 still failing0 broke
Pass-rate lift
+17 pp
Tokens
+493%
Agent turns
0%
Response time
-4%
Model gemini-3.6-flashMeasured 8/23/2026v124 of 24 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 4
Prompt
Provide an Opentrons API v2 Python script that loads a Heater-Shaker module on slot 1, secures the labware latch, sets the temperature to 37°C, and shakes at 500 RPM. Format the response as a Python protocol file.
What was checked, without and with the skill
Checked
Without skill
With skill
Uses 'heaterShakerModuleV1' as the module model load string.
Passed
Passed
Calls close_labware_latch() before starting heating or shaking.
Missed
Passed
case-08 · gemini-3.6-flash · 8/23/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md644 linessingle file
Opentrons Python Protocol API
Overview
The Opentrons Protocol API v2 lets you write liquid handling protocols as plain Python files that run on OT-2 or Flex robots. Every protocol defines a metadata dictionary, an optional requirements dictionary, and a run(protocol) function. The ProtocolContext object passed to run() exposes all deck setup, pipette operations, module control, and utility methods. Protocols can be simulated on any computer with opentrons_simulate before uploading to the robot through the Opentrons App or HTTP API.
When to Use
Setting up PCR reactions: Distribute master mix from a tube rack into a thermocycler plate, add template DNA from individual tubes, then execute a PCR profile automatically.
Running serial dilutions: Programmatically step a multi-channel pipette across a 96-well plate to create 2-fold or custom dilution curves with defined diluent volumes.
Performing ELISA plate layouts: Add blocking buffer, primary antibody, secondary antibody, and substrate to defined wells with tip changes between each reagent.
Automating magnetic bead cleanups: Engage/disengage the magnetic module, aspirate supernatant, wash with ethanol, and elute — in a fully automated loop.
Plate reformatting and stamping: Transfer an entire 96-well plate to a destination plate with one command; reformat from tubes to plates.
Integrating hardware modules: Coordinate temperature control, shaking, and liquid handling steps in a single protocol with precise timing.
Use PyLabRobot instead when writing protocols that must run on Hamilton STAR, Tecan Freedom EVO, or other vendors without Opentrons-specific hardware; for Opentrons-only workflows the native Protocol API provides tighter integration and module support.
For retrieving and parsing published protocols before automation, use protocolsio-integration to search protocols.io alongside this skill.