ask-matt
MAmattpocock/skills336k近 7 天新增 4,217 个 star
Use when a person in their own Claude Code, Codex or OMP (Oh My Pi) session mentions OpenRig, rigs or the rig command, or wants a team of coding agents (Claude Code, Codex) on their project. That includes installing, setting up, starting or updating OpenRig, seeing, getting back to or re-attaching to their OpenRig agents (including bringing a stopped team back), TUI or operator, starting or sharing a team, and joining this session to one. Operating a running rig from inside it (fleet recovery, seat handover, watchdog wakes, in-rig upgrades) is the openrig-skills skill.
OpenRig runs a team of coding agents (Claude Code, Codex and others) side by side in tmux. A local daemon keeps their tasks, messages and state, so the team keeps working across restarts. This skill gets OpenRig installed, gets a team working on what the person wants, and shows how to work with that team from here.
Read this file through now, before you act. It's short: the principles first, then the four steps. Each step names
the file in references/ that holds its cases; open that file when you reach the step. If a read comes back shortened,
read the rest in parts (sed -n '1,150p' SKILL.md, then '151,$p').
If this skill reached you as a file, not through your skill tool, that's expected when you added it to a session
that was already running: Claude Code doesn't list a skills folder created after the session started until the person
types /reload-skills (Claude Code 2.1.152 or later) or starts a new session, and only they can type that. Reading this
file is loading it. Follow it from here, not the install notes that sent you, and don't tell the person OpenRig is set
up until step 2's handover is done. The same goes if /rigs or your skill tool said this skill doesn't exist.
The goal is a team doing the person's work, not just an install. Go through the steps in order and stop early only if the person asks. Give what they want built to OpenRig's operator (step 2) instead of building it yourself.
The journey, in order (each step is below; these are the ones that get skipped):
/reload-plugins, so ask for that next. In Codex, ask the offer in your reply and end your turn: not with a question
tool, and not as the approval of an install command.Hold to these from the first handoff, even if you read nothing else here. Each has one example; the reference it names has the cases.
git commit?". Tell the person the seat, the exact action and the choices,
wait for their answer, and send only that.rig queue create --destination <operator> --return-route auto ... --verify, then step 2's background
wait, started again each time it ends.rig send. If your app refuses that
send, tell them what it refused and why, and let them choose; don't retry it another way.
Example: not "run tmux attach -t dev-build@starter and press 1", but "The builder wants to run git status.
Allow it?", then relay their answer.
The full rules, the original wording included: references/seat-prompts.md.rig up, without their yes to what it will start; a yes they
already gave for that same launch counts, so don't ask twice.
Example: "Setup will install tmux with Homebrew and add an OpenRig block to ~/.tmux.conf. OK?"
What OpenRig writes, a project-only request, a seat limited to the project, keeping their own login, Codex's
approvals, and giving the person a path that exists on their side when they run something in their own terminal:
references/writes-and-scope.md. Read it before setup or the first start whenever
one of those applies.rig commands (rig queue, rig ps, rig whoami), never by opening its database
file: that file is OpenRig's own, and its layout changes between versions.
Example: rig queue show <id> --full, not a query on ~/.openrig/openrig.sqlite.Check first: rig --version. If it prints a version, run rig doctor; when its rig_login_shell row warns, give
the person its Fix. Then go to the openrig plugin below.
What it needs: macOS or Linux, Node.js 22 or 24, tmux, and Claude Code or Codex signed in. Check only what's
missing: node --version, tmux -V, claude auth status or codex login status.
Install: npm install -g @openrig/cli, then rig setup --providers codex (or claude, or both: the harness
the person uses). Say first what setup does: it can install tmux or the harness, installs Herdr for the OpenRig view
unless they decline it (--no-herdr), and adds an OpenRig block to ~/.tmux.conf. It doesn't start the daemon.
Then rig doctor, and carry any missing login into the handoff. Read setup's whole output, not just its end: step 2
here is the path to follow, and setup's manual path has no return route. A global prefix npm can't write to, nvm, a
check that fails falsely in a sandbox: references/install-and-plugin.md.
Then offer the openrig plugin for this app, as its own question, once the install has worked, unless this app already has it. Setup's next steps say to go on without stopping to ask; this offer is the exception, so wait for the answer. Put no other choice in that message. In Codex, ask it as a plain question in your reply and end your turn, not with a question tool or as the approval of an install command. Tell the person in plain words:
On a clear yes, run the install yourself, then make it active in this conversation as its own short request. In
Claude Code it does nothing here until the person types /reload-plugins (you can't run it), so ask for that and
for any message after it, such as "done"; then check for its tools. In Codex, its hooks run here only after the
person exits, resumes this conversation (codex resume <its id>) and trusts them when Codex asks. Tell the person
whether it's active. On no, install nothing, and offer it once more only after the team's first question you bring
them (step 2, "When a question arrives"). references/install-and-plugin.md has
each app's commands and how to check it's active; open it before the offer if command -v rig prints nothing,
since the offer then says where the plugin finds rig.
After they've answered (on a yes, once it's active here or you've said it isn't), or straight away if this app already had the plugin, go on to step 2: say it's installed and ask what they want worked on, and in which repository. A plain "install OpenRig" includes this. Stop here only if they say not to start a team.
If something fails: rig context get help is the help guide for the installed version. If rig itself won't
run, use https://www.openrig.dev/help/agents. Getting started: https://openrig.dev/docs/getting-started
A seat's startup text points an installing agent here. references/installing-for-someone.md adds what this step does not spell out (starting the daemon and kernel, what counts as ready and as finished) and relays the same commands; if the two ever differ, this step is right.
Start OpenRig: rig daemon status, and rig daemon start if it isn't running. If a supervisor (systemd, launchd)
runs it, restart it there instead: rig daemon start gives it this shell's environment, bearer tokens included.
rig preflight and rig doctor don't start it. Starting it also starts OpenRig's own team, the kernel, whose operator sets up the person's team.
Keep it. Then check who answers OpenRig's questions ("Before the first send" below; the details are in references/joining-and-people.md) before you hand over
the goal: if no one is registered, make that offer, whether or not the start's output named it, and register only
on the person's yes.
If the person uses Codex: now that OpenRig is running, make the one-time offer in references/codex-rules-offer.md.
Show them OpenRig, the handoff: once OpenRig is running, open the OpenRig TUI and operator for the person. Say
you're opening it, then run rig terminal open saved:kernel --window on the daemon's desktop. This is the next step
after installing or starting OpenRig; don't wait to be asked. If they've said not now, give them that command for
later. Where it opens from each kind of terminal, and when to say "Allow is fine" for a macOS prompt:
references/opening-the-view.md. Then tell the person in a sentence or two where it
opened and that the operator is ready for what they want to build; don't list agents or statuses.
If the window can't open, or over headless SSH: say plainly that no visible terminal was opened, and ask the person to open a new terminal window or tab on the daemon's host. Over SSH, that's a new SSH session to it with the known account. If you only know an HTTP daemon address, ask for the SSH details rather than inventing them. Then give them one complete command:
rig terminal open saved:kernel --window can't open a window, it says why
and ends with run: and a command (the error field with --json). That command already names the installed
herdr binary and the daemon's socket, or the conversation to attach. Relay it exactly rather than composing one.
If a note asks you to place the view once Herdr starts, run that rig terminal open yourself after they start it.operator.agent in
rig ps --nodes --rig kernel --json --fields logicalId,canonicalSessionName,tmuxAttachCommand and give
env -u TMUX followed by its tmuxAttachCommand, exactly as listed (never a guessed name), for the operator's
conversation. That command names the daemon's tmux server when it isn't the default one.For any other failure, the table under "What can interrupt installation and the OpenRig view" in
rig context get reference/getting-started.md#open-the-kernel-conversations says why and what to do next.
Before the first send, offer to join this session to the team (optional, on their yes only), and check who
answers OpenRig's questions (rig gateway participants): if nobody is registered, offer to register the person, and
register only on their yes. What to say, and the commands: references/joining-and-people.md.
Give the operator the goal: ask what they want worked on, in which repository and on which branch, unless they've said. Hand it over by where the person will answer the team. Staying here is the default: the pane route needs their explicit choice.
rig terminal open ended, above, first. If they chose it and no view can open, give them
the connection step above and keep their choice, and say the pane is pending until they open or attach to it.
Find the operator.agent row in rig ps --nodes --rig kernel --json, take its canonicalSessionName (never the
logical ID or a guessed name) and send:
rig send <canonicalSessionName> 'This is the agent that installed OpenRig. The person will answer in your pane. Goal: <goal>. Project folder: <absolute path>. Branch: <branch>.'
If no view opened, put this in place of its second sentence: "The person chose to answer in your pane; it is not open
for them yet, so your questions wait there until they open or attach to it."Carry their constraints, which logins they have (an installed provider that isn't signed in doesn't count), and any
permission choice they made, chosen or declined, in either handoff.
Or the person types the goal and folder in the operator's pane. If they give you a goal later, forward it the same
way, by the route they chose. The operator helps them pick a team that fits their logins, starts it (rig up) only on their yes to the plan it
shows, and gives the goal to the team's lead. Before that yes, it says what launching into their folder changes for their own agent there; relay
that with the question. Show them where the operator answers, and don't build the project yourself.
If you start a team yourself instead of through the operator, do its fit check first. A built-in team can need a
sign-in the person doesn't have: starter runs its reviewer on Codex, so someone on Claude Code alone stops at a Codex
sign-in just when the review should start. rig specs preview <team> --kind rig --json lists each seat's runtime.
Check those logins (claude auth status, codex login status), or go by what the person told you. If one is missing
or you can't tell, say so before launching and let them choose: the operator adapts the team to the logins they have,
or they sign in first.
If the person stays with you (the default), you're their front door to the team: you hand it the goal with a
return route, bring its questions to them, its seats' prompts included, and bring back what it produced and what its
latest review found, through the task queue rather than the operator's screen. --return-route auto gets this
conversation an address on the kernel's rig, such as conversation-3f2a9c1b7e44@kernel (--return-route self if
this session joined). Put OPENRIG_SESSION_NAME=<address> in front of every later rig queue and rig send for this
work. A joined session, more than one conversation, the reasons behind each rule:
references/staying-with-the-person.md.
Hand over the goal: write it to a file with what the message above carries (that you're the agent that installed OpenRig and the person stays with you, the goal, folder, branch, constraints, logins and permission choices), and end it with this paragraph:
To ask me anything, create a queue item to my return address, this item's
returnRoute(rig queue show <this id> --fullprints it):rig queue create --destination <that address> ..., then block this item on that new item's id (rig queue block <this id> --on <question id>), so my answer wakes you. If the block is refused because I've already answered, read my answer on that item and carry on. I check it whenever the person talks to me. Don't ask in your own terminal: the person isn't there. A seat's permission prompt in this work is their question too: send me its own text and choices, the seat, what it was doing and any escalation's id, unless a question about that prompt is already open at my address. Whoever sent the question passes on the answer, and no one else does. Capture that seat again first (a changed prompt needs a new answer), thenrig send <seat> "<key>" --dangerously-interact --reason 'task <question id>: <their answer>'with the key the prompt shows for their choice (for Escape,$'\e'in place of"<key>", never the word). Keep the reason in single quotes so the shell runs nothing in their words, and write each'in them as'\''. A no stays a no. If they gave no answer, or their words don't clearly pick one choice (a condition the action doesn't plainly meet, say), ask me again before sending anything, and never pick a "don't ask again" choice they didn't pick. Their answer covers only the prompt it answered: a later prompt, even one like it, is a new question to me. Check the effect, and never send again while it's unknown. To give this work to another seat, hand this item itself on (rig queue handoff <this id> --to <seat>), so my return address goes with it, and don't close it as a duplicate of a new item. If you hand this item on or give this work to another seat, copy this paragraph into the new item. A new item you create for part of this work keeps my return address by itself: leave--return-routeoff rather than naming yourself. If you're also working on another conversation's task, name mine instead (--return-route <my return address>). Either way its seat hands its result back to you, and the goal's result is the one that comes to me. Commit only as an author the person gave you, one they approved when you proposed it, or the one the repository already has (git config user.nameanduser.email); if there's none, ask me, and never choose one without their say. When you finish, send the result, with what the latest review found, as a task to my return address:rig queue create --destination <that address> --summary "<the result in a line>" --body-file <file>. Then close this item with the result, and any file in its evidence ref. A close by itself doesn't reach the person, and the task does. If another seat gave you this item for part of its work, don't send me a task or close it: hand it back to that seat with your result (rig queue handoff <this id> --to <that seat>), and it sends me the goal's result.
Before that, if you haven't offered the openrig plugin in this conversation yet (step 1; for example because OpenRig was already installed), offer it now as step 1 says: it's still its first offer.
Then run
rig queue create --destination <canonicalSessionName> --return-route auto --summary "<the goal in a sentence>" --body-file <file> --verify
(if this session joined, --return-route self with your OPENRIG_SESSION_NAME in front). It prints
Return route: <address>: that's your address from now on. The goal's handoffs carry it, and so do the tasks its
seats create for their parts. So brief only the seat you hand the goal to, and not another seat yourself with
rig send: a message carries no return route, so that seat's prompts couldn't reach you. Bring a seat's prompt in
this work to this address as a task; it may still not reach you by itself, so check the seats when the person is
waiting. Tell the person the task ID it prints, and keep the goal, your address and that ID: they're how you find
this work again. If the outcome is unknown, repeat the same command with
--id and the ID from its Queue create request ID: line, which it prints before it sends: the same task keeps the
same address.
Get woken when a task arrives at your address: start this right after the handover, before you reply to the
person, with your shell tool's background option, and start it again each time it ends, once you've handled what it
brought, for as long as work you handed over is open. Keep it with the openrig plugin too: the plugin's hooks check
only for two hours after each Claude Code turn. Run one at a time. If you can't tell whether one is still running
(after the conversation resumed in a new process, say), start one: a second wait costs one extra wake. Put your
address in place of <address>:
until OPENRIG_SESSION_NAME='<address>' rig queue list --owned --state pending --json 2>/dev/null | grep -q '"qitemId"'; do sleep 20; done
When it ends, claim each pending task at once (claiming isn't answering), handle it (below), then start the wait again. When to stop it, and a harness with no background wake: references/staying-with-the-person.md.
When a question arrives at your address, read it in full (rig queue show <id> --full), show the person the
whole question in the team's words, and record only what they tell you, a condition included: claim it, then
OPENRIG_SESSION_NAME=<address> rig queue update <id> --state done --closure-reason no-follow-on --resolution '<their words>',
with their words in single quotes and each ' in them written as '\''. If they said no to the openrig plugin
once and this is the team's first question you bring them (not a prompt from OpenRig itself or the operator), make
step 1's second offer once their answer is recorded, in one line of your next reply, so a "yes" can't answer both:
the plugin would have brought this here by itself (in Claude Code, within two hours of a turn here; in an older
Codex, such as 0.162.1, at their next message), and the choice is still theirs. Never answer a question task with
rig send, never answer for them, and start the wait again before you end your turn. A prompt the operator or a seat
sent you, or one from OpenRig itself (daemon@kernel), and a question only on the operator's screen:
references/staying-with-the-person.md.
Each turn, while work is open, list your address's tasks first
(OPENRIG_SESSION_NAME=<address> rig queue list --owned --state pending,in-progress), then check
rig ps --nodes --rig <rig> for a seat stopped at a prompt. A Claude Code seat's own ask
(qitem-runner-permission-…) is answered with
OPENRIG_SESSION_NAME=<address> rig seat decide-permission <ask> --option allow --relay --person-said '<their words>'
(or --option deny); a prompt with no ask, after capturing the seat again, with
rig send <seat>@<rig> "<key>" --dangerously-interact --reason 'task <id>: <their choice, in their words>', where
<key> is the key the screen shows for their choice. Read references/seat-prompts.md
before your first one.
When a step doesn't go as written (a wake outcome other than verified or claimed, or the operator answering
with a model error): references/troubleshooting.md.
Installation is finished when the operator is ready and the person is talking to it or, when they stay with you, once the goal has reached it as a task with your return route (read its wake outcome); a healthy daemon alone isn't that. If they'd rather talk later, keep that choice, leave them the exact connection step and say the handoff to the operator is still pending.
See what's running: rig ps, then rig ps --nodes --rig <rig> for a team's agents. If a team is already
running in that repository, tell the operator.
Check it's ready before you say so: rig ps --nodes --rig <rig>. If an agent is stopped at a prompt or a menu,
read it with rig capture <seat>@<rig>.
Follow these steps by default. Only when the person declined the Codex offer and explicitly chose the operator route does the operator own this follow-through.
rig queue show <id> --full names where it went. Follow each
handoff (successors) until an agent reports the result, then read what it produced and tell the person what the
team actually did (the branch, commit, review or PR text), not just that you sent it.--return-route self, ending with the reply paragraph in step 2,
never as a rig send message: a message has no return route.rig context profile world-public --situation fresh.rig context get onboarding-width (the capability map).rig context list.rig <command> --help is always current for the installed version.When something here and rig <command> --help disagree, --help wins.
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
OBobra/superpowers331k近 7 天新增 5,030 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star