[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KKZPTFYY70N28KN15HYC5M":3,"skill-same:01M6KKZPTFYY70N28KN15HYC5M":62},{"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":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":61},"01M6KKZPTFYY70N28KN15HYC5M","code-fix-gh-stack",null,"Use when the user asks to fix, green, repair, or stabilize a Graphite\u002FGitHub PR stack.","nseng-ai\u002Fns","nseng-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273792438?v=4","01M6KKN105A07WPV2TZKZXZGQF","nseng.ai","01M6KKN14MDSR9VF9739AWXG8M",2,"MIT","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Fcode\u002Fcode-fix-gh-stack\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"code","gh stack","stack","gh","fix","code fix gh stack","github","pr","user","use","github pr","green","repair","graphite","true","2026-11-10 10:12:30",false,"---\nname: code-fix-gh-stack\ndescription: \"Use when the user asks to fix, green, repair, or stabilize a Graphite\u002FGitHub PR stack.\"\nmetadata:\n  internal: true\n---\n\n# code-fix-gh-stack\n\nRepair loop for a Graphite\u002FGitHub PR stack: work lowest-first, fix one branch's blocker at a time, and judge every check through **Reading checks**. The stack is done only per the **Done definition** — one definition, checks-only.\n\n## Core loop\n\n1. **Inventory the stack**\n   - Use `ns slot gt exec stack-branches --format json` for structured current-stack topology.\n   - Use `gt parent --no-interactive` or `gt children --no-interactive` for immediate-edge questions.\n   - Treat `gt branch info --no-interactive` and `gt ls` as human presentation; take machine-readable topology from `stack-branches` (see `docs\u002Fconventions\u002Fgraphite-dependency-boundary.md`).\n   - Pass the discovered branch names to `ns address exec branch-pr-checks --branches-json ... --format json` to list remote PR checks.\n   - Classify each PR using **Reading checks**: green; fresh-failing; pending; needs restack\u002Flocal divergence. Record each PR's unresolved review-thread count for the final report — thread handling belongs to the `pr-address` processes, outside this loop.\n\n2. **Pick the lowest actionable failure**\n   - Start closest to trunk: downstack red usually explains upstack red.\n   - Act only on fresh failures (**Reading checks**); a stale failure needs a current-head run before it counts as evidence.\n   - If a lower PR is only pending, let it settle first (`ns address exec wait-for-checks` scoped to that branch, step 9) before touching an upstack failure that may be derivative.\n\n3. **Checkout the branch**\n   - `gt checkout \u003Cbranch>`\n   - Confirm a clean start: `git status --short --branch` reports a clean tree with no rebase in progress.\n\n4. **Inspect the failing signal**\n   - Prefer exact CI logs: `gh run view \u003Crun-id> --job \u003Cjob-id> --log-failed`\n   - When a failure's explanation lives in PR feedback (for example a review bot), download it: `ns address exec download-feedback --pr-number \u003Cn> --format json`\n   - Reproduce locally with the narrowest matching gate per `docs\u002Fconventions\u002Fjust-gate-map.md`.\n\n5. **Fix only this branch's blocker**\n   - Keep the change scoped to the branch's semantic purpose; upstack behavior gets fixed on its own branch when its turn comes.\n   - If the failure is semantic and not obvious, keep diagnosing until the precise decision is known; ask only when a real product\u002Fdesign choice is required.\n\n6. **Validate locally**\n   - Run the exact failing gate, plus any cheap adjacent gate that protects the touched area.\n   - If a formatter fails, use repo autofix: `just dprint-fix`, `just ts-format-fix`.\n\n7. **Amend with Graphite**\n   - Stage files, then `gt modify -m \"\u003Cclear message>\"`.\n   - Verify the amend landed: `git status --short` is clean and the fix is visible in `git show --stat`.\n   - If Graphite restacks into conflicts, resolve by the **Conflict canon**, then re-run local validation for the affected branch.\n\n8. **Submit**\n   - Use `gt submit --no-interactive` instead of `git push` \u002F `gh pr create` (canonical wording: the gt-over-git doctrine in root `AGENTS.md` §Git, Graphite, GitHub).\n\n9. **Wait for checks to settle**\n   - Pass the stack's branch names to\n     `ns address exec wait-for-checks --branches-json ... --format json`. It polls the\n     branches' PR checks (defaults: every 15s, up to 900s; tune with\n     `--interval-seconds`\u002F`--timeout-seconds`) and returns once with an `outcome`:\n     - `passing` (exit 0): every check concluded green;\n     - `failing` (exit 1): a check failed or was cancelled, reported as soon as observed;\n     - `timeout` (exit 1): checks still pending at the deadline;\n     - `mapping-gap` (exit 1): a branch has no or multiple open PRs.\n   - `wait-for-checks` is the loop's only settle mechanism: a submitted branch counts as fixed when it returns `passing` for that branch.\n   - On `failing`, return to step 2 with the next lowest fresh failure (per-branch counts are in the returned entries).\n   - On `timeout`, re-invoke wait-for-checks or report the still-pending checks; a timeout leaves the stack unsettled, not green.\n   - Repeat until the **Done definition** holds.\n\n## Reading checks\n\n- **Fresh vs stale.** A failing check is evidence only when it ran against the current head. Compare the check's `started_at` (check runs) or `created_at` (status contexts) from `branch-pr-checks` with the branch head's latest push — in this loop, your most recent `gt submit` of that branch. At-or-after the push is **fresh** and actionable; before it is **stale** — the verdict of a previous head. For a stale failure, wait for the current-head run (step 9) instead of fixing from the old log.\n- **Trailing.** A pending `Graphite \u002F mergeability_check` is a trailing signal: it settles on Graphite's side as downstack PRs merge and submits propagate. Read actionable pending as pending minus trailing; the Graphite context alone is neither a failure to fix nor a reason to keep polling.\n- **Review threads.** Unresolved review threads are inventory for the final report: count them per PR and route their handling to the `pr-address` processes. Fixing checks is this loop's whole contract.\n\n## Conflict canon\n\nWhen a Graphite restack conflicts:\n\n- The already-submitted downstack shape is canonical: resolve each conflict toward what the downstack branches already carry, and re-express this branch's change on top of it.\n- Commits whose content already exists downstack are duplicates: skip them, keeping only this branch's own delta.\n- Run the mechanics through `code-gt-restack-resolve` from the conflicted state, then re-run local validation for the affected branch.\n\n## Delegation\n\n- Delegate mechanical sweeps to a subagent when the harness provides one: validation gates across branches, submit sweeps after a downstack amend, and CI-log digs that end in an excerpt.\n- Keep conflict resolution and semantic fixes in the main session: they carry the judgment this loop exists to apply.\n\n## Stop conditions\n\nStop and report clearly when:\n\n- a semantic product\u002Fdesign choice is required;\n- local validation cannot reproduce CI and logs are insufficient;\n- Graphite\u002Frestack state is unsafe or conflicted beyond the current branch;\n- another worktree owns the branch needed for the next fix;\n- external mutation beyond `gt submit` is required.\n\n## Done definition\n\nThe stack is green when every PR in the target stack has zero fresh failing checks and its pending checks are either concluded green or trailing-only (**Reading checks**). This is the loop's single definition of done — checks only.\n\nThe final report inventories, without owning:\n\n- per-PR unresolved review-thread counts, routed to the `pr-address` processes;\n- any `warnings` from `ns slot gt exec stack-branches --format json`.\n","# code-fix-gh-stack\n\nRepair loop for a Graphite\u002FGitHub PR stack: work lowest-first, fix one branch's blocker at a time, and judge every check through **Reading checks**. The stack is done only per the **Done definition** — one definition, checks-only.\n\n## Core loop\n\n1. **Inventory the stack**\n   - Use `ns slot gt exec stack-branches --format json` for structured current-stack topology.\n   - Use `gt parent --no-interactive` or `gt children --no-interactive` for immediate-edge questions.\n   - Treat `gt branch info --no-interactive` and `gt ls` as human presentation; take machine-readable topology from `stack-branches` (see `docs\u002Fconventions\u002Fgraphite-dependency-boundary.md`).\n   - Pass the discovered branch names to `ns address exec branch-pr-checks --branches-json ... --format json` to list remote PR checks.\n   - Classify each PR using **Reading checks**: green; fresh-failing; pending; needs restack\u002Flocal divergence. Record each PR's unresolved review-thread count for the final report — thread handling belongs to the `pr-address` processes, outside this loop.\n\n2. **Pick the lowest actionable failure**\n   - Start closest to trunk: downstack red usually explains upstack red.\n   - Act only on fresh failures (**Reading checks**); a stale failure needs a current-head run before it counts as evidence.\n   - If a lower PR is only pending, let it settle first (`ns address exec wait-for-checks` scoped to that branch, step 9) before touching an upstack failure that may be derivative.\n\n3. **Checkout the branch**\n   - `gt checkout \u003Cbranch>`\n   - Confirm a clean start: `git status --short --branch` reports a clean tree with no rebase in progress.\n\n4. **Inspect the failing signal**\n   - Prefer exact CI logs: `gh run view \u003Crun-id> --job \u003Cjob-id> --log-failed`\n   - When a failure's explanation lives in PR feedback (for example a review bot), download it: `ns address exec download-feedback --pr-number \u003Cn> --format json`\n   - Reproduce locally with the narrowest matching gate per `docs\u002Fconventions\u002Fjust-gate-map.md`.\n\n5. **Fix only this branch's blocker**\n   - Keep the change scoped to the branch's semantic purpose; upstack behavior gets fixed on its own branch when its turn comes.\n   - If the failure is semantic and not obvious, keep diagnosing until the precise decision is known; ask only when a real product\u002Fdesign choice is required.\n\n6. **Validate locally**\n   - Run the exact failing gate, plus any cheap adjacent gate that protects the touched area.\n   - If a formatter fails, use repo autofix: `just dprint-fix`, `just ts-format-fix`.\n\n7. **Amend with Graphite**\n   - Stage files, then `gt modify -m \"\u003Cclear message>\"`.\n   - Verify the amend landed: `git status --short` is clean and the fix is visible in `git show --stat`.\n   - If Graphite restacks into conflicts, resolve by the **Conflict canon**, then re-run local validation for the affected branch.\n\n8. **Submit**\n   - Use `gt submit --no-interactive` instead of `git push` \u002F `gh pr create` (canonical wording: the gt-over-git doctrine in root `AGENTS.md` §Git, Graphite, GitHub).\n\n9. **Wait for checks to settle**\n   - Pass the stack's branch names to\n     `ns address exec wait-for-checks --branches-json ... --format json`. It polls the\n     branches' PR checks (defaults: every 15s, up to 900s; tune with\n     `--interval-seconds`\u002F`--timeout-seconds`) and returns once with an `outcome`:\n     - `passing` (exit 0): every check concluded green;\n     - `failing` (exit 1): a check failed or was cancelled, reported as soon as observed;\n     - `timeout` (exit 1): checks still pending at the deadline;\n     - `mapping-gap` (exit 1): a branch has no or multiple open PRs.\n   - `wait-for-checks` is the loop's only settle mechanism: a submitted branch counts as fixed when it returns `passing` for that branch.\n   - On `failing`, return to step 2 with the next lowest fresh failure (per-branch counts are in the returned entries).\n   - On `timeout`, re-invoke wait-for-checks or report the still-pending checks; a timeout leaves the stack unsettled, not green.\n   - Repeat until the **Done definition** holds.\n\n## Reading checks\n\n- **Fresh vs stale.** A failing check is evidence only when it ran against the current head. Compare the check's `started_at` (check runs) or `created_at` (status contexts) from `branch-pr-checks` with the branch head's latest push — in this loop, your most recent `gt submit` of that branch. At-or-after the push is **fresh** and actionable; before it is **stale** — the verdict of a previous head. For a stale failure, wait for the current-head run (step 9) instead of fixing from the old log.\n- **Trailing.** A pending `Graphite \u002F mergeability_check` is a trailing signal: it settles on Graphite's side as downstack PRs merge and submits propagate. Read actionable pending as pending minus trailing; the Graphite context alone is neither a failure to fix nor a reason to keep polling.\n- **Review threads.** Unresolved review threads are inventory for the final report: count them per PR and route their handling to the `pr-address` processes. Fixing checks is this loop's whole contract.\n\n## Conflict canon\n\nWhen a Graphite restack conflicts:\n\n- The already-submitted downstack shape is canonical: resolve each conflict toward what the downstack branches already carry, and re-express this branch's change on top of it.\n- Commits whose content already exists downstack are duplicates: skip them, keeping only this branch's own delta.\n- Run the mechanics through `code-gt-restack-resolve` from the conflicted state, then re-run local validation for the affected branch.\n\n## Delegation\n\n- Delegate mechanical sweeps to a subagent when the harness provides one: validation gates across branches, submit sweeps after a downstack amend, and CI-log digs that end in an excerpt.\n- Keep conflict resolution and semantic fixes in the main session: they carry the judgment this loop exists to apply.\n\n## Stop conditions\n\nStop and report clearly when:\n\n- a semantic product\u002Fdesign choice is required;\n- local validation cannot reproduce CI and logs are insufficient;\n- Graphite\u002Frestack state is unsafe or conflicted beyond the current branch;\n- another worktree owns the branch needed for the next fix;\n- external mutation beyond `gt submit` is required.\n\n## Done definition\n\nThe stack is green when every PR in the target stack has zero fresh failing checks and its pending checks are either concluded green or trailing-only (**Reading checks**). This is the loop's single definition of done — checks only.\n\nThe final report inventories, without owning:\n\n- per-PR unresolved review-thread counts, routed to the `pr-address` processes;\n- any `warnings` from `ns slot gt exec stack-branches --format json`.\n",{"name":5,"metadata":39,"description":7},{"internal":40},true,"master","44a56f0d543f274b42239091b35fe4d23855f6b3","skills\u002Finternal\u002Fcode\u002Fcode-fix-gh-stack",0,"https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns","https:\u002F\u002Fgithub.com\u002Fnseng-ai","Keeping the clankers in check: Nonslop Engineering for AI","2026-10-02 12:48:53",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":40},[51,54,57],{"tool":52,"command":53},"npx","npx skills add nseng-ai\u002Fns --skill code-fix-gh-stack",{"tool":55,"command":56},"bunx","bunx skills add nseng-ai\u002Fns --skill code-fix-gh-stack",{"tool":58,"command":59},"pnpm","pnpm dlx skills add nseng-ai\u002Fns --skill code-fix-gh-stack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Fcode\u002Fcode-fix-gh-stack\u002FSKILL.md",[],[63,84,109,128,151,162],{"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":34},"01M6KM3VZ7JC4S6R4KATJ368EH","pr-make-accountable","Interview a PR author to establish shared understanding of intent and design decisions, then co-author the What \u002F Why \u002F Changes PR body with opt-in Requested reviewer focus.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Fpublic\u002Fprs\u002Fpr-make-accountable\u002FSKILL.md",[],[26,70,71,72,73,74,75,76,77,78,79,80,81,33,82,83],"make","pr make accountable","design","why","reviewer","decisions","interview","intent","focus","shared","co","with","changes","pr body",{"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":34},"01M6KM3NZCZ86VJ91RSVTRGTJW","typescript-style","Opinionated style guide for strict, portable TypeScript. Use when writing, designing, or reviewing TypeScript: type design, boundary validation, error handling, module architecture, and review discipline.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-style\u002FSKILL.md",[],[91,92,93,72,94,95,96,97,98,99,100,101,28,102,103,104,105,106,107,108],"typescript","style","typescript style","writing","review","architecture","core","error handling","system","Rules","README","error-handling","study","module","error","case-study","style guide","for",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":34},"01M6KM3HNY4WY42KMYRPS6KEJZ","typescript-fake-driven-testing","TypeScript fake-driven testing architecture. Use when writing or reviewing TS code with external dependencies, gateway interfaces, real adapters, in-memory fakes, or CLI scenario tests.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Ftypescript-fake-driven-testing\u002FSKILL.md",[],[116,91,117,118,119,94,120,121,96,19,122,28,123,124,125,126,81,127],"testing","driven","fake driven testing","typescript fake driven testing","cli","memory","gateway","dependencies","tests","scenario","Adapters","in-memory",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":34},"01M6KM3AXC2539PENYVZJYKCP9","ns-typescript","TypeScript overlay for ns-style projects. Use when editing or reviewing TS in this repo: tsconfig baseline, pnpm\u002FVitest\u002Foxlint\u002Foxfmt\u002Fnative tsc commands, relative .ts imports, workspace subpath exports, and the exactOptionalPropertyTypes spread idiom. Repo-specific enforcement (test lanes, time seams, style guard) lives in the host repo's AGENTS.md.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Fns-typescript\u002FSKILL.md",[],[91,135,136,137,138,139,140,141,28,142,143,144,145,92,146,147,148,108,149,150],"ns typescript","test","guard","vitest","projects","editing","repo","enforcement","references","time","host","oxlint","import","native","alternatives","imports",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":34},"01M6KM36Y5KZ5V48M58MT42AHM","ns-typescript-style-tripwire","Invoke the ns TypeScript style Tripwire against a supplied diff or current branch.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Ftypescript\u002Fns-typescript-style-tripwire\u002FSKILL.md",[],[91,158,92,159,160,161,33],"tripwire","ns typescript style tripwire","branch","diff",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":34},"01M6KM313HANS0AV181X37ZM45","skill-management","Manage skills with `npx skills`: add, edit, remove, rename, update, or list skills (local or GitHub), and the nested `skills\u002F\u003Cdisposition>\u002F...\u002F\u003Cname>\u002F` \u002F flat `.agents\u002Fskills\u002F` layout conventions.","https:\u002F\u002Fgithub.com\u002Fnseng-ai\u002Fns\u002Fblob\u002Fmaster\u002Fskills\u002Finternal\u002Fskill-system\u002Fskill-management\u002FSKILL.md",[],[169,170,25,171,172,161,173,174,52,175,176,81,177,178,179,180,181,182,33,183],"management","skill management","Bash","remove","nested","manage","local","cat","ln","ls","mkdir","mv","readlink","rg","lock"]