← ClaudeAtlas

openbridge-buildlisted

Library reference for authoring new pool-based skills on top of openbridge. Use this when you're writing a producer that publishes work items into a named pool via `Bridge.ask()`. The pool can be served by any number of Claude-session workers in parallel; each ask() is an independent work item with its own scratch file, claimed atomically by one worker via Redis BRPOP. Not for operators driving an existing pool — for that, load `openbridge` instead.
michealkeines/OpenBridge · ★ 1 · AI & Automation · score 72
Install: claude install-skill michealkeines/OpenBridge
# openbridge-build — author a new pool producer This is the library reference for authors. If you're driving an existing pool as a worker, load the **openbridge** skill, not this one. ## What you write A normal `async def main():` that calls `await bridge.ask(...)` to publish work into a pool. Each ask() is one work item, served by one worker. Concurrent ask()s fan out across workers in parallel. ```python import asyncio # Install OpenBridge first: `pip install -e .` from the OpenBridge repo root from openbridge import Bridge bridge = Bridge(name="my-producer", pool="my-pool") # name = this producer's unique ID (for `openbridge list`, history) # pool = the work-distribution group workers consume from async def process(item): result = await bridge.ask( item_id=item["id"], prompt=render_prompt(item), template={"summary": "", "scope": ""}, validate=lambda d: "summary required" if not d.get("summary") else None, ) if result.skipped: ... else: apply(item, result.data) async def main(): items = discover_items() progress = bridge.checkpoint("progress", default={"done": []}) pending = [i for i in items if i["id"] not in progress["done"]] # Fan out across the worker pool — N items processed in parallel sem = asyncio.Semaphore(5) async def gated(item): async with sem: await process(item) progress["done"].append(item["id"]) bridge.save("progress", p