Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pudap avatar

Bears Machines

  • 65 installs
  • 1 repo stars
  • Updated July 21, 2026
  • pudap/bears-skills

Bears-machines (balance-machine) is an agent skill that drives an Arduino USB mass balance on Linux and publishes calibrated readings to NATS.

About

Bears Machines (balance-machine) is an agent skill for builders wiring a Linux-hosted Arduino mass balance into automated experiments. It documents how raw serial ADC samples become calibrated grams, how the edge service connects to NATS for telemetry, and how to configure serial ports, baud rates, and environment files before starting an unattended edge process. Solo indie lab or hardware-adjacent developers use it when liquid-handling or gravimetric workflows need live weight feedback instead of manual scale reads. Prerequisites center on Python 3.11+, uv, a device on /dev/ttyUSB* or /dev/ttyACM*, and a reachable NATS server. The skill is narrow and integration-focused: it does not replace mechanical calibration science, but it gives agents a concrete path from `.env` through `balance.py` to streaming mass events.

  • Linear calibration from load-cell CSV raw ADC values to grams via balance_driver
  • Edge service (`balance.py`) publishes telemetry to NATS with configurable MACHINE_ID and SERIAL_PORT
  • Background reader thread with `get_mass()` for latest reading; automatic retry on fatal errors (5 s backoff)
  • uv workspace workflow: `uv sync --all-packages` and `uv run --package balance-edge`

Bears Machines by the numbers

  • 65 all-time installs (skills.sh)
  • Ranked #974 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pudap/bears-skills --skill bears-machines

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs65
repo stars1
Security audit3 / 3 scanners passed
Last updatedJuly 21, 2026
Repositorypudap/bears-skills

What it does

Run the Arduino USB balance edge service that publishes calibrated mass telemetry over NATS for gravimetric lab automation.

Who is it for?

Best when you're running pudap bears-style lab automation with NATS and an Arduino balance on a known serial device.

Skip if: Pure software SaaS with no edge hardware, or teams not using NATS and Linux USB serial for measurement.

When should I use this skill?

Arduino-based USB mass balance driver for Linux; gravimetric feedback in liquid handling experiments; NATS telemetry from calibrated mass.

What you get

You configure edge `.env`, run the balance-edge service with uv, and expose continuous mass via NATS and `get_mass()` for downstream automation.

  • Running balance-edge service publishing mass telemetry
  • Calibration CSV–backed gram readings exposed via driver API

By the numbers

  • Automatic fatal-error retry with 5 s backoff
  • Typical serial baud rate 115200 noted in setup table

Files

SKILL.mdMarkdownGitHub ↗

BEARS machines

Goal

Provide machine-selection and capability guidance for PUDA workflows, then load the correct machine reference before generating commands.

Critical Rule

If you are unsure which machine should be used for a command, ask the user before proceeding. Do not assume.

Machine Capabilities and When to Use

First Machine (machine_id: "first")

Use for liquid handling and deck operations.

Capabilities:

  • Pipetting workflows: aspirate, dispense, attach tip, drop tip
  • Deck and labware workflows: load deck, position-dependent operations
  • Sequenced robotic handling steps in wet-lab protocols

Use this machine when:

  • The task is about moving liquids between wells/labware
  • The user mentions tip usage, aspiration/dispensing, or deck slots/labware setup

Before command generation:

  • Refer to: first-machine
  • Run puda machine commands first to understand available commands
  • Follow constraints and sequencing in references/first-machine.md

Biologic Machine (machine_id: "biologic")

Use for electrochemical testing and characterization.

Capabilities:

  • OCV (Open Circuit Voltage)
  • CA (Chronoamperometry)
  • PEIS / GEIS (Impedance spectroscopy)
  • CV (Cyclic Voltammetry)
  • MPP variants (MPP, MPP_Cycles, MPP_Tracking)

Use this machine when:

  • The task is an electrochemical measurement or battery/cell characterization
  • The user asks for OCV, CA, EIS, CV, or MPP tests

Before command generation:

  • Refer to: biologic-machine
  • Run puda machine commands biologic to understand available commands
  • Follow constraints in references/biologic-machine.md

Balance Machine

Use for gravimetric mass measurement via an Arduino-based USB load-cell balance on Linux.

Capabilities:

  • Continuous calibrated mass readings from a load-cell over USB serial (/dev/ttyUSB* or /dev/ttyACM*)
  • Background reader thread streaming readings at ~4 Hz; no polling required
  • Tare command to zero the balance before a dispense step
  • Freshness check (fresh flag) to detect stale/disconnected readings
  • NATS telemetry publishing via the edge service
  • Custom calibration CSV support

Use this machine when:

  • The workflow requires weighing a container before or after a liquid transfer
  • The user asks for gravimetric calibration, transfer error calculation, or balance feedback
  • The task involves viscosity or transfer accuracy experiments needing mass data

Before use:

  • Refer to: balance-machine
  • Ask the user for the Linux serial port (/dev/ttyUSB1, etc.) - do not assume
  • Ensure the edge service is running (uv run --package balance-edge python edge/balance.py)

Opentrons Machine (machine_id: "opentrons")

Use for automated liquid handling and full protocol generation on the Opentrons OT-2 robot.

Capabilities:

  • Full protocol code generation via Protocol.to_python_code() - produces valid runnable OT-2 Python
  • Pipetting workflows: aspirate, dispense, transfer (with auto-chunking for large volumes)
  • Tip management: pick_up_tip, drop_tip
  • Deck and labware setup: load_labware, load_instrument
  • Flow control: flow_rate, air_gap, blow_out, touch_tip, move_to
  • Protocol utilities: delay, comment, home
  • CSV-driven loops: read_csv_file + loop for data-driven protocols
  • Custom labware support: AMDM mass balance vials (30 mL, 50 mL) loaded inline
  • All gen2 pipette types: p10, p20, p300, p1000 (single and multi-channel)
  • External camera image capture: camera_capture - triggers the external camera mounted above the deck to capture and save a still image of the wellplate

Use this machine when:

  • The user references an Opentrons OT-2 robot
  • The task involves generating a complete OT-2 protocol or individual liquid handling commands
  • The user mentions Opentrons labware (tip racks, well plates, reservoirs, NEST, Corning, mass balance vials)
  • The workflow requires data-driven dispensing from a CSV file
  • The workflow requires capturing a camera image of the wellplate after dispensing steps

Before command generation:

  • Refer to: opentrons-machine
  • Run puda machine commands opentrons to understand available commands
  • Follow all command types, params, sequencing rules, and labware constraints in references/opentrons-machine.md

Elephant Machine (machine_id: "elephant")

Use for 6-axis robot arm manipulation, Cartesian/joint motion, electric gripper actions, scan/reset flows, and camera-guided vision steps.

Capabilities:

  • Cartesian pose motion and relative moves
  • Joint-angle and single-axis motion controls
  • Scan positioning and reset-oriented recovery workflows
  • Electric gripper operations: init_gripper, open_gripper, close_gripper
  • Pi-camera and livestream image capture for vision-guided tasks
  • Pixel-to-robot offset conversion for calibrated camera workflows

Use this machine when:

  • The task requires a robot arm to move to coordinates or execute pick-and-place style steps
  • The user asks for Elephant arm motion, scan/reset behavior, or arm recovery after stop/power loss
  • The workflow includes gripper control, Pi-camera capture, or livestream snapshot capture from the Elephant setup

Before command generation:

  • Refer to: elephant-machine
  • Run puda machine commands elephant to understand available commands
  • Follow motion, gripper, camera, and sequencing constraints in references/elephant.md

Selection Workflow

1. Parse user intent and identify the tasks. 2. Match intent to the machine capabilities above. 3. If machine selection is unclear or ambiguous, ask the user and wait for confirmation. 4. Load the corresponding reference file and CLI help. 5. Generate commands only after machine choice is confirmed.

Output Guidance

When answering machine-selection questions:

  • State the recommended machine and a one-line reason tied to capability.
  • If uncertain, ask a direct clarification question instead of guessing.

Critical sequencing rules

  • opentrons protocols must always end with no tip attached to any pipette.
  • opentrons deck slot (location) for every load_labware command must be explicitly confirmed by the user - never assume a slot.
  • opentrons capture_image must be its own standalone protocol - never combined with pipetting commands in the same protocol.
  • balance - always call startup() before reading and shutdown() after. Always tare before a dispense step. Always verify fresh == True before using a reading.
  • elephant - ensure the arm is connected and powered before motion. For electric gripper workflows after a power cycle, call init_gripper() before open_gripper() or close_gripper(). Prefer scan() before camera-guided work.

Related skills

How it compares

Device integration skill for gravimetric edge telemetry—not a general IoT platform or cloud observability package.

FAQ

Who is bears-machines for?

hardware-lab developers integrating an Arduino balance into NATS-backed liquid-handling or measurement workflows on Linux.

When should I use bears-machines?

During Build integrations while bringing up serial calibration, the edge publisher, and NATS subjects before unattended experiment runs.

Is bears-machines safe to install?

It implies serial device access and network publish to NATS; review the Security Audits panel on this page and lock down `.env`, USB paths, and broker credentials on shared lab hosts.

Automation & Workflowsintegrationsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.