← ClaudeAtlas

riglisted

Minimal agent cli harness for defining harnesses in prompts as rig markdown fences.
githubnext/rig · ★ 12 · AI & Automation · score 73
Install: claude install-skill githubnext/rig
# rig Minimal TypeScript harness for typed agents in sandboxed workflows and runnable `rig` markdown fences. Use this file for construction defaults. Load only the focused reference named by the task; do not read every reference preemptively. ## Canonical program ```ts import { agent, p, s } from "rig"; // Agent role: review the current diff and return prioritized findings. const reviewDiff = agent({ model: "small", instructions: p`Review ${p.bash("git diff -- .")} and return only the declared output.`, output: s.object({ summary: s.string, risk: s.enum("low", "medium", "high"), findings: s.array(s.object({ file: s.path, line: s.optional(s.int), message: s.string, })), }), }); export default reviewDiff; ``` ## Construction rules 1. Import current APIs from `"rig"` once and define agents with `agent({ ... })` or workflows with `workflow({ ... })`. 2. Add a `// Agent role: ...` comment above each `agent()` and a `// Workflow role: ...` comment above each `workflow()`. 3. Omit `input`/`output` when free-form strings suffice; otherwise use explicit `s.*` schemas. 4. Put known workspace context in ``p`...` `` with `p.read`, `p.bash`, or another intent. Use `input` only for caller-supplied values. 5. Keep outputs strict and small; prefer `s.enum`, `s.literal`, `s.path`, and `s.int` when they express the contract. 6. Add narrow, named subagents only when delegation helps; attach them as `agents: { name }`. 7. Export exactly one root