[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K7JHPHDB9DNXDKF3G2MDTB":3,"skill-same:01M6K7JHPHDB9DNXDKF3G2MDTB":87},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M6K7JHPHDB9DNXDKF3G2MDTB","consolidate",null,"joewalnes\u002Fskills","joewalnes","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F48950?v=4","01M6K7J46C00DDV34GMGT2NK72","Joe Walnes","01M6K7J4ANFVAP1P9ZJ3K4F3P2",3,"MIT","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"---\nname: consolidate\ndescription: Rebuild unpushed commits into one per feature or fix, tree-identical; also the machine-wide pre-push gate. Use before any push.\nargument-hint: [\u003Cbase>..\u003Chead>] [--check | --apply [--messages FILE]]\n---\n\n# Consolidate: commit often, push what a reader would choose\n\nA human reads every commit. Commit as often as you like while working — checkpoints are cheap and `commit as you go` is a go-team rule for good reason — but what gets **pushed** is one commit per feature or fix, describing the final form of the work, not the learning steps that led there. When work lands and is then improved three landings later, the reader gets one commit, not \"add X\", \"fix X\", \"X: actually handle the empty case\".\n\n## The gate\n\nA **machine-wide git pre-push hook** refuses any push whose range isn't reader-ready (`hooks\u002Fdispatch.py`, installed once via `git config --global core.hooksPath ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fhooks`). It applies to every repo on the machine and every process that runs git — Claude sessions, pi agents, the human — with nothing to install per project. It chains to any repo-local `.git\u002Fhooks\u002F\u003Cname>` so per-repo hooks keep working. The only bypass is `git push --no-verify`, which Claude sessions are denied; the human can, with a reason a reader would accept.\n\nReader-ready means: no merge commits in the range, and nothing the tool would fold. The refusal prints the plan and the exact command.\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py --check          # what the hook runs; exit 0 = ready\npython3 ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py                  # propose, on @{upstream}..HEAD\npython3 ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py --apply --messages msgs.json\n```\n\n## What it does\n\n- **Linearizes.** The range is walked first-parent, so a fleet landing (a merge) is one unit whose files are its diff to main and whose message comes from the commits it merged. Merges disappear. Itch's 196 unpushed commits became 41.\n- **Folds follow-ups back into the work they amend**, even when unrelated commits sit between — if and only if nothing in between touched any of the follow-up's files. That disjointness is what makes the move exact rather than a rebase with conflicts; a follow-up that shares a file with an intervening commit stays where it is, and that's correct.\n- **Groups by theme**: same `prefix:` subject when adjacent, a fixup-shaped subject (`fix`, `wip`, `typo`, `polish`…) touching the group's files, or heavy file overlap.\n- **Verifies the tip byte-identical** to the old one before reporting; a `backup\u002Fconsolidate-\u003Cts>` tag points at the old history until you delete it.\n\n## Messages: the part that needs judgement\n\nPropose first (`--check` or no flag). Read the groups. Then **write the messages** and pass `--messages FILE` — a JSON list, one per group, or `{\"3\": \"msg\"}` to override some. A consolidated message says what the change *is* in its final form: title, why, `Thesis:`\u002F`Surface:` trailers carried from the primary commit. The generated default (the first substantive subject, then \"Folds the follow-ups into the final form:\" and a list) is honest but is a fallback — and for a multi-commit landing it is only `\u003Cbranch>: N changes`. Don't push that.\n\n## Refusals — all deliberate\n\n- **Dirty tree.** Commit or stash first.\n- **Already pushed.** Never rewrite what others may have pulled.\n- **A go-team lease is held.** Workers' branches are based on the history you'd be rewriting; merging them afterwards would resurrect it. Consolidate main at the **stop condition**, when no lease is held — go-team does this itself.\n- **`\u003Chead>` isn't `HEAD`** for `--apply`.\n\n## Where it runs\n\n- **You, before `git push`** — and the hook will insist.\n- **go-team's gate**, on each worker branch before `git merge --no-ff` (`references\u002Fgate.md`), so a branch lands as the two or three changes it was.\n- **go-team at the stop condition**, on main's unpushed range, so the human who pushes in the morning finds one commit per thing rather than a night of merges.\n","# Consolidate: commit often, push what a reader would choose\n\nA human reads every commit. Commit as often as you like while working — checkpoints are cheap and `commit as you go` is a go-team rule for good reason — but what gets **pushed** is one commit per feature or fix, describing the final form of the work, not the learning steps that led there. When work lands and is then improved three landings later, the reader gets one commit, not \"add X\", \"fix X\", \"X: actually handle the empty case\".\n\n## The gate\n\nA **machine-wide git pre-push hook** refuses any push whose range isn't reader-ready (`hooks\u002Fdispatch.py`, installed once via `git config --global core.hooksPath ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fhooks`). It applies to every repo on the machine and every process that runs git — Claude sessions, pi agents, the human — with nothing to install per project. It chains to any repo-local `.git\u002Fhooks\u002F\u003Cname>` so per-repo hooks keep working. The only bypass is `git push --no-verify`, which Claude sessions are denied; the human can, with a reason a reader would accept.\n\nReader-ready means: no merge commits in the range, and nothing the tool would fold. The refusal prints the plan and the exact command.\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py --check          # what the hook runs; exit 0 = ready\npython3 ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py                  # propose, on @{upstream}..HEAD\npython3 ~\u002F.claude\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py --apply --messages msgs.json\n```\n\n## What it does\n\n- **Linearizes.** The range is walked first-parent, so a fleet landing (a merge) is one unit whose files are its diff to main and whose message comes from the commits it merged. Merges disappear. Itch's 196 unpushed commits became 41.\n- **Folds follow-ups back into the work they amend**, even when unrelated commits sit between — if and only if nothing in between touched any of the follow-up's files. That disjointness is what makes the move exact rather than a rebase with conflicts; a follow-up that shares a file with an intervening commit stays where it is, and that's correct.\n- **Groups by theme**: same `prefix:` subject when adjacent, a fixup-shaped subject (`fix`, `wip`, `typo`, `polish`…) touching the group's files, or heavy file overlap.\n- **Verifies the tip byte-identical** to the old one before reporting; a `backup\u002Fconsolidate-\u003Cts>` tag points at the old history until you delete it.\n\n## Messages: the part that needs judgement\n\nPropose first (`--check` or no flag). Read the groups. Then **write the messages** and pass `--messages FILE` — a JSON list, one per group, or `{\"3\": \"msg\"}` to override some. A consolidated message says what the change *is* in its final form: title, why, `Thesis:`\u002F`Surface:` trailers carried from the primary commit. The generated default (the first substantive subject, then \"Folds the follow-ups into the final form:\" and a list) is honest but is a fallback — and for a multi-commit landing it is only `\u003Cbranch>: N changes`. Don't push that.\n\n## Refusals — all deliberate\n\n- **Dirty tree.** Commit or stash first.\n- **Already pushed.** Never rewrite what others may have pulled.\n- **A go-team lease is held.** Workers' branches are based on the history you'd be rewriting; merging them afterwards would resurrect it. Consolidate main at the **stop condition**, when no lease is held — go-team does this itself.\n- **`\u003Chead>` isn't `HEAD`** for `--apply`.\n\n## Where it runs\n\n- **You, before `git push`** — and the hook will insist.\n- **go-team's gate**, on each worker branch before `git merge --no-ff` (`references\u002Fgate.md`), so a branch lands as the two or three changes it was.\n- **go-team at the stop condition**, on main's unpushed range, so the human who pushes in the morning finds one commit per thing rather than a night of merges.\n",{},"main","0d32bda2cb8e014372c2814f5aa47f48eee0f411","skills\u002Fconsolidate","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills","https:\u002F\u002Fgithub.com\u002Fjoewalnes","Experimental Projects @ Stripe.\r\n\r\nPreviously: Apple, Google, ThoughtWorks, DRW, Startups.","2026-09-09 00:56:55",{"source":7,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add joewalnes\u002Fskills --skill consolidate",{"tool":36,"command":37},"bunx","bunx skills add joewalnes\u002Fskills --skill consolidate",{"tool":39,"command":40},"pnpm","pnpm dlx skills add joewalnes\u002Fskills --skill consolidate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002FSKILL.md",true,[44,50,56,59,62,65,68,71,74,77,80,83],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"hooks\u002Fcommit-msg","OTHER","其他",11,"https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fcommit-msg",{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"hooks\u002Fdispatch.py","SCRIPT","脚本",2916,"https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fdispatch.py",{"path":57,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":58},"hooks\u002Fpost-checkout","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpost-checkout",{"path":60,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":61},"hooks\u002Fpost-commit","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpost-commit",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":64},"hooks\u002Fpost-merge","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpost-merge",{"path":66,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":67},"hooks\u002Fpost-rewrite","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpost-rewrite",{"path":69,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":70},"hooks\u002Fpre-commit","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpre-commit",{"path":72,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":73},"hooks\u002Fpre-merge-commit","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpre-merge-commit",{"path":75,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":76},"hooks\u002Fpre-push","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpre-push",{"path":78,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":79},"hooks\u002Fpre-rebase","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fpre-rebase",{"path":81,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":82},"hooks\u002Fprepare-commit-msg","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fhooks\u002Fprepare-commit-msg",{"path":84,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Fconsolidate.py",12374,"https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fconsolidate\u002Fscripts\u002Fconsolidate.py",[88,104,116,135,151,157],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M6K7MSG99DXYKTVVFGZWND1S","tool-web","Build a lightweight single-file web application with no external dependencies","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftool-web\u002FSKILL.md",[],[95,96,97,98,99,100,101,102,103],"tool web","tool","web","file","single-file","build","dependencies","application","with",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":18},"01M6K7MPN2FG6M6JQFWFR18CJ0","todo","Add a new bug or todo to the project's tracker","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftodo\u002FSKILL.md",[],[106,111,112,113,114,115],"bug","tracker","task","project","add",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":18},"01M6K7MGQFFYCD8HFDP1B95KDN","slop","Find unchosen code — surface area growing without leverage. Use pre-merge on a branch, or to check if a repo is accreting.","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fslop\u002FSKILL.md",[],[118,123,124,125,126,127,128,129,130,131,132,133,134],"pre-merge","rev","explain","merge","code","find","branch","repo","check","use","leverage","quick",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":18},"01M6K7MCVREA4NZ46Q9JWZJ7TG","sitrep","Where were we? Branch, in-progress work, blocked agents, inbox, next steps. Use when resuming a session.","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsitrep\u002FSKILL.md",[],[137,142,143,144,145,146,132,147,148,149,129,150],"work","grep","Bash","inbox","session","next","progress","next steps","read",{"skillNo":152,"name":153,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":18},"01M6K7M99FYMH9SFSEKB718J2B","scorecard","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fscorecard\u002FSKILL.md",[],[153],{"skillNo":158,"name":159,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":18},"01M6K7M4HNZR34GSB3V14KVCWA","retro","https:\u002F\u002Fgithub.com\u002Fjoewalnes\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fretro\u002FSKILL.md",[],[159]]