원클릭으로
squash-commits
Commit multiple related changes into a single commit with a descriptive message.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Commit multiple related changes into a single commit with a descriptive message.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Logs fleet operational work to the fleet vault and personal or non-fleet work to the user's iCloud Obsidian notes, including durable owner notes. Use when asked to log actions, document a session, update notes, or capture reusable context.
Synchronize global skill installations across machines. Updates allowlisted upstream skills, cleans up deprecated ones, installs local-owned shared skills, and verifies the result. Use when setting up a new machine, after pulling skill changes, or to audit an existing installation.
Renames BookThatApp issue worktree branches to the user's existing BTA branch convention, commits and pushes focused changes, and creates GitHub PRs from the repository template. Use when asked to prepare a BTA worktree branch and open a PR.
Creates and repairs BookThatApp sibling worktrees with matching local bta/* branches, shared Claude/notes symlinks, and Docker-safe local runtime files. Use when creating, standardizing, or fixing ../bta-* worktrees.
Teach the user a new skill or concept, within this workspace.
Adds BookThatApp daily standup entries to Obsidian daily notes from the given platform or user-provided links. Use when asked to update today's BTA standup, add INFO/HELP/FOCUS items, or record Vlad's daily status.
| name | squash-commits |
| description | Commit multiple related changes into a single commit with a descriptive message. |
Analyze commits on the current branch and prepare a rebase guide document for manual interactive rebase.
Get commits on current branch (use 10-char hashes for git compatibility)
git log master..HEAD --format="%h %s" --reverse
Analyze and group commits by identifying:
⚠️ CRITICAL: Maintain chronological order
--reverse flag in git log gives oldest-first order - preserve this EXACT order in the rebase scriptgit log --reverse outputCreate the rebase guide document
docs/rebases/{ticket-id}/YYYY-MM-DD.mdsc-61299 from feature/sc-61299/...)YYYY-MM-DD.md already exists, append -1, -2, etc.
2026-01-08.md2026-01-08-1.md2026-01-08-2.mdDocument structure:
# Squash Guide for {ticket-id}
Branch: `{branch-name}`
Total commits: X → Suggested: Y squashed commits
## Instructions
Run `git rebase -i master`, then replace the content with:
```txt
# Group 1: {Group Description}
pick {hash} {message}
s {hash} {message}
...
```
## Suggested Commit Messages
### Group 1 ({N} commits)
> First commit: "{first commit message}..."
```txt
{Type}: {Short summary}
{Detailed description of what this group of commits accomplishes}
Changes:
- {Bullet point of specific change}
- {Bullet point of specific change}
```
Each group's commit message section should include hints to help identify position during rebase:
This helps the user verify they're applying the correct commit message during interactive rebase.
Each squashed commit message should include:
See docs/rebases/sc-61299/2026-01-07.md for a real example.
After creating the squash guide, perform these steps:
Create backup branch (local only) before rebasing:
git branch backup/{original-branch-name}-before-rebase-{rebase-identifier}
{original-branch-name}: The current branch name (e.g., feature/short-name){rebase-identifier}: Matches the squash guide filename (e.g., 2026-01-08-1)Example:
git branch backup/feature/short-name-before-rebase-2026-01-08-1
If the goal is one squashed commit for the entire branch, automate the interactive rebase with sed:
GIT_SEQUENCE_EDITOR='sed -i "" -e "2,$s/^pick /s /"' \
GIT_EDITOR=true \
git rebase -i master
master..HEAD should become a single commitpick lines to sGIT_EDITOR=true accepts Git's default combined squash message so it can be replaced immediately afterwardAfter the automated rebase, amend the resulting commit message using the guide's suggested text:
git commit --amend
Paste the prepared commit message for the squashed group from the guide.
After completing the rebase and amend, push with force-lease:
git push --force-with-lease
Using --force-with-lease instead of --force ensures you don't accidentally overwrite commits pushed by others.
Commit the rebase guide after the squash succeeds
After the rebase, amend, and push succeed, commit the generated guide file so the notes repository does not remain dirty. The guide may live in a different repository from the code branch, especially when project docs are symlinked into the codebase from a notes repository.
Detect the repository that owns the guide file:
guide_path="docs/rebases/{ticket-id}/{rebase-identifier}.md"
guide_abs="$(cd "$(dirname "$guide_path")" && pwd -P)/$(basename "$guide_path")"
guide_repo="$(git -C "$(dirname "$guide_abs")" rev-parse --show-toplevel)"
git -C "$guide_repo" status --short -- "$guide_abs"
Then stage, commit, and push only the generated guide file from that owning repository:
git -C "$guide_repo" add "$guide_abs"
git -C "$guide_repo" commit -m "Docs: add {ticket-id} rebase guide"
git -C "$guide_repo" push
If multiple guide files were created for the same squash session, stage only those files. Do not include unrelated notes, reports, or working-tree changes.
If the guide contains multiple groups, do not use the single-command sed shortcut above. Follow the generated rebase plan manually so each contiguous group is squashed without reordering commits.