[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACJ6Q5WKFZ094NBQ8TRZ4D":3,"skill-same:01M6ACJ6Q5WKFZ094NBQ8TRZ4D":74},{"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":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M6ACJ6Q5WKFZ094NBQ8TRZ4D","git-fixup-push",null,"Combines all git commits for a change into a single commit and pushes it to gerrit. Use when you push to gerrit.","apache\u002Fimpala","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACJ28XNPPRVBXE68DX967D",1295,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fimpala\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgit-fixup-push\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31],"git","push","git fixup push","change","commit","commits","use","it","you","for","git commits","single","when","2026-11-10 10:12:30",false,"---\nname: git-fixup-push\ndescription: Combines all git commits for a change into a single commit and pushes it to gerrit. Use when you push to gerrit.\nlicense: Apache-2.0\nmetadata:\n  version: \"1.0\"\n---\n\n## Fixup Git Commits and Push to Gerrit\n\nUse git-fixup-push when you have multiple commits for a change and want to combine them\ninto a single commit before pushing to gerrit. Changes to Impala are managed in gerrit,\nand each change is represented as a single git commit. Use git-fixup-push to meld multiple\ncommits into a single commit that can be pushed to gerrit.\n\n## Deterministic Execution Contract\n\n- Run all commands from the repository root in a single shell session.\n- Use non-interactive commands only.\n- Treat any non-zero command exit code as a failure for the current step unless the step\n  explicitly defines recovery behavior.\n- Do not use force operations (`--force`, `--force-with-lease`, hard reset).\n- Do not run `git remote -v`.\n- Ignore untracked files for staged\u002Funstaged detection and for stashing decisions.\n\n## Canonical Checks\n\n- Staged changes exist: `git diff --cached --quiet` (exit code `1` means staged changes exist).\n- Unstaged tracked changes exist: `git diff --quiet` (exit code `1` means unstaged tracked\n  changes exist).\n- Most recent commit message: `git log -1 --pretty=%B`.\n- Valid gerrit username regex: `^[A-Za-z0-9._-]+$`.\n- Remote URL checks:\n  - Fetch URL: `git remote get-url asf-gerrit`\n  - Push URL: `git remote get-url --push asf-gerrit`\n\n## Available Scripts\n\n- `.agents\u002Fskills\u002Fgit-fixup-push\u002Fscripts\u002Ffixup.sh` - Script to combine multiple\n  commits into a single commit.\n  Run with the `--help` argument to see usage instructions. Run with the `--dry-run`\n  argument to see the exact command that would be executed without actually running it.\n  The script selects commits from the most recent `IMPALA-\u003Cid>` commit through `HEAD`.\n  If that matching commit is already `HEAD`, the script exits without squashing.\n\n## Workflow\n\n- [ ] Step 1: Validate `asf-gerrit` remote and URLs.\n  - Success condition: both effective URLs exactly match\n    `ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`.\n  - Procedure:\n    - Try `git remote get-url asf-gerrit` and `git remote get-url --push asf-gerrit`.\n    - If remote does not exist, ask once for `\u003Cusername>`.\n    - Validate `\u003Cusername>` against `^[A-Za-z0-9._-]+$`.\n    - If `\u003Cusername>` is invalid, abort.\n    - If remote does not exist and `\u003Cusername>` is valid, run:\n      - `git remote add asf-gerrit ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`\n    - If remote exists but URL mismatch is detected, ask once for `\u003Cusername>`.\n    - Validate `\u003Cusername>` against `^[A-Za-z0-9._-]+$`.\n    - If `\u003Cusername>` is invalid, abort.\n    - If remote exists with URL mismatch and `\u003Cusername>` is valid, run:\n      - `git remote set-url asf-gerrit ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`\n      - `git remote set-url --push asf-gerrit ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`\n    - Re-run both URL checks. If either still mismatches, abort.\n- [ ] Step 2: Commit already-staged changes (pre-existing index state).\n  - Run staged check.\n  - If staged changes exist, run:\n    - `git commit -m \"WIP: commit staged files\"`\n  - If no staged changes, continue.\n- [ ] Step 3: Resolve unstaged tracked changes.\n  - Run unstaged tracked check.\n  - If no unstaged tracked changes, continue.\n  - If unstaged tracked changes exist, ask user to choose exactly one action:\n    - `stage`: run exactly `git add -u`\n    - `stash`: run `git stash push --keep-index -m \"stashed by git-fixup-push skill\"`.\n      Record that a stash was created; Step 9 will pop it after a successful push.\n  - If input is not exactly `stage` or `stash`, abort.\n- [ ] Step 4: Commit staged changes created by Step 3.\n  - Run staged check again.\n  - If staged changes exist, run:\n    - `git commit -m \"WIP: commit staged files\"`\n  - If no staged changes, continue.\n- [ ] Step 5: Squash commits for the current change.\n  - Run: `.agents\u002Fskills\u002Fgit-fixup-push\u002Fscripts\u002Ffixup.sh`\n  - If this command exits non-zero, abort.\n- [ ] Step 6: Run critique with bounded retry policy.\n  - Run from `${IMPALA_HOME}` exactly:\n    - `.\u002Fbin\u002Fjenkins\u002Fcritique-gerrit-review.py --dryrun`\n  - If critique passes, continue.\n  - If critique fails on first attempt:\n    - For each file and line number listed in the critique output, apply exactly the\n      code-style fix described (for example: trim trailing whitespace, fix indentation,\n      shorten lines to ≤90 characters). Do not make unrelated changes.\n    - Commit fixes with:\n      - `git commit -m \"fixed critique issues\"`\n    - Restart workflow from Step 1 and allow exactly one additional critique attempt.\n  - If critique fails on the second attempt, abort.\n- [ ] Step 7: Ensure `Assisted-by:` trailer is present on `HEAD`.\n  - Check trailers with:\n    - `git log -1 --pretty=%B | git interpret-trailers --only-trailers --unfold`\n  - If an `Assisted-by:` trailer is already present, do nothing and continue.\n  - If missing, ask user whether to add it.\n  - If user approves, amend commit message using `git interpret-trailers` and add exactly:\n    - `Assisted-by: \u003Cmodel> (\u003Cagent-name>)` where `\u003Cmodel>` is the name of the language\n      model and `\u003Cagent-name>` is the name of the agent executing this skill.\n  - Deterministic amend sequence:\n    - `tmp_msg=\"$(mktemp)\"`\n    - `git log -1 --pretty=%B | git interpret-trailers --if-exists=doNothing --trailer \"Assisted-by: \u003Cmodel> (\u003Cagent-name>)\" > \"$tmp_msg\"`\n    - `git commit --amend -F \"$tmp_msg\"`\n    - `rm -f \"$tmp_msg\"`\n  - Preserve Gerrit footer requirements:\n    - Keep `Change-Id:` in the final trailer paragraph.\n    - Keep trailer lines contiguous (no blank lines between trailer entries).\n  - If user declines, continue.\n  - If user input is invalid, abort.\n- [ ] Step 8: Push to Gerrit drafts.\n  - Run exactly:\n    - `git push asf-gerrit HEAD:refs\u002Fdrafts\u002Fmaster`\n  - If this command fails, abort and report the first actionable error.\n- [ ] Step 9: Pop stash if one was created in Step 3.\n  - If Step 3 recorded that a stash was created, run:\n    - `git stash pop`\n  - If `git stash pop` exits non-zero, report the error and stop; do not abort\n    silently (the push already succeeded).\n  - If no stash was created in Step 3, skip this step.\n\n## Gotchas\n\n- Gerrit requires `Change-Id:` to be in the final footer paragraph of the commit message.\n  Keep all trailer lines contiguous in that last paragraph (for example, `Change-Id:` and\n  `Assisted-by:` should be adjacent, with no blank line between them).\n- Git may not have `remote.\u003Cname>.pushurl` explicitly set. In that case,\n  `git remote get-url --push \u003Cname>` may still resolve via `remote.\u003Cname>.url`.\n- `git stash push --keep-index` stashes only unstaged tracked changes and preserves staged\n  changes for the next commit step.\n","## Fixup Git Commits and Push to Gerrit\n\nUse git-fixup-push when you have multiple commits for a change and want to combine them\ninto a single commit before pushing to gerrit. Changes to Impala are managed in gerrit,\nand each change is represented as a single git commit. Use git-fixup-push to meld multiple\ncommits into a single commit that can be pushed to gerrit.\n\n## Deterministic Execution Contract\n\n- Run all commands from the repository root in a single shell session.\n- Use non-interactive commands only.\n- Treat any non-zero command exit code as a failure for the current step unless the step\n  explicitly defines recovery behavior.\n- Do not use force operations (`--force`, `--force-with-lease`, hard reset).\n- Do not run `git remote -v`.\n- Ignore untracked files for staged\u002Funstaged detection and for stashing decisions.\n\n## Canonical Checks\n\n- Staged changes exist: `git diff --cached --quiet` (exit code `1` means staged changes exist).\n- Unstaged tracked changes exist: `git diff --quiet` (exit code `1` means unstaged tracked\n  changes exist).\n- Most recent commit message: `git log -1 --pretty=%B`.\n- Valid gerrit username regex: `^[A-Za-z0-9._-]+$`.\n- Remote URL checks:\n  - Fetch URL: `git remote get-url asf-gerrit`\n  - Push URL: `git remote get-url --push asf-gerrit`\n\n## Available Scripts\n\n- `.agents\u002Fskills\u002Fgit-fixup-push\u002Fscripts\u002Ffixup.sh` - Script to combine multiple\n  commits into a single commit.\n  Run with the `--help` argument to see usage instructions. Run with the `--dry-run`\n  argument to see the exact command that would be executed without actually running it.\n  The script selects commits from the most recent `IMPALA-\u003Cid>` commit through `HEAD`.\n  If that matching commit is already `HEAD`, the script exits without squashing.\n\n## Workflow\n\n- [ ] Step 1: Validate `asf-gerrit` remote and URLs.\n  - Success condition: both effective URLs exactly match\n    `ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`.\n  - Procedure:\n    - Try `git remote get-url asf-gerrit` and `git remote get-url --push asf-gerrit`.\n    - If remote does not exist, ask once for `\u003Cusername>`.\n    - Validate `\u003Cusername>` against `^[A-Za-z0-9._-]+$`.\n    - If `\u003Cusername>` is invalid, abort.\n    - If remote does not exist and `\u003Cusername>` is valid, run:\n      - `git remote add asf-gerrit ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`\n    - If remote exists but URL mismatch is detected, ask once for `\u003Cusername>`.\n    - Validate `\u003Cusername>` against `^[A-Za-z0-9._-]+$`.\n    - If `\u003Cusername>` is invalid, abort.\n    - If remote exists with URL mismatch and `\u003Cusername>` is valid, run:\n      - `git remote set-url asf-gerrit ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`\n      - `git remote set-url --push asf-gerrit ssh:\u002F\u002F\u003Cusername>@gerrit.cloudera.org:29418\u002FImpala-ASF`\n    - Re-run both URL checks. If either still mismatches, abort.\n- [ ] Step 2: Commit already-staged changes (pre-existing index state).\n  - Run staged check.\n  - If staged changes exist, run:\n    - `git commit -m \"WIP: commit staged files\"`\n  - If no staged changes, continue.\n- [ ] Step 3: Resolve unstaged tracked changes.\n  - Run unstaged tracked check.\n  - If no unstaged tracked changes, continue.\n  - If unstaged tracked changes exist, ask user to choose exactly one action:\n    - `stage`: run exactly `git add -u`\n    - `stash`: run `git stash push --keep-index -m \"stashed by git-fixup-push skill\"`.\n      Record that a stash was created; Step 9 will pop it after a successful push.\n  - If input is not exactly `stage` or `stash`, abort.\n- [ ] Step 4: Commit staged changes created by Step 3.\n  - Run staged check again.\n  - If staged changes exist, run:\n    - `git commit -m \"WIP: commit staged files\"`\n  - If no staged changes, continue.\n- [ ] Step 5: Squash commits for the current change.\n  - Run: `.agents\u002Fskills\u002Fgit-fixup-push\u002Fscripts\u002Ffixup.sh`\n  - If this command exits non-zero, abort.\n- [ ] Step 6: Run critique with bounded retry policy.\n  - Run from `${IMPALA_HOME}` exactly:\n    - `.\u002Fbin\u002Fjenkins\u002Fcritique-gerrit-review.py --dryrun`\n  - If critique passes, continue.\n  - If critique fails on first attempt:\n    - For each file and line number listed in the critique output, apply exactly the\n      code-style fix described (for example: trim trailing whitespace, fix indentation,\n      shorten lines to ≤90 characters). Do not make unrelated changes.\n    - Commit fixes with:\n      - `git commit -m \"fixed critique issues\"`\n    - Restart workflow from Step 1 and allow exactly one additional critique attempt.\n  - If critique fails on the second attempt, abort.\n- [ ] Step 7: Ensure `Assisted-by:` trailer is present on `HEAD`.\n  - Check trailers with:\n    - `git log -1 --pretty=%B | git interpret-trailers --only-trailers --unfold`\n  - If an `Assisted-by:` trailer is already present, do nothing and continue.\n  - If missing, ask user whether to add it.\n  - If user approves, amend commit message using `git interpret-trailers` and add exactly:\n    - `Assisted-by: \u003Cmodel> (\u003Cagent-name>)` where `\u003Cmodel>` is the name of the language\n      model and `\u003Cagent-name>` is the name of the agent executing this skill.\n  - Deterministic amend sequence:\n    - `tmp_msg=\"$(mktemp)\"`\n    - `git log -1 --pretty=%B | git interpret-trailers --if-exists=doNothing --trailer \"Assisted-by: \u003Cmodel> (\u003Cagent-name>)\" > \"$tmp_msg\"`\n    - `git commit --amend -F \"$tmp_msg\"`\n    - `rm -f \"$tmp_msg\"`\n  - Preserve Gerrit footer requirements:\n    - Keep `Change-Id:` in the final trailer paragraph.\n    - Keep trailer lines contiguous (no blank lines between trailer entries).\n  - If user declines, continue.\n  - If user input is invalid, abort.\n- [ ] Step 8: Push to Gerrit drafts.\n  - Run exactly:\n    - `git push asf-gerrit HEAD:refs\u002Fdrafts\u002Fmaster`\n  - If this command fails, abort and report the first actionable error.\n- [ ] Step 9: Pop stash if one was created in Step 3.\n  - If Step 3 recorded that a stash was created, run:\n    - `git stash pop`\n  - If `git stash pop` exits non-zero, report the error and stop; do not abort\n    silently (the push already succeeded).\n  - If no stash was created in Step 3, skip this step.\n\n## Gotchas\n\n- Gerrit requires `Change-Id:` to be in the final footer paragraph of the commit message.\n  Keep all trailer lines contiguous in that last paragraph (for example, `Change-Id:` and\n  `Assisted-by:` should be adjacent, with no blank line between them).\n- Git may not have `remote.\u003Cname>.pushurl` explicitly set. In that case,\n  `git remote get-url --push \u003Cname>` may still resolve via `remote.\u003Cname>.url`.\n- `git stash push --keep-index` stashes only unstaged tracked changes and preserves staged\n  changes for the next commit step.\n",{"name":5,"license":15,"metadata":37,"description":7},{"version":38},"1.0","master","e886395fc914b43fb29124d291ab83d46950f323",".agents\u002Fskills\u002Fgit-fixup-push",564,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fimpala","https:\u002F\u002Fimpala.apache.org","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-14 14:21:19",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add apache\u002Fimpala --skill git-fixup-push",{"tool":54,"command":55},"bunx","bunx skills add apache\u002Fimpala --skill git-fixup-push",{"tool":57,"command":58},"pnpm","pnpm dlx skills add apache\u002Fimpala --skill git-fixup-push","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fimpala\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgit-fixup-push\u002FSKILL.md",true,[62,68],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002FWCAG.md","REFERENCE","参考文档",7324,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Faccessibility\u002Freferences\u002FWCAG.md",{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Ffixup.sh","SCRIPT","脚本",2690,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fimpala\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fgit-fixup-push\u002Fscripts\u002Ffixup.sh",[75],{"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":32},"01M6ACJ56Z3JQDNFC659ATCCP3","build-one-cc-file","Build a single C++ file. Use when a single .cc file needs to be compiled to check for errors.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fimpala\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fbuild-one-cc-file\u002FSKILL.md",[],[82,83,84,85,86,25,87,88,28,30,31],"build one cc file","file","build","cc","check","c++","errors"]