skills/code-stacked-commit/SKILL.md
Manage stacked commits using Graphite. Use when the user wants to create multiple stacked commits, manage a commit stack, sync with remote, or submit PRs from a stack. Triggers on "stacked", "stack", "gt ", "graphite", or when working with multiple related commits.
npx skillsauth add martinffx/claude-code-atelier code-stacked-commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Manage stacked commits using Graphite - a CLI for creating and managing stacked PRs.
Ensure Graphite is installed:
brew install graphite-dev || npm install -g @graphite-dev/cli
gt stack
Shows all branches in the stack with their status (synced, to-push, in-progress).
gt branch create "feat(auth): add JWT authentication"
This:
-m for inline)Works best when you:
git add file1 file2gt branch create "feat: add feature"gt branch restack
Rebases all branches in the stack onto the latest main. Use before submitting or when main has advanced.
gt branch sync
Pull latest changes from remote and restack.
gt branch submit
Creates PRs for each branch in the stack. Opens browser to create the first PR; subsequent PRs link to it.
If you need to add more changes to a specific commit:
# Make your changes, stage them
git add .
# Amend to current branch
gt branch continue
# Go to parent branch
gt branch checkout @parent
# Go to child branch
gt branch checkout @child
# Start new feature work
git checkout main
gt branch create "feat(api): add user endpoint"
# Add user endpoint code
git add src/users/
gt branch continue # Amend to current commit
# Create next commit in stack
gt branch create "feat(api): add user validation"
# Add validation code
git add src/validation/
gt branch continue
# View stack
gt stack
# Restack before submit
gt branch restack
# Submit all as stacked PRs
gt branch submit
gt branch restack before submitting to ensure clean historygt branch sync often when working with others| Issue | Solution |
|-------|----------|
| Conflicts during restack | Resolve in editor, then gt branch continue |
| Stack broken | gt branch repair to fix detached HEAD |
| Too many branches | gt branch delete <name> to remove (won't delete remote) |
Follow conventional commits within the Graphite workflow:
<type>(<scope>): <subject>
[optional body]
Examples:
feat(api): add user profile endpoint
fix(db): resolve connection pool exhaustion
docs(readme): update installation instructions
development
Security architecture and threat modeling knowledge. Auto-invokes when designing features that handle untrusted data, authentication, authorization, external integrations, file uploads, or sensitive data. Provides risk assessment frameworks, trust boundary analysis, and security design principles — not implementation code.
testing
Adversarial review of non-trivial decisions using fresh-context scrutiny. Use when correctness matters more than speed, when stakes are high (production, security-sensitive logic, irreversible operations), or before committing significant architectural or implementation choices.
development
Compact the current conversation into a handoff document for another agent to pick up.
testing
Socratic interrogation of plans against the project's domain model and documented decisions. Use when the user wants to stress-test a plan, clarify terminology, or validate assumptions against existing domain language. Updates CONTEXT.md and ADRs inline as decisions crystallise.