Skip to main content
skill CX Codex

agent-operated-workflows — Claude Code skill: purpose and setup

This skill explains how an agent can run a bounded procedure when the real system may differ from the expected path. Use it to plan actions, verify results, and leave evidence for a later resume.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mvschwarz/openrig --skill agent-operated-workflows -a claude-code
Open on GitHub

What agent-operated-workflows does

The skill helps decide whether an agent should own a procedure’s control loop or whether ordinary code is the better fit. Agents make sense when the expected path is clear but the system’s current state is variable or only partly knowable. A parser or fixed data conversion with a closed state space is simpler as regular code.

It assigns distinct responsibilities: a runbook defines policy and stopping conditions, tools perform narrow actions, the agent interprets observations and checks effects, and a human handles destructive ambiguity. The procedure reads state, takes one bounded action, verifies the outcome, then records a checkpoint. An interrupted mutation is indeterminate, so retrying without checking its result is unsafe.

The skill also covers tool design: read and plan modes should be explicit, while changes should be narrow and independently verifiable. Its OpenRig upgrade example pairs a runbook with helper scripts. Follow that runbook for the upgrade procedure; this skill provides the reusable operating contract.

What it helps with

  • choose whether an agent or regular code should control a procedure
  • verify an action against the state that could disprove its success
  • record a checkpoint so another agent can resume the work
  • handle an interrupted mutation without assuming it failed

Example prompts for the agent

  • Decide whether an agent should own this procedure’s control loop or whether ordinary code is enough.
  • Plan the procedure by inspecting state first, taking one bounded action at a time, and checking each effect.
  • The procedure stopped during a mutation. Identify what is verified and which next actions are safe without a blind retry.

How to install agent-operated-workflows

1Skills CLI (Vercel)

npx skills add mvschwarz/openrig --skill agent-operated-workflows -a claude-code

2Manually: put the files in place

~/.claude/skills/agent-operated-workflows/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agent-operated-workflows/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about agent-operated-workflows

How do I install agent-operated-workflows in Claude Code?

Run npx skills add mvschwarz/openrig --skill agent-operated-workflows -a claude-code. The skill file is at ~/.claude/skills/agent-operated-workflows/SKILL.md.

What does agent-operated-workflows do?

It sets out how an agent can manage a bounded procedure by inspecting state, choosing actions, and verifying outcomes. It also explains when regular code is a better owner for the control loop.

How is an Agent-Operated Workflow different from AI-enabled software?

In AI-enabled software, the application controls the loop and calls a model as one capability. In an Agent-Operated Workflow, an agent controls one procedure with defined start and stop conditions.

Source text

SKILL.md · Apache-2.0
---
name: agent-operated-workflows
description: >-
  Use when a bounded real-world procedure has a deterministic happy path but brownfield, variable,
  or partially knowable state; when an operation must resume from verified evidence; or when deciding
  whether agent judgment or ordinary code should own a procedure's control loop.
metadata:
  openrig:
    stage: provisional
    audience: any agent operating or designing a bounded procedure
    sibling_skills:
      - agent-operated-software
      - openrig-user
      - systematic-debugging
---

# Agent-Operated Workflows

An **Agent-Operated Workflow** is a bounded procedure whose control loop belongs to an agent. The
agent observes, interprets, sequences bounded actions, verifies their effects, adapts, and escalates
genuine ambiguity. Deterministic code remains the exact substrate; it does not pretend to understand
every state of a brownfield world.

## Name the architecture before using it

- **AI-enabled software:** application code owns the control loop and calls a model as one capability.
- **Agent-Operated Workflow:** an agent owns one bounded procedure with a start and stop condition.
- **Agent-Operated Software:** an OpenRig agent or rig participates in an ongoing application's live
  backend or control loop. It may run many workflows; see `agent-operated-software`.

Calling a model is not enough. A deterministic program that consults a model still owns its loop.

## Decide whether the agent earns the loop

Use an agent when the happy path is deterministic but the environment is brownfield, variable,
partially knowable, or disproportionately expensive to model exhaustively. The judgment is in
discovering what is true and choosing the next safe act.

Prefer ordinary code when the state space is closed and code is simpler and more reliable than
judgment. A parser, fixed data transformation, or fully enumerated state machine does not become
better because an agent drives it.

## Keep ownership explicit

| Owner | Responsibility |
|---|---|
| Runbook | owns policy, the mental model, checkpoints, stop conditions, and escalation rules |
| Deterministic tools | own context gathering and bounded exact actions |
| Agent | owns interpretation, sequencing, adaptation, and effect verification |
| Human | owns destructive ambiguity and product policy |

The runbook guides judgment; tools enforce the invariants that must not be arguable.

## Operate

1. Establish identity, durable state, the runbook, and the promised outcome.
2. Inspect with side-effect-free reads or an explicit plan mode.
3. Choose one bounded action from observed state; do not mechanically replay the happy path.
4. Verify the effect at the consumer or state surface that could prove it wrong.
5. Record an observable checkpoint before moving on, so another agent can resume.
6. Continue, stop at the declared condition, or escalate with evidence and the decision needed.

An interrupted or timed-out mutation is **indeterminate**, never failed by assumption and never safe
to retry blind. Where a compatibility period is safer, separate reversible preparation from the
destructive finalizer. Idempotence is a claim to prove per action, not a label for the whole run.

## Build

Expose composable verbs, not an optimistic end-to-end controller. Help is inert. Read and plan modes
are explicit. Mutations are narrow and independently readable. A failure should say what was
observed, why the tool stopped, what remains unchanged, the safe next choices, and where its evidence
lives. Keep checkpoints durable, effects observable, and recovery possible without private developer
knowledge.

A capability composition is a reusable recipe; this is the execution architecture that operates
capabilities toward an outcome. Promote a proven workflow to the composition shelf only after use.

**Public example:** load `skills/core/openrig-upgrade/SKILL.md` with
`rig context get` for the upgrade runbook. Its adjacent `scripts/` directory
contains the bounded inspection, backup, plugin-refresh and migration helpers.
Follow that runbook for the procedure; this skill carries the reusable contract.

© mvschwarz · Apache-2.0 · mvschwarz/openrig

Similar skills

SKILL.md skills catalog →

From the same set32

mission-slice-sop Guides agents through a mission or slice, from resolving its context to checking the result and handing work off. Useful for projects that track delivery in OpenRig files. CX Codex +1 ★ 8,227repo stars loading-addressable-markdown Pulls exactly one Markdown section out of a filesystem tree by an address like file.md#h2-slug. Handy when a task points at a spec section instead of a whole file. CX Codex +1 ★ 8,227repo stars delegating-work This skill helps decide whether to handle a task yourself, send it to a subagent, or route it to an agent that already knows the project. It also adapts handoff advice to the agent’s model. CX Codex +1 ★ 8,227repo stars claude-compaction-restore Keeps the connections between files and decisions alive across context compaction: write a restore map before the squeeze, read it back after and rebuild the picture. CX Codex +1 ★ 8,227repo stars agent-operated-software A skill for designing and debugging applications whose live backend or control loop includes OpenRig agents. CX Codex +1 ★ 8,227repo stars dogfood This skill explores a web app, checks its interface and behaviour, and creates a report with evidence for each issue. Use it for exploratory QA of a site or service. CX Codex +1 ★ 8,227repo stars context-engineering A skill about how an agent's context window gets filled, pruned and shared. Useful when an agent drifts or forgets constraints mid-task. CX Codex +1 ★ 8,227repo stars oversight-team This skill guides a monitor that checks other agent rigs for drift and chooses a measured response. It waits for a signal instead of polling continuously. CX Codex +1 ★ 8,227repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor