[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EHE2HHNV4JTBCZ3963F8SS":3,"skill-same:01M7EHE2HHNV4JTBCZ3963F8SS":46},{"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":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EHE2HHNV4JTBCZ3963F8SS","tidy-history",null,"tidy-history, folds the commits of the current branch into one commit per change. Use whenever the user wants to tidy, clean up, squash or rewrite the history of a branch, fold fixups into the commits they finish, or when the pull-request skill pushes a branch.","renefatuaki\u002Fskills","renefatuaki","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43519979?v=4","01M7EHD24GFMFZRH3Z04WSYC9A","René","01M7EHD25408DH8QKN61CSDXX4",0,"MIT","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgit\u002Ftidy-history\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tidy-history\ndescription: tidy-history, folds the commits of the current branch into one commit per change. Use whenever the user wants to tidy, clean up, squash or rewrite the history of a branch, fold fixups into the commits they finish, or when the pull-request skill pushes a branch.\nargument-hint: \"[base]\"\n---\n\nRebuilds the history of the branch checked out in the session's worktree, so a reviewer reads one commit per change. The tree stays the same.\n\n## Steps\n\n1. **Find the base.** The base is the branch the user or the calling skill named, otherwise the `baseRefName` of the open pull request that `gh pr view --json number,baseRefName` finds for the branch, otherwise `dev` when the remote has it and the current branch is another one, otherwise the default branch. Run `git fetch origin \u003Cbase>`. `\u003Cfork>` is `git merge-base origin\u002F\u003Cbase> HEAD`. Stop and say why when the current branch is the base or has no commit beyond it.\n2. **Check that the branch may be rewritten.** Stop and say why when one of these holds.\n   - The stage is not empty, so `git diff --cached --quiet` fails.\n   - A person has reviewed the open pull request, so the command prints more than 0, unless the user asks for the tidy anyway. Reviews of apps do not count.\n\n     ```sh\n     gh api graphql -F owner='{owner}' -F repo='{repo}' -F number=\u003Cnumber> \\\n       -f query='query($owner: String!, $repo: String!, $number: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $number) { reviews(first: 100) { nodes { author { __typename } } } } } }' \\\n       --jq '[.data.repository.pullRequest.reviews.nodes[] | select(.author.__typename == \"User\")] | length'\n     ```\n\n   - The remote holds commits the branch lacks. `git fetch origin \u003Cbranch>` succeeds and `git merge-base --is-ancestor origin\u002F\u003Cbranch> HEAD` fails.\n   - Layers of a stack build on the branch, so `gh pr list --base \u003Cbranch> --state open --json number` lists a pull request, unless the calling skill rebases them after the push.\n3. **Name the changes.** A reviewer reads one commit per change, such as a criterion of the issue, a refactoring it builds on or a diagram update. A commit that only finishes an earlier one of the branch belongs to that commit, such as a fix from a review or a check, a revert, a format or lint pass, or work in progress. Read `git log --reverse --format='%h %s%n%b' \u003Cfork>..HEAD` and name the changes. When the branch holds no more commits than changes, the history is tidy and this is the end.\n4. **Rebuild the branch.** Note `git rev-parse HEAD` as `\u003Cold>`.\n\n   ```sh\n   git reset --soft \u003Cfork>\n   ```\n\n   Commit the stage with the `commit` skill, one commit per named change in the order of the old history, each with the `Refs` and `Closes` trailers its old commits carried. The commit skill prints its plan without waiting and takes the issue from those trailers. A change whose old commits carry none is committed without a reference. Then `git diff --quiet \u003Cold> HEAD` must succeed. When it fails, `git reset \u003Cold>` restores the branch and leaves the working tree alone.\n5. **Push** the rebuilt history when the branch is on the remote. Report a rejected push and stop.\n\n   ```sh\n   git push --force-with-lease origin \u003Cbranch>\n   ```\n\n6. **Reply** with the commits before and after the tidy, or why it did not run.\n\nDone when the branch holds one commit per change with the tree of `\u003Cold>`, is pushed with lease when it is on the remote, or the reply says why the tidy did not run.\n","Rebuilds the history of the branch checked out in the session's worktree, so a reviewer reads one commit per change. The tree stays the same.\n\n## Steps\n\n1. **Find the base.** The base is the branch the user or the calling skill named, otherwise the `baseRefName` of the open pull request that `gh pr view --json number,baseRefName` finds for the branch, otherwise `dev` when the remote has it and the current branch is another one, otherwise the default branch. Run `git fetch origin \u003Cbase>`. `\u003Cfork>` is `git merge-base origin\u002F\u003Cbase> HEAD`. Stop and say why when the current branch is the base or has no commit beyond it.\n2. **Check that the branch may be rewritten.** Stop and say why when one of these holds.\n   - The stage is not empty, so `git diff --cached --quiet` fails.\n   - A person has reviewed the open pull request, so the command prints more than 0, unless the user asks for the tidy anyway. Reviews of apps do not count.\n\n     ```sh\n     gh api graphql -F owner='{owner}' -F repo='{repo}' -F number=\u003Cnumber> \\\n       -f query='query($owner: String!, $repo: String!, $number: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $number) { reviews(first: 100) { nodes { author { __typename } } } } } }' \\\n       --jq '[.data.repository.pullRequest.reviews.nodes[] | select(.author.__typename == \"User\")] | length'\n     ```\n\n   - The remote holds commits the branch lacks. `git fetch origin \u003Cbranch>` succeeds and `git merge-base --is-ancestor origin\u002F\u003Cbranch> HEAD` fails.\n   - Layers of a stack build on the branch, so `gh pr list --base \u003Cbranch> --state open --json number` lists a pull request, unless the calling skill rebases them after the push.\n3. **Name the changes.** A reviewer reads one commit per change, such as a criterion of the issue, a refactoring it builds on or a diagram update. A commit that only finishes an earlier one of the branch belongs to that commit, such as a fix from a review or a check, a revert, a format or lint pass, or work in progress. Read `git log --reverse --format='%h %s%n%b' \u003Cfork>..HEAD` and name the changes. When the branch holds no more commits than changes, the history is tidy and this is the end.\n4. **Rebuild the branch.** Note `git rev-parse HEAD` as `\u003Cold>`.\n\n   ```sh\n   git reset --soft \u003Cfork>\n   ```\n\n   Commit the stage with the `commit` skill, one commit per named change in the order of the old history, each with the `Refs` and `Closes` trailers its old commits carried. The commit skill prints its plan without waiting and takes the issue from those trailers. A change whose old commits carry none is committed without a reference. Then `git diff --quiet \u003Cold> HEAD` must succeed. When it fails, `git reset \u003Cold>` restores the branch and leaves the working tree alone.\n5. **Push** the rebuilt history when the branch is on the remote. Report a rejected push and stop.\n\n   ```sh\n   git push --force-with-lease origin \u003Cbranch>\n   ```\n\n6. **Reply** with the commits before and after the tidy, or why it did not run.\n\nDone when the branch holds one commit per change with the tree of `\u003Cold>`, is pushed with lease when it is on the remote, or the reply says why the tidy did not run.\n",{"name":5,"description":7,"argument-hint":24},"[base]","main","95608c3222b36a55dba667cf51a92a2efdf5e65c","skills\u002Fgit\u002Ftidy-history","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills","https:\u002F\u002Fgithub.com\u002Frenefatuaki","Senior Software Engineer","2026-11-11 02:18:10",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add renefatuaki\u002Fskills --skill tidy-history",{"tool":38,"command":39},"bunx","bunx skills add renefatuaki\u002Fskills --skill tidy-history",{"tool":41,"command":42},"pnpm","pnpm dlx skills add renefatuaki\u002Fskills --skill tidy-history","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgit\u002Ftidy-history\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7EHM6WHPXSSEDBK04TSGYW3","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\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7EHM3Z7JM36BCPJAQBVAMJ1","tdd","Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7EHM0WJND99F23YC24X0PXS","swarm","Fan out N parallel workers, drain them, and return one report. Use for \u002Fswarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fswarm\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7EHKXJPJHD57W7S0V2FYAAM","show-me-your-work","Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result). Local by default; commit it when a reviewer needs the trail to trust the result. Use for \u002Fshow-me-your-work, autonomous or multi-phase runs, or work a human reviews after stepping away.","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fshow-me-your-work\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7EHKSX411XWSR4GYZ9VKP42","interrogate","Use for \"interrogate\", \"adversarial review\", \"multi-model review\", \"challenge this\", \"stress test this code\", \"find blind spots\", or \"tear this apart\". Multiple LLM reviewers challenge changes from independent angles.","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Finterrogate\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7EHKPW39MGDZHA95BKXK5NJ","how","Use for \"how does X work\", code walkthroughs before changing something, and placement \u002F ownership \u002F layering questions (\"where should this live\", \"which package owns this\", \"is this the right layer\"). Explains subsystem architecture, runtime flow, onboarding mental models. Use why for motivation.","https:\u002F\u002Fgithub.com\u002Frenefatuaki\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fhow\u002FSKILL.md",[],[]]