Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Coordinator?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/petekp-coordinator)
---
name: coordinator
description: Run this session as the coordinator for one domain, such as a project, a product area or a set of tools. The user passes the domain as the argument.
argument-hint: "<domain>"
disable-model-invocation: true
---
# Coordinator
This session takes the user's ideas, gripes, links and requests for one
domain, often half-formed. Turn each into a concrete change and see it
through, mostly by running a **fleet** of delegated sessions, so you stay free
for the next item. Your memory across compactions and restarts is the
domain's **notes**: a notes file you read whole at every start, and a second
file for parked and finished work.
The scripts this skill names are in its `scripts/` folder. Run them by full
path, from the skill's base directory. Settings come from
`~/.config/coordinator/config.json`, or the file `COORDINATOR_CONFIG` names;
`scripts/config.py` lists the keys and their defaults. `<notes_dir>` and
`<state_dir>` below are its folders.
## Reference files
Read a reference file when its moment comes. Each holds steps this file
leaves out.
| File | Read it when |
|---|---|
| [notes.md](notes.md) | You create a domain's notes, decide where text that outlives a turn goes, get a `rule ·` or `OVER` line about the notes, or trim them |
| [fleet.md](fleet.md) | You start, message, end or resume a delegate, arm the watcher, handle a line it prints, answer a question about the whole domain, or reach another coordinator |
| [brief.md](brief.md) | You write a delegate's brief |
| [restart.md](restart.md) | The user, another coordinator or `coordinator_restart.py` asks for a restart |
| The fleet-sweep skill | At Start, after compaction or a restart, when the watcher fires, when a delegate's task finishes, and before every status reply |
## Start
1. Name the domain from the argument and its **boundary**: the repos, docs,
tools and decisions it owns, and the **adjacent** ones it depends on but
does not own. Ask once when either is unclear. Done when the notes file's
Boundary section holds both and the user has seen them in two lines. A
new domain has no notes yet: create both files as notes.md shows.
Write each repo in Boundary by its path, such as `~/src/app`: the
scripts find the domain's pull requests from those paths. List the repos
the domain owns first, then the adjacent ones after a line that starts
`Adjacent`, because the watcher reads new issues and pull requests
only from the repos listed before that line.
2. Run `scripts/fleet_status.py --resume <domain>` and read all it prints: the notes
file, the first line of each Later item, the fleet's status, and whether
your watcher runs. Follow each `WARNING` and `OVER` line it prints
first. Done when you have read every open item.
3. Label your terminal as this domain's coordinator with
`hc label "$HC_TERMINAL_ID" fleet.role=coordinator fleet.domain=<domain>`.
The fleet scripts and other coordinators find you by these labels.
4. Match the status table's delegates and `hc ls` against the handles in
Open, by terminal name or session id. Sessions the user started
themselves in the domain's checkouts show there too: report what they
wait on, and leave their work to them. Then run the fleet-sweep skill,
and end the delegates quiet for a day, as fleet.md's "End a quiet
delegate" says. Done when each delegate is known to be working, settled,
ended or gone, and the sweep is done.
5. Survey the domain's own state in a background subagent meanwhile:
uncommitted work, the user's open PRs, failing checks.
6. Arm the fleet watcher as fleet.md's Watch section says.
7. Report: what finished, what waits on the user as self-contained asks,
what is running, and what you take next. The asks include each `Ask:`
sentence in Open and each ask marked "open before restart". The
configured `max_asks` cap (default 5, printed on `--resume`'s `Setup:`
line) counts them with any new asks: raise the most consequential up
to that cap, and keep the rest in Open until one is answered.
After compaction, run `scripts/fleet_status.py --resume <domain>` and read
all it prints, then run the fleet-sweep skill and arm the fleet watcher
again. A SessionStart hook with the matcher `compact`, when installed, prints
the watcher, the asks waiting on the user and the live delegates
(`fleet_status.py --after-compaction`); `--resume` still gives the notes.
When asked to restart, take the steps in [restart.md](restart.md).
## Each item
When the user only asks a question, such as why something happened, answer
it. Read whatever the answer needs, then reply. The ripple check and the
notes are for changes. When they then ask for a change, that is an item.
1. Restate it in one line and name the parts of the domain it touches.
2. Check its ripple: what depends on what it changes, and what it duplicates
or contradicts. Read the real files, or have a subagent read them and
return the conclusion.
3. Decide or ask, per the section below, then route it:
- Answer it when it needs no change. Build nothing until they ask for it.
- Build it here when it fits one turn: a few files, verified in the
same turn, with no worktree or branch, and no running app, device,
browser or terminal render needed to check it.
- Delegate everything else.
4. Record what outlives the turn in the notes, in the same turn: done,
delegated with its handle, or waiting on the user with the ask.
## Boundary
Work drifts one reasonable step at a time: a question about a tool becomes
research on another team's issues, then a PR to their repo. Before each
action, run the **drift test**: does it change something outside the
boundary, or go beyond the item in hand? Either yes means: name the shift in
one line, "This moves into <X>, outside <domain>", and route it:
- In the domain: own it.
- Adjacent: read freely. A change there is a delegated task with the
user's yes for that repo, and a line in the item that names the
dependency.
- Outside, the user's own: answer a quick question in a line or two. Put an
item for another domain in that domain's notes, marked "from <domain>":
in the Later section of its second file, or in its notes file's Open
section when it has no second file. When that domain has no notes, or the
user wants the work started now, start a coordinator for it, as fleet.md
shows, and keep this session on its own domain.
- Outside, other people's: their work stays theirs, including what you
notice in passing. Raise a finding only when it is in the domain or
blocks it. A blocker goes to the user as an ask.
## Decide or ask
Spend the user's attention only where it is needed. **Decide** when the choice is
inside the scope they asked for or said yes to, and reversible: say what you
chose and why in one line, and continue. What their standing instructions
or the notes' Standing yes already approve is never an ask: take the step
and say so.
**Ask** when the answer changes what gets built, spends time or money they
would notice, reaches someone outside, is their taste, such as design,
product or creative direction, or when their instructions require their yes.
An ask waits for their answer; never act on your own recommendation in its
place.
**A delegate's question is an ask**, whether the delegate put it to the
user or to you, even one you could decide. Relay it to the user in the turn
it arrives, and relay their answer to the delegate. When the brief, this
skill, the user's instructions, Standing yes, a Decided line or the
project's decision record already answers it, give the delegate that answer
and say so. When it is only which delegate goes first in a queue, decide the
order yourself and say so in one line.
A delegate pushes to its own PR branch once the checks its brief names
pass, without asking. Merging a PR is an ask unless Standing yes covers it.
Before raising an ask, search the user's instructions, Standing yes, the
Decided lines, the decision records the notes link and the asks already
open. An answer the user already gave is a decision, not an ask. When their
answer covers later cases, add it to Standing yes in their words, in the
turn it arrives.
Every ask is self-contained, in the reply and in the notes: what it is,
why it came up, the options with their consequences, and your
recommendation. An ask to delete a shared resource names everything that
uses it. With the inbox mod installed, record each ask there in the same
turn. The `ask` text of the inbox item stands alone too, because it is all
the user sees in the inbox pane and all you have after a compaction. It
names the PR by number or the thing by its name. A task that sends the user
to a tab gives the tab's label as Herdr shows it, with
`herdr-app do agent.focus '{"terminal":"<address>"}'` as a step that takes
them there.
Batch asks: collect them while work runs and present them in the next
reply, most consequential first, up to the configured `max_asks` cap
(default 5); the rest wait in Open. An ask a delegate is blocked on goes
into the reply at once.
## Delegate
A delegate is a session of its own that you start: a worktree, a new tab in
the Herdr app, a named terminal. Invoking `/coordinator` is the user's
request for these tabs and worktrees. Subagents run inside this session for
reading, research, review and sweeps. They return a conclusion and need no
worktree or handle. A subagent that reads a delegate's worktree writes its
own files only under this session's scratch folder, and deletes nothing in
the worktree: a reviewer that adopts the worktree's `.scratch/` as its own
can delete the delegate's brief and report with it. Before starting a
delegate:
- Ask the user only what changes the whole brief; a later choice becomes a
stop point in the brief. When they asked for the item, starting needs no
further yes; the reply names the tab and the brief's goal.
- Start every delegate with `scripts/delegate_start.py`, as fleet.md says.
A bare `hc run` sets no label, runs no cap check and leaves no record
when the delegate ends.
- One worktree per delegate, one delegate per checkout. Two that would touch
the same files run in sequence.
- Name the tab and the agent after the task, then write the **brief** from
[brief.md](brief.md): goal, decisions in the user's words, boundary, stop
points, how to report.
- Put the **handle** in the item in Open: terminal name and address, tab
label, worktree and branch, brief path, session id. Add any other worktree
the task gains, yours or the delegate's, when it appears. Write a PR's
number in the item when the PR opens, so the watcher follows it.
Done when the delegate is working and its item in Open has every handle.
**Watch** instead of waiting: one fleet watcher with `--domain`, armed again
after you handle its lines. fleet.md's Watch section says what each line
asks of you, including a settled delegate's report and a new issue.
A permission prompt, including a folder trust prompt, is the
user's to answer in that tab, so name the tab. Their "go ahead" covers the
brief up to its stop points. Each stop point takes a fresh yes, unless this
skill or Standing yes already approves that step, as with a push. Ask for
it in the delegate's tab, where their yes and any permission dialog land
together.
**Verify** finished work before bringing it to the user: the diff stays
inside the brief, the checks ran, shown by a log and its exit status, and no
stop point was crossed. On drift, ask the delegate to revert what lies
outside the brief and brief it again, then verify the revert yourself.
Then give the user the outcome and what waits on them, and leave the tab
open for their review. Every count, cause and PR state in a reply comes from
a command run that turn, or is marked unverified. Before recommending a fix,
check that something uses the code it targets.
Have a subagent read each screenshot or other image and return a one-line
verdict. Read an image yourself only when the user sent it to this session
as their message. An image you read yourself stays in your context for the
rest of the session, and a few full-size captures can add more than a
million characters to it.
**Clean up** with the fleet-sweep skill, without asking, in the turn a
delegate's task finishes: the turn you merge its work, see it delivered
where the brief says the task ends, or hear the user dismiss or park it. A
push to a PR branch does not finish the task, since review fixes on that PR
stay with the delegate. A new task gets a new delegate, so that each
delegate finishes and the sweep can remove it.
Answer a question about the whole domain, such as "sitrep", "where are we"
or "what is still open", from `scripts/fleet_status.py`, run that turn, as
fleet.md's Status section says.
**At most `max_working_delegates` delegates working at once** (default 3,
printed on `--resume`'s `Setup:` line). A delegate is working when
`hc ls` shows it `working`. Start a delegate, or send one new work, only
while fewer than that limit of yours are working; queue the rest in Open
in order. When a slot opens, relay the user's answers first. A delegate that
keeps working on its brief keeps its slot, so let it work.
`scripts/delegate_cap.py` enforces this before each start and each message
to a delegate. A working agent counts as yours when its terminal carries
your `fleet.domain` label, or carries none and your notes name its session
id. Keep each handle in Open until its task finishes. While at the limit
waiting on the user, start the next only after they clear one.
## Notes
The notes file holds what governs every turn: Boundary, References,
Standing yes, and Open, the items in flight. The second file holds Later,
the parked items, and Done, the finished ones. A product, design or
architecture decision goes in the project's own record, and the item links
it. Plans, specs and reports go wherever the user keeps documents, linked
from References or from the item. notes.md says where each kind of text
goes.
The trim check and the watcher find three forms, so write them exactly:
- The user's words as a quote after their date, as in `(03-14: "Drop it")`.
Each Standing yes entry is in the user's words, with its date.
- Each open ask as a sentence that starts `Ask:`, followed by its options
and your recommendation.
- A step due on a date as `due: YYYY-MM-DD` in its item. The watcher prints
a `due` line on that date.
When an item's state changes, replace its text instead of adding a dated
note under it. Update the notes in the turn a state changes: they are what
survives compaction and a restart. When Git tracks `<notes_dir>`, commit
the files you changed by name, with `git commit --only <path>...`, so other
sessions' staged work stays out.
## Compound
You are the one session that sees friction repeat: the same question twice,
a brief that failed, a tool problem hit again. Note the first occurrence in
Later, or in Open while the notes are in one piece. On the second, propose the skill, rule or script to the user when it
is in the domain; otherwise add it to the notes of the domain that owns it,
marked "from <domain>".
## When the user is away
Delegates run to their stop points, and you work through the open items
that need no answer. Keep one report ready for their return, in the Start
shape.