[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BXBJB92PMF5T0GB1GK8CMP":3,"skill-same:01M6BXBJB92PMF5T0GB1GK8CMP":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":17,"ownerDescription":17,"updatedAt":51,"install":52,"resources":65},"01M6BXBJB92PMF5T0GB1GK8CMP","worktree-sync-upstream","Git Worktree 上游分支同步","Sync a detached-HEAD worktree with its upstream branch in the main repo in both directions, rebasing only owned commits and fast-forwarding upstream, with recovery steps for tangled history and helpers for prose and secrets.toml conflicts. Use from inside a worktree.","双向同步主仓库中处于 detached-HEAD 状态的 worktree 与其上游分支：仅对由自己创建的提交进行变基（rebase），对上游分支执行快进（fast-forward）；并提供历史记录混乱时的恢复步骤，以及处理 prose 和 secrets.toml 冲突的辅助工具。需在 worktree 内部使用。","mrchantey\u002Fbeet","mrchantey","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25616826?v=4","01M6BXAMJ2N7RBWM0HZ0R6QRTV","Pete Hayman","01M6BXAMPVSZ84Q545AHAMT9N8",134,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38],"sync upstream","sync","worktree","worktree sync upstream","fast","recovery","secrets","commits","2026-11-10 10:12:30",false,"---\nname: worktree-sync-upstream\ndescription: Sync a detached-HEAD worktree with its upstream branch in the main repo in both directions, rebasing only owned commits and fast-forwarding upstream, with recovery steps for tangled history and helpers for prose and secrets.toml conflicts. Use from inside a worktree.\n---\n\n# Worktree Sync Upstream\n\nSync this worktree with its upstream branch in the main repo at `~\u002Fme\u002Fbeet`, in **both directions**. Do not delete this worktree and do not create a branch for it.\n\n## How these worktrees work\n\nThis is a Zed-style worktree: a separate cloned directory in **detached HEAD** (no branch), so parallel agents can each own a directory without competing for branch names. Keep it detached.\n\nThink of the worktree as `\u003Cupstream-branch> + your own commits on top`. The upstream branch (eg `beet_stack`) is checked out in the main repo. It does not matter how long-lived the worktree is, as long as it stays a clean linear extension of upstream.\n\n## The duplication pitfall\n\nRebasing or replaying commits you do not own mints new hashes for identical changes. Git then sees two lineages with the same content, so every later sync conflicts or stacks up duplicate commits (same message, different hash). The rule that avoids this: only ever rebase YOUR commits, and only ever fast-forward the upstream branch. Never `git merge` the full divergent history in either direction.\n\n## Clean sync\n\nRun from this worktree. Substitute the upstream branch name for `\u003Cup>`.\n\n1. Make sure the local upstream branch is current with its origin.\n2. Confirm the main repo working tree is clean (the fast-forward in step 4 touches it).\n3. **Pull**: replay only your commits onto the latest upstream, staying detached:\n   ```sh\n   git rebase \u003Cup>\n   ```\n   This brings in all upstream work and lands your commits on top. Resolve any conflicts carefully.\n4. **Push**: fast-forward the upstream branch to this worktree's HEAD:\n   ```sh\n   git -C ~\u002Fme\u002Fbeet merge --ff-only $(git rev-parse HEAD)\n   ```\n5. Confirm sync: `git rev-list --left-right --count HEAD...\u003Cup>` reports `0\t0`.\n\nNever push to `origin` unless asked.\n\n## If history is already tangled\n\nSymptom: many commits in `\u003Cup>..HEAD` share messages with upstream commits (duplicates from a past rebase). Recover by replaying only the genuinely unique commits:\n\n1. Back up first: `git tag backup\u002F\u003Cname> HEAD`.\n2. Inspect `git log --oneline \u003Cup>..HEAD` and find the last duplicate commit (everything below your real work).\n3. Replay only your work onto upstream: `git rebase --onto \u003Cup> \u003Clast-duplicate-commit>`.\n4. Verify no content changed: `git diff HEAD backup\u002F\u003Cname>` is empty.\n5. Then fast-forward upstream as in step 4 above.\n\n## Resolving conflicts\n\nRead a conflicted file against its base, `git checkout --conflict=diff3 -- \u003Cfile>`: who changed what is only legible beside the base. After resolving, compile the touched crates before `git rebase --continue`, so a later commit never builds on a broken resolution.\n\n- **Prose.** A markdown paragraph is one line, so two sides editing different sentences of it conflict on the whole paragraph. `python3 ~\u002Fme\u002Fbeet\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002Fword_merge.py \u003Cfile>...` merges each hunk word by word and leaves the rest conflicted. A clean merge can still be wrong (both sides renaming one thing), so read every result.\n- **`secrets.toml`.** Each group is one age blob, so two sides that each sealed something conflict on ciphertext, and taking a side silently drops the other's records. `python3 ~\u002Fme\u002Fbeet\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002Fsecrets_merge.py` decrypts the three stages in memory and prints which side changed each record, never a value; `--write` writes the merge, resealing only what needs it, and checks every blob against its index. It stops on a field the sides changed differently, ie a credential's `grants` after a converge on each: rerun with `--take=ours|theirs`, naming the side that sealed the credential the provider holds now. Grants it leaves behind the code only make the next plain deploy refuse with `--elevated`, which is the gate working.\n\n## Testing\n\nIf asked to test, run a sweep and fix any issues:\n```sh\njust test-core | tail\n```\nLeave the test fixes unstaged for review.\n","# Worktree Sync Upstream\n\nSync this worktree with its upstream branch in the main repo at `~\u002Fme\u002Fbeet`, in **both directions**. Do not delete this worktree and do not create a branch for it.\n\n## How these worktrees work\n\nThis is a Zed-style worktree: a separate cloned directory in **detached HEAD** (no branch), so parallel agents can each own a directory without competing for branch names. Keep it detached.\n\nThink of the worktree as `\u003Cupstream-branch> + your own commits on top`. The upstream branch (eg `beet_stack`) is checked out in the main repo. It does not matter how long-lived the worktree is, as long as it stays a clean linear extension of upstream.\n\n## The duplication pitfall\n\nRebasing or replaying commits you do not own mints new hashes for identical changes. Git then sees two lineages with the same content, so every later sync conflicts or stacks up duplicate commits (same message, different hash). The rule that avoids this: only ever rebase YOUR commits, and only ever fast-forward the upstream branch. Never `git merge` the full divergent history in either direction.\n\n## Clean sync\n\nRun from this worktree. Substitute the upstream branch name for `\u003Cup>`.\n\n1. Make sure the local upstream branch is current with its origin.\n2. Confirm the main repo working tree is clean (the fast-forward in step 4 touches it).\n3. **Pull**: replay only your commits onto the latest upstream, staying detached:\n   ```sh\n   git rebase \u003Cup>\n   ```\n   This brings in all upstream work and lands your commits on top. Resolve any conflicts carefully.\n4. **Push**: fast-forward the upstream branch to this worktree's HEAD:\n   ```sh\n   git -C ~\u002Fme\u002Fbeet merge --ff-only $(git rev-parse HEAD)\n   ```\n5. Confirm sync: `git rev-list --left-right --count HEAD...\u003Cup>` reports `0\t0`.\n\nNever push to `origin` unless asked.\n\n## If history is already tangled\n\nSymptom: many commits in `\u003Cup>..HEAD` share messages with upstream commits (duplicates from a past rebase). Recover by replaying only the genuinely unique commits:\n\n1. Back up first: `git tag backup\u002F\u003Cname> HEAD`.\n2. Inspect `git log --oneline \u003Cup>..HEAD` and find the last duplicate commit (everything below your real work).\n3. Replay only your work onto upstream: `git rebase --onto \u003Cup> \u003Clast-duplicate-commit>`.\n4. Verify no content changed: `git diff HEAD backup\u002F\u003Cname>` is empty.\n5. Then fast-forward upstream as in step 4 above.\n\n## Resolving conflicts\n\nRead a conflicted file against its base, `git checkout --conflict=diff3 -- \u003Cfile>`: who changed what is only legible beside the base. After resolving, compile the touched crates before `git rebase --continue`, so a later commit never builds on a broken resolution.\n\n- **Prose.** A markdown paragraph is one line, so two sides editing different sentences of it conflict on the whole paragraph. `python3 ~\u002Fme\u002Fbeet\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002Fword_merge.py \u003Cfile>...` merges each hunk word by word and leaves the rest conflicted. A clean merge can still be wrong (both sides renaming one thing), so read every result.\n- **`secrets.toml`.** Each group is one age blob, so two sides that each sealed something conflict on ciphertext, and taking a side silently drops the other's records. `python3 ~\u002Fme\u002Fbeet\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002Fsecrets_merge.py` decrypts the three stages in memory and prints which side changed each record, never a value; `--write` writes the merge, resealing only what needs it, and checks every blob against its index. It stops on a field the sides changed differently, ie a credential's `grants` after a converge on each: rerun with `--take=ours|theirs`, naming the side that sealed the credential the provider holds now. Grants it leaves behind the code only make the next plain deploy refuse with `--elevated`, which is the gate working.\n\n## Testing\n\nIf asked to test, run a sweep and fix any issues:\n```sh\njust test-core | tail\n```\nLeave the test fixes unstaged for review.\n",{"name":5,"description":7},"main","9b5840ae0d850b477ffc451d20edf49b65c6f6eb",".agents\u002Fskills\u002Fworktree-sync-upstream",8,"https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet","https:\u002F\u002Fbeet.org","https:\u002F\u002Fgithub.com\u002Fmrchantey","2026-11-14 20:09:05",{"source":9,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add mrchantey\u002Fbeet --skill worktree-sync-upstream",{"tool":58,"command":59},"bunx","bunx skills add mrchantey\u002Fbeet --skill worktree-sync-upstream",{"tool":61,"command":62},"pnpm","pnpm dlx skills add mrchantey\u002Fbeet --skill worktree-sync-upstream","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002FSKILL.md",true,[66,72],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"secrets_merge.py","SCRIPT","脚本",8716,"https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002Fsecrets_merge.py",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"word_merge.py",2240,"https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworktree-sync-upstream\u002Fword_merge.py",[77,89,113,125,139,156],{"skillNo":78,"name":79,"nameZh":80,"description":81,"descriptionZh":82,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":83,"categories":84,"keywords":87,"publishedAt":39},"01M6BXBGPK0T0YWC85M5AZR59N","worktree-sync-all","Git 工作树批量同步","Sync the main branch with every worktree in both directions, applying the worktree-sync-upstream skill to each in turn, then levelling them. Use when asked to sync all worktrees.","将 main 分支与每一个 worktree 进行双向同步，依次对每个 worktree 应用 worktree-sync-upstream 技能，然后将它们拉齐对齐。当被要求同步所有 worktree 时使用。","https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworktree-sync-all\u002FSKILL.md",[85,86],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[32,33,88],"worktree sync all",{"skillNo":90,"name":91,"nameZh":92,"description":93,"descriptionZh":94,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":95,"categories":96,"keywords":103,"publishedAt":39},"01M6BXBE53M9HRGTWNB1W9VKAT","test-the-works","项目全量测试验证","Maximal project health pass. Run core tests, all tests, the example smoke set, the rsx_site verification and every downstream repo in sequence, fixing every failure and warning surfaced along the way. Use when asked to run 'the works' or fully verify the project.","最大化的项目健康巡检。依次运行核心测试、全部测试、示例冒烟测试集、rsx_site 验证以及每一个下游仓库，并修复过程中出现的每一个失败和警告。当被要求运行全套检查（the works）或完整验证项目时使用。","https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftest-the-works\u002FSKILL.md",[97,100],{"categoryNo":98,"categoryName":99,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":101,"categoryName":102,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[104,105,106,107,108,109,110,111,112],"test the works","test","health","site","run","core","verify","verification","SET",{"skillNo":114,"name":115,"nameZh":116,"description":117,"descriptionZh":118,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":119,"categories":120,"keywords":123,"publishedAt":39},"01M6BXBBRK6XD63BKX60WKFDCW","test-run","测试套件运行与修复","Run the core test suite (just test-core) to a clean, warning-free pass, with recipes for hanging tests and mold linker flakes. Use when asked to run or fix the test suite.","运行核心测试套件（just test-core），直至干净、无警告地通过，并提供处理挂起测试和 mold 链接器偶发问题的方案。当被要求运行或修复测试套件时使用。","https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftest-run\u002FSKILL.md",[121,122],{"categoryNo":98,"categoryName":99,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":101,"categoryName":102,"taxonomyType":28,"taxonomyTypeDesc":29},[105,108,124,109],"test run",{"skillNo":126,"name":127,"nameZh":128,"description":129,"descriptionZh":130,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":131,"categories":132,"keywords":135,"publishedAt":39},"01M6BXB90ZEVHBM1R3C4Y95J3X","test-examples","示例冒烟测试运行","Run the workspace example smoke set to catch regressions unit tests miss, covering every feature gate combination with self-terminating examples and curl-probed servers. Use when asked to run or verify the examples.","运行工作区示例冒烟测试集，以捕捉单元测试遗漏的回归问题，覆盖每一种功能开关组合，使用可自动终止的示例和经 curl 探测的服务器。当被要求运行或验证示例时使用。","https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftest-examples\u002FSKILL.md",[133,134],{"categoryNo":98,"categoryName":99,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":101,"categoryName":102,"taxonomyType":28,"taxonomyTypeDesc":29},[136,105,137,112,138,108,110],"test examples","examples","unit tests",{"skillNo":140,"name":141,"nameZh":142,"description":143,"descriptionZh":144,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":145,"categories":146,"keywords":151,"publishedAt":39},"01M6BXB6QDY5NH0TMHWTCXX0C2","test-dependency-audit","Cargo依赖审计与精简","Audit every crate's Cargo.toml for unused, duplicate or misplaced dependencies, moving shared deps to the workspace and feature-gating where sensible. Use when asked to audit or slim dependencies.","审计每个 crate 的 Cargo.toml 中未使用、重复或放置不当的依赖项，将共享依赖移至工作区，并在合理处进行特性门控。在被要求审计或精简依赖时使用。","https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftest-dependency-audit\u002FSKILL.md",[147,148],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":149,"categoryName":150,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSNPHVX9Y1H3B2ZX3V06RF","Rust 开发",[105,152,153,154,155],"dependency audit","audit","test dependency audit","deps",{"skillNo":157,"name":158,"nameZh":159,"description":17,"descriptionZh":160,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":161,"categories":162,"keywords":169,"publishedAt":39},"01M6BXB508HZNAAD286H0YQ0K8","inner-monologue","内部推理独白","","https:\u002F\u002Fgithub.com\u002Fmrchantey\u002Fbeet\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Finner-monologue\u002FSKILL.md",[163,166],{"categoryNo":164,"categoryName":165,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":167,"categoryName":168,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C1YEW2680C003GGBD6QCKB","回复风格与输出控制",[170],"inner monologue"]