Skip to content
Back to skills

Orchestrate In T3

ASecurity

Run a set of GitHub issues (a list, an epic, or a rule such as assigned to me) to closed from one T3 Code thread: a background watcher checks every few minutes and wakes the thread only when it must act, and it starts one new thread for each free issue at a new stage, with /grill, /triage, /ship, /ready-pr, or /complete-task. The user handles each thread; the orchestrator settles a finished /grill or /triage thread whose issue moved on, and closes each done epic of the run at the end. Also ta...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsgoshellbashgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add linhvu0711/skills --skill orchestrate-in-t3 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orchestrate In T3?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orchestrate In T3
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/linhvu0711-orchestrate-in-t3/badge)](https://www.skillsdirectory.com/skills/linhvu0711-orchestrate-in-t3)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: orchestrate-in-t3
description: "Run a set of GitHub issues (a list, an epic, or a rule such as assigned to me) to closed from one T3 Code thread: a background watcher checks every few minutes and wakes the thread only when it must act, and it starts one new thread for each free issue at a new stage, with /grill, /triage, /ship, /ready-pr, or /complete-task. The user handles each thread; the orchestrator settles a finished /grill or /triage thread whose issue moved on, and closes each done epic of the run at the end. Also takes /orchestrate-in-t3 check, /orchestrate-in-t3 resume, and the commands of a live run. Use when the user types /orchestrate-in-t3 with issues, an epic, or a rule."
disable-model-invocation: true
---

Paths in this skill are relative to its real folder: the one that holds this `SKILL.md`, after links are followed, as `realpath` prints it. Before you run or read one of them, put that real folder's absolute path in front of it.

This thread is the orchestrator. A script, `scripts/orchestrate.sh`, owns the run's state file, decides what to start, and runs the watcher: a background loop that checks every few minutes with no chat turn and sends this thread `/orchestrate-in-t3 check` only when you must act. You start each thread with T3's tools, snooze this thread, and report. Every `orchestrate.sh` call takes the repo as `<owner/repo>`, from `gh repo view --json nameWithOwner` in this thread's folder. Exit 1 from it: the last stderr line starts with `stop:`; show it as is, and that command ends there. Exit 64: a wrong command line, the usage after the `stop:` line; fix the call.

## Never

The orchestrator starts threads, and does two things in a thread it started: the script's watcher sends `/ready-pr <pr-url>` when that thread's PR has conflicts, and you settle a finished /grill or /triage thread per § Settle (ADR 0013, ADR 0015, ADR 0024). Each thread it starts is the user's from its first turn: leave it to them. So the orchestrator starts a thread once, and a thread that failed or ended with no new stage waits for the user's `restart #n`. It writes nothing to GitHub: no comment, no close, no merge, and only the labels below. Three exceptions: `resume #n` takes the `waiting` label off a task, as § Commands says, since the user asked for it; and § Done closes each epic of the run that is still open, since its sub-issues are all closed (ADR 0039), and an answer to a Proposal is written to the issue as its label, made first when the repo lacks it, per § Commands (ADR 0013).

## Start

`/orchestrate-in-t3 <set>`, in a T3 Code thread.

1. **Set.** Turn the user's words into issue words, once: `n` for an issue in this repo, `owner/repo#n` for one in another repo, per `../../core/route/target.md` § Resolving the target from the session, steps 1 and 2. A list stays a list; an epic is its number; a rule is a search, as `assigned to me` is `gh issue list --assignee @me --state open --json number`. Name the set in a few words: `#12 #14`, `epic #70 Order export`, `assigned to me`.
2. **Thread.** `t3_thread_update` with `action: rename`, no `threadId`, `title: 🧭 <name>`. Then `t3_thread_list` with `titleContains` that title, and hold the `threadId` of the thread with that exact title: no environment variable names this thread. Then `t3_environment_read`, and hold its `environmentId`: the board's thread links need it, and no `t3` command prints it.
3. **Run.**

   ```bash
   scripts/orchestrate.sh start <owner/repo> --name "<name>" --thread <threadId> --env <environmentId> <issue>...
   ```

   Its stops: `not inside T3 Code`, `a live run in <owner/repo>: <link>` (show the link: that thread is the orchestrator), `<name> has no open issue`, and the checkout resolver's.
4. **Watcher.** `scripts/orchestrate.sh watch <owner/repo>`. A stop from it: post its line; the run has no checks until `resume`.
5. **Board, show, and start.** Serve the board from the run folder, `run` in step 3's JSON line:

   ```bash
   ../../core/page/serve.sh <run> board.html
   ```

   Post `Board: <the URL it prints>`, and open that URL in the user's browser: `open "<url>"` on macOS, `xdg-open "<url>"` on Linux. A stop from serve.sh: post its line; the run goes on without the board. Then run § Check at once. Its issue lines are the resolved set. Then snooze this thread, per § Snooze.

## Check

`/orchestrate-in-t3 check` (the watcher's prompt), and `check now`.

```bash
scripts/orchestrate.sh check <owner/repo>
```

Exit 1: post the `stop:` line in this thread as it is. One that says `You must act` gets one more line: what the user can do, from its reason (`gh auth login`, wait out the rate limit, check the network, or open T3 Code). Nothing started.

Exit 0: one JSON line. For each item of `starts`, in order:

1. Follow `../../core/launch/launch-t3.md` with the item as its line. Its stop lines end this item only.
2. Started: `scripts/orchestrate.sh started <owner/repo> <ref> <stage> <threadId> "<link>"`.
   Not started: `scripts/orchestrate.sh started <owner/repo> <ref> <stage> --failed "<the stop line>"`.
   `<ref>` is the item's `ref`.

Then § Settle, for each item of `settles`.

Then post, by what ran the check:

- The watcher's prompt, `/orchestrate-in-t3 check`, and the line's `changed` is `false`: post nothing at all, not even a line that says nothing changed. Snooze, per § Snooze, and the turn ends there.
- The watcher's prompt, and `changed` is `true`: post the lines below only for the issues whose `changed` is `true`.
- Any other way in (start, resume, `check now`, `add`, `restart`, the answers): post the lines below for every issue.

One line per issue, set order. An issue's `ref` is `owner/repo#n`; its label is `#n` in this repo and `repo#n` in another, as each issue's `label` reads:

```
<label> <title> · <stage> · <what happens>
```

`<what happens>` is the started thread's link and `/<skill>`, the issue's `ask` (only the user can settle it: a repo not read, or not on this machine), its `wait`, `blocked by` and the label of each `blocked_by` ref, its thread's link and `thread_status`, `launch failed: <why>; say restart <label>` when `claim` is `failed`, or `done`. A `task` thread's line reads `/complete-task --ready`, and the thread waits for the user's `go`. A `waiting` issue reads `waits outside; say resume <label>`. A `too-big` issue reads `Cut it with /file-epic`, and so does an `unlabeled` one answered `xxl`. An `unlabeled` issue goes by its `answer`: none, `waits: your answer`, plus ` (proposed /<skill>)` when `proposal` names a skill; `skip`, `skipped`; `task`, `yours`; `close`, `yours to close`; a skill, as any other stage. The `ship` skill reads `/ship`, plus `--review`, `--ready`, or `--merge` when the user set that ship mode for the issue or for all; with none, the `/ship` thread picks the ship mode from its own plan. Lead with `Joined:` and the label of each `joined` ref when `joined` is not empty, and with `Paused.` when `status` is `paused`. `"done": true`: § Done. `propose` not empty: § Propose, after these lines. `settles` not empty: one line per item, after the issue lines, per § Settle.

## Settle

Each item of `settles` is a /grill or /triage thread that finished or failed, is not settled, and whose issue moved to a new stage. For each, in order:

1. **Read.** `status` is `failed`: the problem is `thread failed`; go to step 3. Else `"$T3CODE_CLI_PATH" thread show <thread> --messages 5 --json`: its latest messages. `t3_thread_read` starts at the first message, so it misses the last turn.
2. **Judge.** A problem is anything that still needs the user: a question or a choice left for them, an error or a `stop:` line the thread did not get past, work it says it left undone, or a step it asks the user to do. Judge by reading; no fixed words.
3. **Act.** No problem: `t3_thread_organize` with `action: settle` and the thread as `threadId`, then `scripts/orchestrate.sh settled <owner/repo> <thread> <run>`. A problem, or the settle failed: `scripts/orchestrate.sh settled <owner/repo> <thread> <run> --kept "<why in a few words>"`.

Post one line per item:

```
<label> /<command> thread <link> · settled
<label> /<command> thread <link> · kept open: <why>
```

A kept thread stays in the user's thread list, which is the signal, so it does not unsnooze this thread. It is judged again only after a new turn in it.

## Snooze

A snoozed thread leaves the user's thread list until it wakes, so the user sees the board, not this thread. T3 unsnoozes it when the user sends a message. Every turn in this thread ends with the first case below that holds, before you post: the watcher's checks, § Start, § Resume, the commands, and any talk with the user.

- The talk is still open: this turn asks the user a question or leaves a choice for them, or the user is partway through a request across turns. Judge by reading the talk; no fixed words. For example, "#72 can be archived, or kept for later. Which?" is open. `t3_thread_organize` with `action: unsnooze`, no `threadId`. This holds in a done run too, so the user sees the question.
- The run is done: the last check this thread ran printed `"done": true`, in this turn or an earlier one. A new run started here has its own checks, so its first check with `"done": false` ends this case. `t3_thread_organize` with `action: unsnooze`, no `threadId`, and never settle this thread: it stays at the top of the user's thread list, and T3 shows it finished when the turn ends. It holds for every later turn too: after "close it" is done and said, unsnooze again.
- The run needs the user: a `stop:` line, an issue at `unlabeled` with no `answer` (a proposal to make or one not answered yet), an issue whose `claim` is `failed`, or a start recorded `--failed`. Each waits on words said only in this thread, so a later turn with none of them new still keeps it in view. Unsnooze, as above.
- Any other turn: `t3_thread_organize` with `action: snooze`, no `threadId`, and `snoozedUntil` 24 hours from now, in UTC ISO form. A request done and reported in full is such a turn: after "archive #72's thread" is done and said, snooze.

T3 still alerts on a turn in a snoozed thread today; once it stops, the quiet turns are silent too.

## Propose

The refs in `propose` are unlabeled issues with no proposal yet. For each, in order, with `<n>` its number and `<label>` its label:

1. **Read.** `gh issue view <n> --repo <the ref's owner/repo> --json number,title,body,labels,comments`.
2. **Route and size.** Per `../../core/route/propose.md`. A read that fails: the route is `unsure`, and the line is `<label> · not sure: could not read <label>: <gh's last stderr line>`.
3. **Record.** `scripts/orchestrate.sh proposed <owner/repo> <ref> <route>`, with `<route>` one of `grill`, `triage`, `ship`, `ready-pr`, `task`, `close`, `xxl`, or `unsure`, plus `--size <size>` when step 2 gave one below XXL. It prints one JSON line: the `model` and `effort` the thread would get, from the same Router the launch asks, or both `null` with a `why`.

Then post one list:

```
Proposals. Answer in one reply: all yes, <label> <skill>, <label> yes, or skip <label>.
<label> <title> · <what> · <size line> · <model> <effort> · <reason> · "<quote>"
<label> <title> · not sure: /<a> (<reason a>) or /<b> (<reason b>) · <size line> · "<quote>"
```

`<what>` is `/<skill>`, `yours` for `task`, `close it` for `close`, or `Cut it with /file-epic` for `xxl`, as `#42 Export orders · Cut it with /file-epic · XXL: about 1,200 lines, 30 files`. `<size line>` is step 2's estimate line; no size, leave it out. `<model> <effort>` is from step 3's line, as `opus medium`; `null`: `no model: <why>`; `task`, `close`, or `xxl`: leave it out. `<quote>` is at most 12 words from the issue that back the reason.

## Commands

A live run takes these, said in this thread. Each runs one `orchestrate.sh` call, posts one line, and changes no other run state; `add` and the answers then run § Check. The turn ends per § Snooze. Below, `#n` stands for any issue word: `#n` in this repo, `repo#n`, or `owner/repo#n`, and `<n>` passes that word to `orchestrate.sh` in single quotes, as `'#12'`: a bare `#` starts a shell comment and drops the rest.

- `check now`: § Check.
- `check every <n> min`: `timer <owner/repo> --every <n>`. The watcher reads it before its next wait.
- `pause`: `timer <owner/repo> pause`, which ends the watcher. Running threads go on.
- `resume`: `timer <owner/repo> resume`, `watch <owner/repo>`, then § Check.
- `stop`: `timer <owner/repo> stop`, which ends the watcher. The state file stays for `/orchestrate-in-t3 resume`.
- `add #n ...`: `change <owner/repo> add <n>...`, then § Check, so a new unlabeled issue gets its proposal.
- `remove #n ...`: `change <owner/repo> remove <n>...`. A removed issue's thread runs on.
- `restart #n`: `change <owner/repo> restart <n>`, then § Check.
- `resume #n` on an issue at stage `waiting`: `gh issue edit <number> --repo <the issue's owner/repo> --remove-label waiting`, then `change
  <owner/repo> restart <n>`, then § Check, so a new ready thread starts when the task turn is
  free. A restart that stops with `has no thread to restart` is fine: go on.
- `skip #n` on an issue at stage `task`: `change <owner/repo> remove
  <n>`, then § Check, so the next task takes the task turn. Its thread
  runs on.
- Answers to § Propose: `all yes`, `all skip`, `#n yes`, `#n <skill>`, `skip #n`, many in one reply. One `change <owner/repo> answer <n>|all
  <word>` per part, the per-issue parts first, so `all` fills only the
  rest; then § Check. Post each line the answer prints: `labeled #n <label>`, with `, took off <old label>` when a changed answer swapped its label, and ` (made the label)` when the repo lacked it; `took <label> off #n`; or `not labeled #n: <why>`, after which the thread still starts. `#n ship` on a proposal with no size: size it per `../../core/route/propose.md` § Size first, then `change <owner/repo> answer <n> ship --size <size>`. The words are `yes`, `skip`, `grill`, `triage`, `ready-pr`, `task`, `close`, and `xxl`; `ship`, `ship review`, `ship ready`, or `ship merge` is `ship`, and a ship mode also runs `change
  <owner/repo> ship review|ready|merge <n>`, so the issue ships the way
  the user said, whatever the run's default. A new answer reaches an issue whose thread started only after `restart #n`.
- `ship review #n`, `ship ready #n`, `ship merge #n`, or the same with `all` (also `ship --merge #n`): `change <owner/repo> ship review|ready|merge <n>|all`. Only issues whose ticket thread has not started take it. With no ship mode set, the `/ship` thread picks it.
- `#n with <model> <effort>`, `all with <model> <effort>`, either part alone: `change <owner/repo> use <n>|all --model <model> --effort <effort>`. It wins over the model and effort a proposal named.

## Resume

`/orchestrate-in-t3 resume`, in any thread of the repo's project.

1. Rename this thread to `🧭 resume` and hold its `threadId` and the `environmentId`, as § Start step 2.
2. `scripts/orchestrate.sh resume <owner/repo> --thread <threadId> --env <environmentId>`. It prints the run's `run`, `name`, and `every`, and puts the newest board page in the run folder. Rename this thread to `🧭 <name>`.
3. Every run: the watcher as § Start step 4, then serve, post, and open the board, § Check, and § Snooze, as § Start step 5.

## Done

A check printed `"done": true`.

1. Keep this thread at the top of the user's list, per § Snooze: unsnooze it, and never settle it. The watcher ends by itself, since the run is done.
2. Post one summary, one line per item of `summary`:

   ```
   <label> <title> · <stages joined by →> · PR #<n> <state> · threads <links>
   ```

3. `scripts/orchestrate.sh close-epics <owner/repo>`, and post its lines as they are, one per epic of the run that was still open. Each closes that epic on GitHub as completed, since the done rule waited for every sub-issue. A `not closed` line leaves that epic open; go on.
4. `scripts/orchestrate.sh sync <owner/repo>`, and post its lines as they are, one per repo the run worked in. Each fast-forwards the default branch of that repo's main checkout to origin's, so clean-worktrees judges by the merged work. A `not updated` line leaves the branch as it was; go on.
5. From each folder in the check line's `paths` (the main checkouts), run `bash ../clean-worktrees/scripts/prune-worktrees.sh` and post its lines as they are, as `/ship` does after its merges.

Files in this skill

  • README.md12 KB
  • SKILL.md16.1 KB
  • agents/openai.yaml206 B
  • assets/board.html26.8 KB
  • scripts/orchestrate.sh75.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.