[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78EEXKEADXTNBVN3096T211":3,"skill-same:01M78EEXKEADXTNBVN3096T211":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M78EEXKEADXTNBVN3096T211","pi-tidy-bots-cli",null,"Drive the pi-tidy-bots fleet runtime from an agent — init, daemonized start, status, stop, hot bot onboarding, and the HTTP+WS machine API (messages, transcripts, compaction, question cards) — all non-interactive with checked exit codes and --json shapes.","mikeyobrien\u002Fpi-tidy-tools","mikeyobrien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11792047?v=4","01M78EA4XJ7CY5SB8V7EPB1581","Mikey O'Brien","01M78EA4YD4ECB9199H176CNQY",63,"MIT","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002Fskills\u002Fpi-tidy-bots-cli\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pi-tidy-bots-cli\ndescription: Drive the pi-tidy-bots fleet runtime from an agent — init, daemonized start, status, stop, hot bot onboarding, and the HTTP+WS machine API (messages, transcripts, compaction, question cards) — all non-interactive with checked exit codes and --json shapes.\nargument-hint: \"pi-tidy-bots-cli \u003Cinit|start|status|stop|add> [fleetDir]\"\n---\n\n# pi-tidy-bots CLI for agents\n\nYou are driving the `pi-tidy-bots` CLI (fleet runtime for Pi operator bots) as a\nnon-interactive agent: no TTY, scripted, exit codes checked. The CLI owns fleet\n**lifecycle** (`init`, `start [--daemon]`, `status`, `stop`, `add`) and prints\nclassified errors on **stderr**. Everything else — messaging, transcripts,\nroutines, steering, question cards — is the daemon's **HTTP+WS API**, which is\nthe real machine interface.\n\nAdapted from scout's verified 0.1.0 CLI sweep; updated for the post-issue-29\nCLI (lifecycle commands, `--json`, strict flags, exit codes).\n\n## Exit codes (contract)\n\n| Code | Class          | Examples                                                              |\n| ---- | -------------- | --------------------------------------------------------------------- |\n| 0    | ok             | command succeeded; graceful stop                                      |\n| 1    | usage          | unknown flag (with did-you-mean), bad args, stop with nothing running |\n| 2    | state conflict | fleet lock held by another daemon; dir already a fleet                |\n| 3    | port\u002Faddr      | bind address in use                                                   |\n| 4    | runtime\u002Fauth   | fleet not running; child failed; manifest invalid at start            |\n\nErrors are one clean line on **stderr**: `error: \u003Cmessage> [fix: \u003Cremedy>]`.\nThe lock-conflict message keeps the holder pid. Usage goes to stderr too.\nUnknown flags are **hard errors** (`error: unknown flag --tiken for start\n[did you mean --token?]`) — never copy flags from memory, use `--help`.\n\n## `--json`\n\nGlobal flag. `init --json` → `{\"fleetDir\":\"…\",\"created\":true}`.\n`start --json` (foreground) → one readiness line `{\"url\",\"port\",\"pid\",\"token\"?}`\n(daemon log chatter moves to stderr). `stop --json` → `{\"stopped\":true,\"pid\"}`.\n`--version --json` → `{\"name\",\"version\"}`. Human output is the default.\n\n## Lifecycle\n\n```bash\npi-tidy-bots init \"$FLEET\"                 # scaffold demo fleet; exit 2 if dir already a fleet\npi-tidy-bots start \"$FLEET\" --daemon --json\n# -> {\"url\":\"http:\u002F\u002F127.0.0.1:4317\",\"port\":4317,\"pid\":\u003Cn>}   pid also in .fleet\u002Fdaemon.pid\npi-tidy-bots status \"$FLEET\" --json        # {\"pid\",\"port\",\"url\",\"bots\":[{name,online,queued}]}\npi-tidy-bots stop \"$FLEET\" --json          # SIGTERM via pidfile, waits for lock release\n```\n\n- `start` (foreground) blocks and logs to stdout; `--daemon` runs detached with\n  the log at `.fleet\u002Fdaemon.log` and the pid at `.fleet\u002Fdaemon.pid`.\n- **Non-loopback binds (0.0.0.0 or a LAN IP) auto-enable token auth**: a token\n  is minted and stored in `.fleet\u002Ftoken` if none exists, reused on restart, and\n  printed in the ready block. `--rotate-token` mints a fresh stored token.\n- `stop` is graceful (children stop, lock released). It exits 1 when nothing is\n  running or the pid refuses to die.\n\n## Hot bot onboarding (no restart)\n\n```bash\npi-tidy-bots add scout --dir \"$FLEET\" --title \"Research Scout\"\n# -> scaffolds bots\u002Fscout\u002FAGENTS.md + appends the [[bot]] row.\n```\n\nThe daemon watches `bots.toml` (300ms debounce) and reconciles live: added bots\nspawn and appear in the roster; removed bots stop gracefully (their transcript\njournal survives); dir\u002Fmodel\u002Froutes changes respawn the child resuming its\nsession dir. An invalid manifest edit is refused — the running fleet is kept\nand a `config-error` WS event names the problem. Names must match\n`[a-z][a-z0-9-]{1,31}`.\n\n## The HTTP+WS machine API\n\nAuthenticate: `Authorization: Bearer $TOKEN` (or `?token=`; pairing URLs carry\n`#token=` in the fragment — read it from `location.hash`). Feature-detect via\n`GET \u002Fapi\u002Fversion` → `{version, capabilities[]}`.\n\n- Roster: `GET \u002Fapi\u002Ffleet` → per-bot `name\u002Ftitle\u002Favatar\u002Fonline\u002Factive\u002F\nlastActive\u002Fqueued\u002Flatest`. Children spawn async — gate messaging on\n  `online:true`, not on the ready line.\n- Send: `POST \u002Fapi\u002Fbots\u002F:name\u002Fmessage` `{\"text\":\"…\", \"images\"?:[{mediaType,data}]}`.\n  Delivery is async (`{\"accepted\":true}`); poll the transcript.\n- Poll: `GET \u002Fapi\u002Fbots\u002F:name\u002Ftranscript?before=\u003Ciso>&limit=\u003Cn>` → entries with\n  `id, role, origin (operator|bot|routine|system), originFrom?, text, ts,\nsteps?, ui?, uiResolved?`. Dedupe by `id`.\n- Steer mid-turn: `POST \u002Fapi\u002Fbots\u002F:name\u002Fsteer` `{\"text\":\"…\"}`.\n- Compaction (reset): `POST \u002Fapi\u002Fbots\u002F:name\u002Fcompact` — `409 turn_in_flight`\n  while streaming.\n- Question cards: entries carry `ui`; answer via\n  `POST \u002Fapi\u002Fbots\u002F:name\u002Fui\u002F\u003Cid>` with `{\"value\"}` \u002F `{\"confirmed\"}` \u002F\n  `{\"cancel\":true}`. Unanswered cards auto-resolve after 120s.\n- Bus (bot→bot, child-only): `POST \u002Fbus\u002Fsend` needs the per-boot\n  `x-fleet-child` secret — never call it from a client.\n- Error shapes: `401 {\"error\":\"unauthorized\"}`, `404 {\"error\":\"unknown bot\"}`,\n  `503 {\"error\":\"runtime_offline\"}`, `409 {\"error\":\"turn_in_flight\"}`.\n\n## Pitfalls\n\n1. `start` (foreground) blocks forever — background it yourself, or use\n   `--daemon` and let the CLI own the pidfile.\n2. The readiness line can precede child readiness — poll `\u002Fapi\u002Ffleet`, gate on\n   `online:true`.\n3. `chat` is a human TUI — it hangs a non-interactive session. Don't.\n4. `queued` and `latest` in the roster are advisory.\n5. Transcript entries are typed (`origin`), not string-prefixed — never parse\n   `source` strings.\n\n## Security\n\nNetwork security is the operator's, not the package's. Loopback is\nunauthenticated by default; non-loopback binds mint a token automatically\n(stored at `.fleet\u002Ftoken` — treat it like a credential). Prefer a tailnet or\ntrusted LAN; `--token` stays available as an override.\n\n## Credits\n\nAdapted from scout's hands-on CLI sweep (0.1.0 verification) and updated for\nthe post-29 CLI surface by forge.\n","# pi-tidy-bots CLI for agents\n\nYou are driving the `pi-tidy-bots` CLI (fleet runtime for Pi operator bots) as a\nnon-interactive agent: no TTY, scripted, exit codes checked. The CLI owns fleet\n**lifecycle** (`init`, `start [--daemon]`, `status`, `stop`, `add`) and prints\nclassified errors on **stderr**. Everything else — messaging, transcripts,\nroutines, steering, question cards — is the daemon's **HTTP+WS API**, which is\nthe real machine interface.\n\nAdapted from scout's verified 0.1.0 CLI sweep; updated for the post-issue-29\nCLI (lifecycle commands, `--json`, strict flags, exit codes).\n\n## Exit codes (contract)\n\n| Code | Class          | Examples                                                              |\n| ---- | -------------- | --------------------------------------------------------------------- |\n| 0    | ok             | command succeeded; graceful stop                                      |\n| 1    | usage          | unknown flag (with did-you-mean), bad args, stop with nothing running |\n| 2    | state conflict | fleet lock held by another daemon; dir already a fleet                |\n| 3    | port\u002Faddr      | bind address in use                                                   |\n| 4    | runtime\u002Fauth   | fleet not running; child failed; manifest invalid at start            |\n\nErrors are one clean line on **stderr**: `error: \u003Cmessage> [fix: \u003Cremedy>]`.\nThe lock-conflict message keeps the holder pid. Usage goes to stderr too.\nUnknown flags are **hard errors** (`error: unknown flag --tiken for start\n[did you mean --token?]`) — never copy flags from memory, use `--help`.\n\n## `--json`\n\nGlobal flag. `init --json` → `{\"fleetDir\":\"…\",\"created\":true}`.\n`start --json` (foreground) → one readiness line `{\"url\",\"port\",\"pid\",\"token\"?}`\n(daemon log chatter moves to stderr). `stop --json` → `{\"stopped\":true,\"pid\"}`.\n`--version --json` → `{\"name\",\"version\"}`. Human output is the default.\n\n## Lifecycle\n\n```bash\npi-tidy-bots init \"$FLEET\"                 # scaffold demo fleet; exit 2 if dir already a fleet\npi-tidy-bots start \"$FLEET\" --daemon --json\n# -> {\"url\":\"http:\u002F\u002F127.0.0.1:4317\",\"port\":4317,\"pid\":\u003Cn>}   pid also in .fleet\u002Fdaemon.pid\npi-tidy-bots status \"$FLEET\" --json        # {\"pid\",\"port\",\"url\",\"bots\":[{name,online,queued}]}\npi-tidy-bots stop \"$FLEET\" --json          # SIGTERM via pidfile, waits for lock release\n```\n\n- `start` (foreground) blocks and logs to stdout; `--daemon` runs detached with\n  the log at `.fleet\u002Fdaemon.log` and the pid at `.fleet\u002Fdaemon.pid`.\n- **Non-loopback binds (0.0.0.0 or a LAN IP) auto-enable token auth**: a token\n  is minted and stored in `.fleet\u002Ftoken` if none exists, reused on restart, and\n  printed in the ready block. `--rotate-token` mints a fresh stored token.\n- `stop` is graceful (children stop, lock released). It exits 1 when nothing is\n  running or the pid refuses to die.\n\n## Hot bot onboarding (no restart)\n\n```bash\npi-tidy-bots add scout --dir \"$FLEET\" --title \"Research Scout\"\n# -> scaffolds bots\u002Fscout\u002FAGENTS.md + appends the [[bot]] row.\n```\n\nThe daemon watches `bots.toml` (300ms debounce) and reconciles live: added bots\nspawn and appear in the roster; removed bots stop gracefully (their transcript\njournal survives); dir\u002Fmodel\u002Froutes changes respawn the child resuming its\nsession dir. An invalid manifest edit is refused — the running fleet is kept\nand a `config-error` WS event names the problem. Names must match\n`[a-z][a-z0-9-]{1,31}`.\n\n## The HTTP+WS machine API\n\nAuthenticate: `Authorization: Bearer $TOKEN` (or `?token=`; pairing URLs carry\n`#token=` in the fragment — read it from `location.hash`). Feature-detect via\n`GET \u002Fapi\u002Fversion` → `{version, capabilities[]}`.\n\n- Roster: `GET \u002Fapi\u002Ffleet` → per-bot `name\u002Ftitle\u002Favatar\u002Fonline\u002Factive\u002F\nlastActive\u002Fqueued\u002Flatest`. Children spawn async — gate messaging on\n  `online:true`, not on the ready line.\n- Send: `POST \u002Fapi\u002Fbots\u002F:name\u002Fmessage` `{\"text\":\"…\", \"images\"?:[{mediaType,data}]}`.\n  Delivery is async (`{\"accepted\":true}`); poll the transcript.\n- Poll: `GET \u002Fapi\u002Fbots\u002F:name\u002Ftranscript?before=\u003Ciso>&limit=\u003Cn>` → entries with\n  `id, role, origin (operator|bot|routine|system), originFrom?, text, ts,\nsteps?, ui?, uiResolved?`. Dedupe by `id`.\n- Steer mid-turn: `POST \u002Fapi\u002Fbots\u002F:name\u002Fsteer` `{\"text\":\"…\"}`.\n- Compaction (reset): `POST \u002Fapi\u002Fbots\u002F:name\u002Fcompact` — `409 turn_in_flight`\n  while streaming.\n- Question cards: entries carry `ui`; answer via\n  `POST \u002Fapi\u002Fbots\u002F:name\u002Fui\u002F\u003Cid>` with `{\"value\"}` \u002F `{\"confirmed\"}` \u002F\n  `{\"cancel\":true}`. Unanswered cards auto-resolve after 120s.\n- Bus (bot→bot, child-only): `POST \u002Fbus\u002Fsend` needs the per-boot\n  `x-fleet-child` secret — never call it from a client.\n- Error shapes: `401 {\"error\":\"unauthorized\"}`, `404 {\"error\":\"unknown bot\"}`,\n  `503 {\"error\":\"runtime_offline\"}`, `409 {\"error\":\"turn_in_flight\"}`.\n\n## Pitfalls\n\n1. `start` (foreground) blocks forever — background it yourself, or use\n   `--daemon` and let the CLI own the pidfile.\n2. The readiness line can precede child readiness — poll `\u002Fapi\u002Ffleet`, gate on\n   `online:true`.\n3. `chat` is a human TUI — it hangs a non-interactive session. Don't.\n4. `queued` and `latest` in the roster are advisory.\n5. Transcript entries are typed (`origin`), not string-prefixed — never parse\n   `source` strings.\n\n## Security\n\nNetwork security is the operator's, not the package's. Loopback is\nunauthenticated by default; non-loopback binds mint a token automatically\n(stored at `.fleet\u002Ftoken` — treat it like a credential). Prefer a tailnet or\ntrusted LAN; `--token` stays available as an override.\n\n## Credits\n\nAdapted from scout's hands-on CLI sweep (0.1.0 verification) and updated for\nthe post-29 CLI surface by forge.\n",{"name":5,"description":7,"argument-hint":24},"pi-tidy-bots-cli \u003Cinit|start|status|stop|add> [fleetDir]","main","b253d1504091e48e3d60ebab19535bf0d1cec363","skills\u002Fpi-tidy-bots-cli",3,"https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools","https:\u002F\u002Fgithub.com\u002Fmikeyobrien","mobrienv.dev","Sr. SDE @ Amazon. Austin, TX. AI Enthusiast. \r\n","2026-10-13 08:29:57",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mikeyobrien\u002Fpi-tidy-tools --skill pi-tidy-bots-cli",{"tool":40,"command":41},"bunx","bunx skills add mikeyobrien\u002Fpi-tidy-tools --skill pi-tidy-bots-cli",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mikeyobrien\u002Fpi-tidy-tools --skill pi-tidy-bots-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002Fskills\u002Fpi-tidy-bots-cli\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M78EES9YE4WYNC6NJZNZD628","qa-loop","Run a human-gated QA and repair loop for pi-tidy-tools.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fqa-loop\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M78EEP74RPPZYAZYEJRJ2DXK","pi-tidy-tools-ethos","Narrative guardrails for @mobrienv\u002Fpi-tidy-tools. Use when designing, implementing, reviewing, or documenting non-release changes to that package.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fpi-tidy-tools-ethos\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M78EEJAAK2GZ2FXR8PT6SPSY","npm-release","Releases one @mobrienv\u002Fpi-tidy-* workspace through GitHub and npm Trusted Publishing. Use when asked to prepare changelog entries, cut, publish, or monitor a patch, minor, major, or explicit-version release.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fnpm-release\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M78EEEWYRACQEPDPC039DEK0","build-loop","Build and independently verify one ready implementation ticket through a human-gated repair loop.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fbuild-loop\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M78EEA9XNRCCR1SKEFSPXPTC","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M78EE7FYS5EH3K5ETM10BBVZ","unslop","Cut AI tells from any writing. Must always apply.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Funslop\u002FSKILL.md",[],[]]