[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7881YD8EBQZBNS5PCQA6R02":3,"skill-same:01M7881YD8EBQZBNS5PCQA6R02":47},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7881YD8EBQZBNS5PCQA6R02","worktree-lifecycle",null,"Keep Chimaera's git worktrees and their Rust build output from filling the disk — when to remove your worktree, how to run scripts\u002Fworktree-gc (dry run, --apply, --self), what the SessionStart\u002FSessionEnd hooks do, and the hard rule never to touch an ACTIVE worktree. Use when your PR has merged, when disk space is low or a session-start hook flagged it, before a big cargo build (just check, cargo test --workspace, an app build), or when asked to clean up worktrees or target\u002F dirs.","martinappberg\u002Fchimaera","martinappberg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F17358377?v=4","01M787ZFA9CVKJKRZWAMAQVA9N","Martin Kjellberg","01M787ZFB4YKBEAFBABXX26F53",7,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworktree-lifecycle\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: worktree-lifecycle\ndescription: Keep Chimaera's git worktrees and their Rust build output from filling the disk — when to remove your worktree, how to run scripts\u002Fworktree-gc (dry run, --apply, --self), what the SessionStart\u002FSessionEnd hooks do, and the hard rule never to touch an ACTIVE worktree. Use when your PR has merged, when disk space is low or a session-start hook flagged it, before a big cargo build (just check, cargo test --workspace, an app build), or when asked to clean up worktrees or target\u002F dirs.\n---\n\n# Worktree lifecycle\n\nIsolated agent sessions use their own git worktrees: Claude Code under\n`.claude\u002Fworktrees\u002F\u003Cname>`, the Codex app under `~\u002F.codex\u002Fworktrees\u002F\u003Cid>\u002Fchimaera`.\nEach one grows its own cargo `target\u002F` (the daemon workspace, plus\n`crates\u002Fchimaera-app\u002Ftarget` and `plugins\u002Ftarget`), and single worktrees have reached\n35–60 GB. On macOS most of that was stale debug objects: a dev build keeps each\nexecutable's object files in `target\u002Fdebug\u002Fdeps` for the debugger, and every\nincremental rebuild writes new ones without deleting the old. Left alone, worktrees\nfilled the maintainer's disk to 99%.\n\n`scripts\u002Fworktree-gc` sorts every worktree of the repo (`git worktree list`) into one\ngroup and prints why:\n\n| Group | Meaning | What `--apply` does |\n|---|---|---|\n| **ACTIVE** | a process has its cwd or an open file inside it, it is `git worktree lock`ed, the script runs from it, or something in it changed in the last 6 h (unless its PR is merged — see REMOVE) | nothing, ever |\n| **PREVIEW** | clean and pushed, HEAD belongs to a merged PR (not already in main), and only recognized dev previews and their children use it; no lock, current session, or nested worktree | sends SIGTERM to the previews, waits up to 10 seconds, re-checks processes and git state, then removes the worktree; never SIGKILL |\n| **REMOVE** | PR merged or closed (or HEAD already in `origin\u002Fmain`), no uncommitted changes, no unpushed commits. A merged PR skips the 6 h wait when the checkout *is* that PR: its own commits (not in `origin\u002Fmain`) all sit in the PR's head | `git worktree remove` (never `--force`) + `git worktree prune`; the branch is kept |\n| **TRIM** | not removable, idle for more than 24 h | deletes its git-ignored `target\u002F` and `node_modules\u002F` dirs; source is never touched |\n| **KEEP** | everything else (an open PR idle \u003C 24 h, unpushed commits, uncommitted changes) | nothing |\n\nPREVIEW is the narrow exception to process-based activity: the executable must\nbe this checkout's `target\u002Fdebug\u002Fchimaera serve`, its isolated `chimaera-dev`\napp\u002Fdaemon, or Node running this checkout's Vite entrypoint from `web-ui`.\nThe documented `npm run dev`, `npm --prefix web-ui run dev`, `npm exec vite`\nand `just dev-ui` launcher chains are recognized too, as is `just app-dev-isolated`,\nincluding their dedicated shell wrappers. Compound shell commands and wrappers with other children stay\nprotected. Daemon-owned test\nagents shut down through their parent; GC never kills arbitrary `node`, `claude`,\n`codex`, shells, or editors by name. An unrelated process, a preview touching a\nsibling checkout, or an unrecognized wrapper keeps the checkout ACTIVE. A\nverified launcher chain stops from leaf to root, waiting for each child to be\nreaped before stopping its wrapper, within one shared ten-second deadline. A\npreview that will not exit, or work written during shutdown, keeps the checkout\nintact. Dry runs report PREVIEW without stopping anything; `--apply` and the\nautomatic session-start cleanup perform the guarded shutdown.\n\nIt judges a worktree only by its branch, that branch's PR (`gh`), git state and live\nprocesses (`lsof`, or `\u002Fproc`) — **never by its folder name**. Both apps reuse folders\nfor unrelated sessions, so `.claude\u002Fworktrees\u002Fchimera-pro-cloud-…` may hold a\nbranch about something else entirely.\n\nWhy merged skips the wait: merged, clean and pushed leaves nothing in progress, and\narchiving a session in the Claude app detaches its branch — a fresh `HEAD` and\nreflog write that otherwise reads as \"changed 0m ago\" and holds the folder for 6 h.\nA detached worktree finds its PR by commit, or through a local branch still pointing\nat its HEAD (the PR's head may have moved on since the checkout last pushed). A\nclosed PR (it may be reopened) and a fresh worktree whose HEAD is in main still\nwait — so do merged PRs in a repo that merges with merge commits, where the PR's\ncommits land in main. The cost: a merged session you return to after its folder\nwent has no worktree.\n\n## Record ownership\n\nWhen you start a worktree, record who owns it: the session name, the branch, and the\nPR. Record each preview you start with its owner, PID, and port (the isolated daemon,\nVite, the isolated app). Put that line in your session notes or the PR body. Stop\nonly what is on your record. A process or worktree with no owner on your record is\nnot yours; leave it alone and report it.\n\n## Bound build concurrency\n\nRun one cargo build at a time on the Mac. Overlapping builds from several sessions\n(or a bisect that rebuilds while another build runs) have exhausted RAM and killed\nthe session. Before a build, check that no other `cargo` or `rustc` process is running\n(`pgrep -x cargo; pgrep -x rustc`). If one is running, wait for it. Do not start\nparallel builds from lanes of one swarm; serialize them.\n\n## The lifecycle\n\n1. **Before a big build**, check `df -h ~`. Under ~50 GiB free (the session-start\n   hook says so when it is), run `scripts\u002Fworktree-gc` and read the table. Its\n   `--apply` only ever acts on PREVIEW, REMOVE and TRIM, which the hooks already apply\n   automatically, so running it is safe; nothing else is yours to delete.\n2. **After your PR merges**, your worktree should go. A session can't remove the\n   worktree it runs in (it is ACTIVE: \"this session runs here\"), so:\n   - stop every preview you started for this PR: the isolated app and daemon,\n     Vite, and any preview launcher. Use the preview tool's stop action when\n     available; otherwise verify the exact PID and executable, send SIGTERM,\n     and wait for exit. Let daemons shut down their own child agents. Never\n     use a broad process-name kill or stop another session's processes;\n   - drop its build output now with `scripts\u002Fworktree-gc --self --apply`;\n   - end the session. The next gc run (any session's start, at most hourly) removes\n     the worktree once nothing uses it — merged, clean and pushed is REMOVE;\n     recognized leftover previews are PREVIEW and shut down first — unless\n     automatic cleanup is off on that machine (`worktree-gc.auto`, below); then say\n     so and leave the removal to the human.\n   - Working from another checkout? `git worktree remove \u003Cpath>` — never `--force`,\n     and never on a worktree the table calls ACTIVE.\n   Treat this as part of finishing the PR, not optional housekeeping. If a\n   preview does not exit gracefully or another session keeps the worktree\n   ACTIVE, report the blocker and leave it intact. The next automatic GC is\n   a fallback for leftover previews, not a reason to keep yours running.\n3. **Verify the cleanup** after the PR merges and the worktree is gone:\n   - run `scripts\u002Fworktree-gc`; your worktree is absent from the table, or\n     reported ACTIVE with a reason;\n   - run `git worktree list`; no stale entry remains (`git worktree prune`\n     removes only entries whose folder is gone);\n   - confirm the previews on your ownership record no longer run;\n   - run `df -h ~` and note the freed space.\n   The branch is kept on purpose.\n4. **At session end** the SessionEnd hook runs `--self --sweep`: it deletes only the\n   stale debug objects no binary in `target\u002F` references, so the next build stays warm.\n   `--self` without `--sweep` deletes this worktree's whole `target\u002F` (the next build\n   starts cold) and refuses while anything runs from it.\n\n## Never\n\n- touch an ACTIVE worktree: no `rm -rf` of its `target\u002F`, no `git worktree remove`,\n  no unlocking a lock you didn't take. Codex app-servers keep their cwd in a worktree\n  for hours. Only the script's explicit PREVIEW group may stop recognized dev\n  previews, after verifying the checkout is clean, pushed and merged.\n- `git worktree remove --force`, delete branches, or clean another worktree by hand —\n  run the script, which re-checks each worktree right before acting.\n- trust `du` for what a delete frees. Cargo hardlinks objects between `deps\u002F` and\n  `incremental\u002F`, so `du` of the parts overcounts. `--apply` reports the change in\n  `df`'s free space instead.\n- keep anything you need in a worktree's git-ignored files: REMOVE deletes the whole\n  folder, and only committed-and-pushed work survives it.\n\n## Commands\n\n```sh\nscripts\u002Fworktree-gc                    # dry run: the table + what --apply would do\nscripts\u002Fworktree-gc --markdown         # the same, as a markdown table (PR bodies)\nscripts\u002Fworktree-gc --apply            # stop PREVIEWs, remove REMOVE, trim TRIM; reports df before\u002Fafter\nscripts\u002Fworktree-gc --self [--sweep] [--apply]   # this worktree's own target\u002F\nbash scripts\u002Fworktree-gc.test.sh       # the safety rules, against a throwaway repo\n```\n\nThe test runs in two sections. The deterministic section checks every\nclassification rule, previews included, against fixture process tables served by\nfake `lsof` and `ps` on PATH. The integration section starts real previews and\nstops them. It first probes `ps` and `lsof`; where a sandbox denies them, it prints\nthe missing capability and counts its cases as skipped, not failed. CI runs both.\n\nKnobs: `git config worktree-gc.auto false` stops the hooks from deleting anything\n(they still flag low disk; `git config --get worktree-gc.auto` shows whether a\nmachine opted out), `WORKTREE_GC=off` silences them entirely, and\n`WORKTREE_GC_ACTIVE_HOURS` (6), `WORKTREE_GC_IDLE_HOURS` (24), `WORKTREE_GC_LOW_GB`\n(50), `WORKTREE_GC_INTERVAL_MIN` (60) tune them. It acts only on the repo it lives\nin, whatever the cwd. It fails safe: without `lsof`\u002F`\u002Fproc`, or when it can't read a\nworktree's files, that worktree is ACTIVE; without `gh` nothing is removable by PR\nstate.\n\n**Diagnose a missing host capability.** If a sandbox denies `ps`, `lsof`, or `gh`,\nthe script does not guess. It keeps the affected worktrees ACTIVE or KEEP, and it\nremoves nothing it cannot verify. A dry run that shows everything ACTIVE or KEEP on\na host like this is correct, not broken. Check each tool by hand (`command -v ps\nlsof gh`, then `gh auth status`) and report which one is missing. Do not work\naround it with a manual delete. The test script prints the same missing capability\nand counts its integration cases as skipped.\n\n## Hooks\n\n- **Claude Code** (`.claude\u002Fsettings.json`): SessionStart runs `--hook session-start`\n  — prints one line into context when disk is low, and starts a detached\n  `--apply` run at most once an hour. SessionEnd runs `--hook session-end` — a\n  detached `--self --sweep --apply` (skipped on `\u002Fclear`).\n- **Codex** (`.codex\u002Fhooks.json`): the same two hooks, in Codex's documented format.\n  Codex runs project hooks only in a trusted project, after each is approved in\n  `\u002Fhooks` — and it records that approval per `hooks.json` path, so each Codex worktree\n  may ask again. `codex exec` 0.157.1 ran no project SessionStart hook at all in\n  testing. So for Codex, treat this skill and the AGENTS.md rule as the mechanism\n  and the hooks as a bonus.\n- Background runs log to `\u003Cmain checkout>\u002F.git\u002Fworktree-gc\u002Flog`.\n\n## Why the build is smaller now\n\nThe dev profile (root `Cargo.toml`, mirrored in `crates\u002Fchimaera-app\u002FCargo.toml`)\nbuilds workspace crates with `debug = \"line-tables-only\"` and dependencies with\n`debug = false`: backtraces and debugger breakpoints keep file:line, but locals are\nnot inspectable. When you need them, rebuild with full debug info:\n`CARGO_PROFILE_DEV_DEBUG=full cargo build`.\n\nOn macOS, `export CARGO_PROFILE_DEV_SPLIT_DEBUGINFO=packed` in your own shell stops\nthe stale-object pile-up at the source (dsymutil writes a `.dSYM` per binary and the\nobjects are deleted). It is not the repo default: the profile key would change Linux\nbuilds too, and a macOS-only rustflag would silently disable any `build.rustflags`\nyou set yourself.\n","# Worktree lifecycle\n\nIsolated agent sessions use their own git worktrees: Claude Code under\n`.claude\u002Fworktrees\u002F\u003Cname>`, the Codex app under `~\u002F.codex\u002Fworktrees\u002F\u003Cid>\u002Fchimaera`.\nEach one grows its own cargo `target\u002F` (the daemon workspace, plus\n`crates\u002Fchimaera-app\u002Ftarget` and `plugins\u002Ftarget`), and single worktrees have reached\n35–60 GB. On macOS most of that was stale debug objects: a dev build keeps each\nexecutable's object files in `target\u002Fdebug\u002Fdeps` for the debugger, and every\nincremental rebuild writes new ones without deleting the old. Left alone, worktrees\nfilled the maintainer's disk to 99%.\n\n`scripts\u002Fworktree-gc` sorts every worktree of the repo (`git worktree list`) into one\ngroup and prints why:\n\n| Group | Meaning | What `--apply` does |\n|---|---|---|\n| **ACTIVE** | a process has its cwd or an open file inside it, it is `git worktree lock`ed, the script runs from it, or something in it changed in the last 6 h (unless its PR is merged — see REMOVE) | nothing, ever |\n| **PREVIEW** | clean and pushed, HEAD belongs to a merged PR (not already in main), and only recognized dev previews and their children use it; no lock, current session, or nested worktree | sends SIGTERM to the previews, waits up to 10 seconds, re-checks processes and git state, then removes the worktree; never SIGKILL |\n| **REMOVE** | PR merged or closed (or HEAD already in `origin\u002Fmain`), no uncommitted changes, no unpushed commits. A merged PR skips the 6 h wait when the checkout *is* that PR: its own commits (not in `origin\u002Fmain`) all sit in the PR's head | `git worktree remove` (never `--force`) + `git worktree prune`; the branch is kept |\n| **TRIM** | not removable, idle for more than 24 h | deletes its git-ignored `target\u002F` and `node_modules\u002F` dirs; source is never touched |\n| **KEEP** | everything else (an open PR idle \u003C 24 h, unpushed commits, uncommitted changes) | nothing |\n\nPREVIEW is the narrow exception to process-based activity: the executable must\nbe this checkout's `target\u002Fdebug\u002Fchimaera serve`, its isolated `chimaera-dev`\napp\u002Fdaemon, or Node running this checkout's Vite entrypoint from `web-ui`.\nThe documented `npm run dev`, `npm --prefix web-ui run dev`, `npm exec vite`\nand `just dev-ui` launcher chains are recognized too, as is `just app-dev-isolated`,\nincluding their dedicated shell wrappers. Compound shell commands and wrappers with other children stay\nprotected. Daemon-owned test\nagents shut down through their parent; GC never kills arbitrary `node`, `claude`,\n`codex`, shells, or editors by name. An unrelated process, a preview touching a\nsibling checkout, or an unrecognized wrapper keeps the checkout ACTIVE. A\nverified launcher chain stops from leaf to root, waiting for each child to be\nreaped before stopping its wrapper, within one shared ten-second deadline. A\npreview that will not exit, or work written during shutdown, keeps the checkout\nintact. Dry runs report PREVIEW without stopping anything; `--apply` and the\nautomatic session-start cleanup perform the guarded shutdown.\n\nIt judges a worktree only by its branch, that branch's PR (`gh`), git state and live\nprocesses (`lsof`, or `\u002Fproc`) — **never by its folder name**. Both apps reuse folders\nfor unrelated sessions, so `.claude\u002Fworktrees\u002Fchimera-pro-cloud-…` may hold a\nbranch about something else entirely.\n\nWhy merged skips the wait: merged, clean and pushed leaves nothing in progress, and\narchiving a session in the Claude app detaches its branch — a fresh `HEAD` and\nreflog write that otherwise reads as \"changed 0m ago\" and holds the folder for 6 h.\nA detached worktree finds its PR by commit, or through a local branch still pointing\nat its HEAD (the PR's head may have moved on since the checkout last pushed). A\nclosed PR (it may be reopened) and a fresh worktree whose HEAD is in main still\nwait — so do merged PRs in a repo that merges with merge commits, where the PR's\ncommits land in main. The cost: a merged session you return to after its folder\nwent has no worktree.\n\n## Record ownership\n\nWhen you start a worktree, record who owns it: the session name, the branch, and the\nPR. Record each preview you start with its owner, PID, and port (the isolated daemon,\nVite, the isolated app). Put that line in your session notes or the PR body. Stop\nonly what is on your record. A process or worktree with no owner on your record is\nnot yours; leave it alone and report it.\n\n## Bound build concurrency\n\nRun one cargo build at a time on the Mac. Overlapping builds from several sessions\n(or a bisect that rebuilds while another build runs) have exhausted RAM and killed\nthe session. Before a build, check that no other `cargo` or `rustc` process is running\n(`pgrep -x cargo; pgrep -x rustc`). If one is running, wait for it. Do not start\nparallel builds from lanes of one swarm; serialize them.\n\n## The lifecycle\n\n1. **Before a big build**, check `df -h ~`. Under ~50 GiB free (the session-start\n   hook says so when it is), run `scripts\u002Fworktree-gc` and read the table. Its\n   `--apply` only ever acts on PREVIEW, REMOVE and TRIM, which the hooks already apply\n   automatically, so running it is safe; nothing else is yours to delete.\n2. **After your PR merges**, your worktree should go. A session can't remove the\n   worktree it runs in (it is ACTIVE: \"this session runs here\"), so:\n   - stop every preview you started for this PR: the isolated app and daemon,\n     Vite, and any preview launcher. Use the preview tool's stop action when\n     available; otherwise verify the exact PID and executable, send SIGTERM,\n     and wait for exit. Let daemons shut down their own child agents. Never\n     use a broad process-name kill or stop another session's processes;\n   - drop its build output now with `scripts\u002Fworktree-gc --self --apply`;\n   - end the session. The next gc run (any session's start, at most hourly) removes\n     the worktree once nothing uses it — merged, clean and pushed is REMOVE;\n     recognized leftover previews are PREVIEW and shut down first — unless\n     automatic cleanup is off on that machine (`worktree-gc.auto`, below); then say\n     so and leave the removal to the human.\n   - Working from another checkout? `git worktree remove \u003Cpath>` — never `--force`,\n     and never on a worktree the table calls ACTIVE.\n   Treat this as part of finishing the PR, not optional housekeeping. If a\n   preview does not exit gracefully or another session keeps the worktree\n   ACTIVE, report the blocker and leave it intact. The next automatic GC is\n   a fallback for leftover previews, not a reason to keep yours running.\n3. **Verify the cleanup** after the PR merges and the worktree is gone:\n   - run `scripts\u002Fworktree-gc`; your worktree is absent from the table, or\n     reported ACTIVE with a reason;\n   - run `git worktree list`; no stale entry remains (`git worktree prune`\n     removes only entries whose folder is gone);\n   - confirm the previews on your ownership record no longer run;\n   - run `df -h ~` and note the freed space.\n   The branch is kept on purpose.\n4. **At session end** the SessionEnd hook runs `--self --sweep`: it deletes only the\n   stale debug objects no binary in `target\u002F` references, so the next build stays warm.\n   `--self` without `--sweep` deletes this worktree's whole `target\u002F` (the next build\n   starts cold) and refuses while anything runs from it.\n\n## Never\n\n- touch an ACTIVE worktree: no `rm -rf` of its `target\u002F`, no `git worktree remove`,\n  no unlocking a lock you didn't take. Codex app-servers keep their cwd in a worktree\n  for hours. Only the script's explicit PREVIEW group may stop recognized dev\n  previews, after verifying the checkout is clean, pushed and merged.\n- `git worktree remove --force`, delete branches, or clean another worktree by hand —\n  run the script, which re-checks each worktree right before acting.\n- trust `du` for what a delete frees. Cargo hardlinks objects between `deps\u002F` and\n  `incremental\u002F`, so `du` of the parts overcounts. `--apply` reports the change in\n  `df`'s free space instead.\n- keep anything you need in a worktree's git-ignored files: REMOVE deletes the whole\n  folder, and only committed-and-pushed work survives it.\n\n## Commands\n\n```sh\nscripts\u002Fworktree-gc                    # dry run: the table + what --apply would do\nscripts\u002Fworktree-gc --markdown         # the same, as a markdown table (PR bodies)\nscripts\u002Fworktree-gc --apply            # stop PREVIEWs, remove REMOVE, trim TRIM; reports df before\u002Fafter\nscripts\u002Fworktree-gc --self [--sweep] [--apply]   # this worktree's own target\u002F\nbash scripts\u002Fworktree-gc.test.sh       # the safety rules, against a throwaway repo\n```\n\nThe test runs in two sections. The deterministic section checks every\nclassification rule, previews included, against fixture process tables served by\nfake `lsof` and `ps` on PATH. The integration section starts real previews and\nstops them. It first probes `ps` and `lsof`; where a sandbox denies them, it prints\nthe missing capability and counts its cases as skipped, not failed. CI runs both.\n\nKnobs: `git config worktree-gc.auto false` stops the hooks from deleting anything\n(they still flag low disk; `git config --get worktree-gc.auto` shows whether a\nmachine opted out), `WORKTREE_GC=off` silences them entirely, and\n`WORKTREE_GC_ACTIVE_HOURS` (6), `WORKTREE_GC_IDLE_HOURS` (24), `WORKTREE_GC_LOW_GB`\n(50), `WORKTREE_GC_INTERVAL_MIN` (60) tune them. It acts only on the repo it lives\nin, whatever the cwd. It fails safe: without `lsof`\u002F`\u002Fproc`, or when it can't read a\nworktree's files, that worktree is ACTIVE; without `gh` nothing is removable by PR\nstate.\n\n**Diagnose a missing host capability.** If a sandbox denies `ps`, `lsof`, or `gh`,\nthe script does not guess. It keeps the affected worktrees ACTIVE or KEEP, and it\nremoves nothing it cannot verify. A dry run that shows everything ACTIVE or KEEP on\na host like this is correct, not broken. Check each tool by hand (`command -v ps\nlsof gh`, then `gh auth status`) and report which one is missing. Do not work\naround it with a manual delete. The test script prints the same missing capability\nand counts its integration cases as skipped.\n\n## Hooks\n\n- **Claude Code** (`.claude\u002Fsettings.json`): SessionStart runs `--hook session-start`\n  — prints one line into context when disk is low, and starts a detached\n  `--apply` run at most once an hour. SessionEnd runs `--hook session-end` — a\n  detached `--self --sweep --apply` (skipped on `\u002Fclear`).\n- **Codex** (`.codex\u002Fhooks.json`): the same two hooks, in Codex's documented format.\n  Codex runs project hooks only in a trusted project, after each is approved in\n  `\u002Fhooks` — and it records that approval per `hooks.json` path, so each Codex worktree\n  may ask again. `codex exec` 0.157.1 ran no project SessionStart hook at all in\n  testing. So for Codex, treat this skill and the AGENTS.md rule as the mechanism\n  and the hooks as a bonus.\n- Background runs log to `\u003Cmain checkout>\u002F.git\u002Fworktree-gc\u002Flog`.\n\n## Why the build is smaller now\n\nThe dev profile (root `Cargo.toml`, mirrored in `crates\u002Fchimaera-app\u002FCargo.toml`)\nbuilds workspace crates with `debug = \"line-tables-only\"` and dependencies with\n`debug = false`: backtraces and debugger breakpoints keep file:line, but locals are\nnot inspectable. When you need them, rebuild with full debug info:\n`CARGO_PROFILE_DEV_DEBUG=full cargo build`.\n\nOn macOS, `export CARGO_PROFILE_DEV_SPLIT_DEBUGINFO=packed` in your own shell stops\nthe stale-object pile-up at the source (dsymutil writes a `.dSYM` per binary and the\nobjects are deleted). It is not the repo default: the profile key would change Linux\nbuilds too, and a macOS-only rustflag would silently disable any `build.rustflags`\nyou set yourself.\n",{"name":5,"description":7},"main","018562a00d38ea6f3865b4faafdc462a09900b19",".claude\u002Fskills\u002Fworktree-lifecycle",1,"https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera","https:\u002F\u002Fchimaera.sh\u002F","https:\u002F\u002Fgithub.com\u002Fmartinappberg","Genetics PhD student @ Stanford","2026-11-12 07:28:58",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add martinappberg\u002Fchimaera --skill worktree-lifecycle",{"tool":39,"command":40},"bunx","bunx skills add martinappberg\u002Fchimaera --skill worktree-lifecycle",{"tool":42,"command":43},"pnpm","pnpm dlx skills add martinappberg\u002Fchimaera --skill worktree-lifecycle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworktree-lifecycle\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7881SDKX58RNEYP1CTXM6KQ","verify-app","Verify a Chimaera change end-to-end against the real daemon, UI, and PTY layer before claiming it works. Use after changing daemon\u002Fserver\u002FPTY\u002FUI behavior — especially terminal, reconnect, resize, previews, or agent-launch flows, which have all had bugs that only reproduce live. Skip for pure docs\u002Fcomment changes.","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fverify-app\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7881NE4W5TX0GW5HYR17AK1","ship-pr","Open a pull request for Chimaera correctly — the CI gates that must pass, the Conventional-Commit prefix that drives the automatic version bump, and the [skip release] marker for docs\u002Fchore PRs that shouldn't ship a version. Use when creating a PR, choosing a commit\u002FPR title, or deciding whether a change should cut a release.","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fship-pr\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7881EXTJZZCG3HJ7RTQKGT9","refresh-public-messaging","Refresh Chimaera's public face — the README and the GitHub Pages site (site\u002Findex.html + site\u002Fdocs.html) — so it matches what the product actually does now, and brainstorm positioning with the maintainer. Use when the README or website has drifted behind shipped features, when revisiting the selling points \u002F tagline, or on a periodic \"is our public face still current and well-said?\" pass. Positioning is the maintainer's call — never rewrite it unilaterally.","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefresh-public-messaging\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7881A8MT7ARFW595KXVCZTW","document-feature","Add or update a Chimaera feature page under docs\u002Ffeatures\u002F so the feature catalog stays true as capabilities ship. Use when a change adds or changes user-facing behavior — a new pane surface, route, agent capability, CLI command — or when you find a feature page that's stale or missing. Defines the page structure, the derived-vs-intent split, and the rule that a feat: PR must carry its doc update.","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdocument-feature\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M788141DR3AFJH2JAVZJXFZG","develop","Run Chimaera locally and iterate on it — the daemon + Vite web-UI dev loop, ports, dev-mode auth, the build-embeds-UI gotcha, the isolated per-worktree daemon (chimaerad-isolated), and where things live. Use when starting to develop or run the app, when a change needs the real daemon\u002FUI to see, when working in a git worktree or alongside another daemon, or when the dev server won't come up (port in use, Node version, blank UI).","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdevelop\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7880XTENRQMGQYZ1975FQW8","debug-live-app","Debug a running Chimaera daemon + web UI against a live isolated preview — read daemon logs, the browser console, and network traffic; reproduce a failure; and recognize the common failure modes (blank UI, 401, port in use, HMR vs rebuild). Use when the app misbehaves at runtime, a change doesn't show up, the UI won't connect, or you need to see what the daemon is actually doing.","https:\u002F\u002Fgithub.com\u002Fmartinappberg\u002Fchimaera\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdebug-live-app\u002FSKILL.md",[],[]]