robot-python-projects
Skill525 starsChanged 2 months agoApache-2.0View on GitHub
Guidelines for robot Python projects — api/, robot-server/, hardware/, auth-server/, shared-data/, server-utils/, system-server/, update-server/, usb-bridge/. Use when working with Python files in these directories or their pyproject.toml files.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Shared Make includes: all Makefiles include ../scripts/python-uv.mk which provides common targets
- Distinctive: line 34
Prefer running tests scoped to the project where your changes are:
- Very specific: line 95
After changing dependencies, commit both pyproject.toml and uv.lock.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Robot Python Projects
The following directories contain the robot Python projects — packages that run on or support Opentrons robots:
| Project | Directory | Description |
opentrons | api/ | Core Opentrons Python API for protocol execution |
robot-server | robot-server/ | HTTP API server that runs on the robot |
opentrons-hardware | hardware/ | Low-level hardware control and CAN bus communication |
auth-server | auth-server/ | Authentication server for Flex |
opentrons-shared-data | shared-data/ | Shared data definitions (labware, pipettes, modules) |
server-utils | server-utils/ | Common utilities for Python servers |
system-server | system-server/ | System-level server for robot management |
otupdate | update-server/ | Server for software and firmware updates |
ot3usb | usb-bridge/ | USB bridge daemon for Flex |
Common Patterns
- Build system:
pyproject.tomlwith hatchling (hatchling==1.27.0) - Dependency management: uv with
uv.lockfiles (not pipenv or poetry) - Python version: 3.12 (set via
UV_PYTHON = 3.12inscripts/python-uv.mk) - Testing: pytest 9+ with config in
[tool.pytest]section ofpyproject.toml - Linting: ruff (replaces flake8 + isort) with config in
[tool.ruff]sections ofpyproject.toml - Type checking: mypy with config in
[tool.mypy]section ofpyproject.toml(notmypy.ini) - Shared Make includes: all Makefiles include
../scripts/python-uv.mkwhich provides common targets
Running Tests
Prefer running tests scoped to the project where your changes are:
# From the project directory
cd api && make test
# Or from the monorepo root
make -C api testEach project has a Makefile with a test target. The exception is shared-data, which uses test-py:
make -C shared-data test-pyChecking Types and Linting
Each project has a Makefile with a lint target (runs ruff check + mypy). shared-data uses lint-py:
make -C api lint
make -C shared-data lint-pyFormatting
Each project has a Makefile with a format target (runs ruff format + isort fix). shared-data uses format-py:
make -C api format
make -C shared-data format-pySetup and Teardown
Each project has setup and teardown targets. Setup runs uv sync --frozen --group dev --python 3.12. shared-data uses setup-py and teardown-py:
make -C api setup
make -C shared-data setup-pyOr from the monorepo root for all robot Python projects at once:
make setup-py # setup all
make teardown-py # teardown allDependency Management
cd api # or any robot Python project
uv add <package> # add production dependency
uv add --group dev <package> # add dev dependency
uv remove <package> # remove dependency
uv lock # re-resolve after manual pyproject.toml editsAfter changing dependencies, commit both pyproject.toml and uv.lock.
In this repository18 other files it gives its agents.
- .cursor/rules/ai-server-api-docs-curation.mdcCursor rule
- .cursor/rules/monorepo-setup.mdcCursor rule
- ai-clientSkill
- ai-serverSkill
- analyses-snapshot-testingSkill
- css-modulesSkill
- docsSkill
- documented-mutationsSkill
- e2e-testingSkill
- grill-frontend-codeSkill
- js-package-testingSkill
- locize-syncSkill
- opentrons-typescriptSkill
- protocol-authoringSkill
- protocol-designerSkill
- protocol-verificationSkill
- react-component-creationSkill
- static-deploySkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

