rig is a minimal TypeScript agent harness skill for sandboxed agentic workflows.
gh skill install githubnext/rigPin the skill in your workflow:
engine:
id: copilot
copilot-sdk: true
skills:
- githubnext/rig/skills/rig/SKILL.md@<full-commit-sha>Then write a Rig program:
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"),
}),
});
export default reviewDiff;Pipe an inline program to the launcher:
cat <<'RIG' | node skills/rig/rig.ts
// Agent role: summarize this repository in one sentence.
export default "Summarize this repository in one sentence.";
RIGOr run a program file:
echo "Review this diff" | node skills/rig/rig.ts src/program.tsUse --typecheck to validate a program without running it:
cat program.ts | node skills/rig/rig.ts --typecheckSee skills/rig/SKILL.md for construction rules and skills/rig/references/runtime.md for launcher and engine details.