glozow/bitcoin-notes/squashman
Claude Code and agent skill by glozow/bitcoin-notes
- community
Checking that the SKILL.md file is still in the repository.
Split staged changes or HEAD commit into `fixup!` commits that target the appropriate previous commits in the current branch.
Install
npx vskill@latest install glozow/bitcoin-notes/squashmanSKILL.md
Git Smart Fixup
Trigger
User invokes /smart-fixup or asks to split changes into fixup commits.
Arguments
--from-head: Use the HEAD commit instead of staged changes (will reset HEAD and recreate as fixups)--dry-run: Show what fixup commits would be created without actually creating them--base <ref>: Specify the base branch (default: auto-detect master/main)
Instructions
Step 1: Determine the Base Branch and Commit Range
- Find the merge base between current branch and main/master:
``bash git merge-base HEAD master ``
- Get the list of commits from merge base to HEAD (these are candidates for fixup targets):
``bash git log --oneline --reverse <merge-base>..HEAD ``
- Store commit hashes and their messages for later matching.
Step 2: Get the Changes to Split
If using staged changes (default):
If using `--from-head`:
Step 3: Analyze Each Hunk and Find Target Commits
For each changed file and hunk:
- Parse the diff to extract file paths and line ranges.
- For each modified/deleted line range, use git blame to find which commit last touched those lines:
``bash # For the version before our changes, blame the lines being modified git blame -l -L <start>,<end> <merge-base>..HEAD~1 -- <file> 2>/dev/null ``
If blaming the range fails (new lines), check the surrounding context: ``bash git blame -l -L <start-3>,<start> HEAD~1 -- <file> 2>/dev/null ``
- For each hunk, determine the target commit:
- Extract commit hashes from blame output
- Check if any blamed commit is within our branch's commits (between merge-base and HEAD)
- If multiple commits touched the lines, prefer the most recent one in our branch
- If no branch commit is found, this hunk will go into a "new" commit
Step 4: Group Changes by Target Commit
Create a mapping of target commits to their associated hunks:
Step 5: Create Fixup Commits
For each target commit with associated hunks:
- Stage only the relevant hunks using
git add -por by creating patch files:
``bash # Create a patch for this group of hunks # Apply with: git apply --cached <patch-file> ``
- Create the fixup commit:
``bash git commit --fixup=<target-commit-hash> ``
- For changes marked as "NEW" (not attributable to branch commits):
- If
--from-headwas used, use the original HEAD commit message - Otherwise, prompt the user for a commit message or create with a descriptive message
Step 6: Report Results
Display a summary:
Edge Cases
- No staged changes and no `--from-head`: Error with helpful message.
- New files: These typically become a new commit unless the user added them alongside modifications to existing code.
- Binary files: Skip blame analysis, treat as new changes.
- Renamed files: Use
git log --followto track through renames.
Implementation Notes
- Use
git diff --cached -U0for minimal context when parsing hunks - Parse unified diff format:
@@ -start,count +start,count @@ - Handle the case where blame returns commits outside the branch range
- Consider using
git log -Sorgit log -Gas fallback for finding related commits - Preserve the order of fixup commits to match the original commit order for cleaner rebases
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaudeskills/squashman/SKILL.md
Popularity
- Repository stars
- 129
- Repository forks
- 16
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/glozow/bitcoin-notes/squashman)