Git Squash
Consolidates multiple Git commits into a single, meaningful commit with a clear message, streamlining history.
Install on your platform
We auto-selected Claude Code based on this skillβs supported platforms.
Run in terminal (recommended)
claude mcp add git-squash npx -- -y @trustedskills/git-squash
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"git-squash": {
"command": "npx",
"args": [
"-y",
"@trustedskills/git-squash"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The git-squash skill allows an AI agent to combine multiple Git commits into a single commit. This is useful for cleaning up messy or incremental changes before merging branches, creating a more readable and understandable project history. It simplifies the commit history by consolidating related work into one logical unit.
When to use it
- Before merging a feature branch: Consolidate several small commits into a single, well-described commit that represents the complete feature.
- Cleaning up experimental code: Combine multiple "work in progress" commits into a cohesive final state.
- Simplifying complex histories: Reduce noise and improve clarity when reviewing or debugging past changes.
- Preparing for releases: Create a clean, linear commit history before tagging a release version.
Key capabilities
- Combines specified Git commits.
- Creates a new commit with the combined changes.
- Preserves original commit messages (can be modified).
Example prompts
- "Squash the last three commits into a single commit titled 'Fix: Issue #123'."
- "Combine all commits on this branch since tag 'v1.0' into one commit."
- βCan you squash these commits and make the new message explain the overall change?β
Tips & gotchas
- Requires basic Git knowledge to understand the implications of squashing commits.
- Squashed commits rewrite history, so avoid squashing commits that have already been pushed to a shared repository.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates β what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
π Community
Passed automated security scans.