← ClaudeAtlas

write-good-workflowslisted

Use when authoring or improving a Boardwalk workflow program to make it correct, cheap, and legible, not just working. Covers the shape of a workflow (the run function plus the workflow.jsonc descriptor, growing into a package), typed input and output (native types drive the run form and the output contract), the SDK primitives (agent, phase, sleep, workflows.call, parallel), making a run legible with phases and console.log, writing efficient workflows (match the model per agent() call, scope tools and output, prompt caching, parallelism, don't pay to wait, budget and reuse guardrails), and surviving crashes and restarts. For iterating loops see write-good-loops; for giving an agent() skills/tools/MCP/memory see equip-agents; for running and deploying see boardwalk-use-cli.
boardwalk-labs/plugins · ★ 1 · AI & Automation · score 70
Install: claude install-skill boardwalk-labs/plugins
# Write a good workflow A workflow that runs is not yet a good one. A good workflow is **cheap** (the model is almost always the biggest line on the bill), **legible** (a run is a permanent record you debug from), and **safe across a restart**. This skill is the craft of authoring the program. For what Boardwalk is, see `boardwalk-overview`; for running and shipping it, see `boardwalk-use-cli`. ## The shape A workflow is a package of two files: a `run` function (the work) and `workflow.jsonc` (the deployment descriptor). The platform calls `run(input, context)` with the trigger's payload; whatever you return is the run's output. Deterministic code (fetch, parse, hold secrets) interleaves freely with model calls (`agent()`). `src/index.ts`: ```ts import { agent, phase, secrets } from "@boardwalk-labs/workflow"; export default async function run(): Promise<string> { phase("Fetch issues"); const token = await secrets.get("GITHUB_TOKEN"); const issues = await fetch("https://api.github.com/issues", { headers: { Authorization: `Bearer ${token}` }, }).then((r) => r.json()); phase("Summarize"); return await agent(`Write a morning digest of these issues:\n${JSON.stringify(issues)}`); } ``` `workflow.jsonc`: ```jsonc { "$schema": "https://boardwalk.sh/schemas/workflow.json", "slug": "morning-digest", "triggers": [{ "kind": "cron", "expr": "0 9 * * 1-5" }], "permissions": { "secrets": [{ "name": "GITHUB_TOKEN" }] }, } ``` Python is the same shape: a mod