branch-and-commit
Skill2 starsChanged 4 months agoMITView on GitHub
Intelligently groups and commits changes based on revertibility, intention, and logical dependencies. Optionally creates feature branches. Orders commits for optimal review and prepares for PR using Arlo's Commit Notation. Use when: ready to commit multiple changes, organizing work on current or new branch, preparing for PR. Triggers: branch and commit, branch-and-commit, smart commit, organize changes, commit and branch, prepare branch, structure commits. Related: commit (principles), commit-notation (formatting), handling-pull-requests (PR creation).
- Commits and pushes
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adopt-agentic-workflowSkill
- byeSkill
- commit-notationSkill
- commitSkill
- dedicated-browserSkill
- handling-pull-requestsSkill
- jest-testing-conventionsSkill
- markdownSkill
- pnpmSkill
- reality-checkSkill
- schweizer-schreibweiseSkill
- show-your-workSkill
- test-driven-developmentSkill
- triage-ticketSkill
- typescript-strict-patternsSkill
- working-with-bitbucket-apiSkill
- working-with-bitbucket-webSkill
- working-with-jira-webSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
45 rules. About 0 are common, 27 are distinctive, and 18 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this skill when you have uncommitted changes and need to:
- Distinctive: line 31
Analyzing: all uncommitted changes (file types, diff content, intentions, security)
- Distinctive: line 52
File category: TEST, DOCS, CONFIG, SOURCE
- Distinctive: line 54
Change nature: Import-only, comment-only, mixed changes
- Distinctive: line 58
Before proceeding, scan diffs for sensitive data:
- Distinctive: line 65
If potentially sensitive data is found:
- Distinctive: line 73
Don't analyze diff content line-by-line
- Very specific: line 75
Ask user: "<file> changed (X lines).
- Distinctive: line 105
Add missing changes (e.g., "oh, I should add loading state")
- Distinctive: line 128
After initial grouping, refine based on:
- Distinctive: line 143
Test coverage (do tests exist?
- Very specific: line 212
Ask: "You're on <current-branch>.
- Very specific: line 217
Commit notation (e.g., F: Add user authentication)
- Very specific: line 221
If needs_new_branch = false: "Using current branch: <name>"
- Very specific: line 222
If needs_new_branch = true: "Creating new branch: <name>"
- Very specific: line 252
Project Override: Use # prefix for ticket numbers (e.g., #FOO-123)
- Very specific: line 276
Key insight: Don't rely solely on needs_new_branch flag.
- Distinctive: line 284
If YES → Continue to step 2
- Distinctive: line 297
When executing this skill, Claude should use the following tools and patterns:
- Very specific: line 316
Use multiSelect: false (one answer per question)
- Distinctive: line 336
When current branch matches any of these, the skill will require creating a feature branch (Case A logic).
- Distinctive: line 387
Use AskUserQuestion with structure:
- Very specific: line 442
Ask: "Git command failed: <error>.
- Very specific: line 452
Ask: "Failed to stage <files>: <error>.
- Very specific: line 458
Ask: "Pre-commit hook failed: <output>.
- Distinctive: line 468
Ask user how to proceed (don't retry automatically)
- Distinctive: line 474
Check if it's the current branch
- Very specific: line 475
If current: "Already on branch <name>.
- Very specific: line 477
If different: "Branch <name> exists.
- Distinctive: line 480
No branch creation, proceed directly to commits
- Distinctive: line 512
Ask: "Should I check stashed changes or staged changes only?"
- Distinctive: line 521
Ask: "This looks sensitive.
- Distinctive: line 539
Ask: "Categorize as E (environment) without detailed analysis?"
- Distinctive: line 540
Don't try to analyze massive diffs line-by-line
- Very specific: line 546
Check branch name: Look for pattern XXX-123 (extract without #)
- Distinctive: line 548
Ask user: If not found
- Very specific: line 550
Format in commit: Add # prefix when writing commit message (e.g., #FOO-123)
- Very specific: line 563
UPPERCASE intentions: Use : separator (e.g., F: Add feature, B: Fix bug)
- Distinctive: line 621
Follow "one concern per commit" principle
- Distinctive: line 631
Before claiming a branch is complete, capture evidence rather than asserting it
- Very specific: line 712
All changes: oldMethod → newMethod
- Distinctive: line 765
Create PR without asking user preference
- Distinctive: line 772
Ask in-depth, contextual questions during interview
- Distinctive: line 775
Create new branch only when explicitly chosen or on a protected branch
- Very specific: line 777
Use #FOO-123 format for ticket numbers
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Branch and Commit
Automates the workflow of analyzing uncommitted changes, grouping them into atomic commits with proper notation, and creating a clean feature branch ready for PR.
When to Use This Skill
Use this skill when you have uncommitted changes and need to:
- Group changes into logical, atomic commits
- Apply proper risk notation (Arlo's Commit Notation)
- Organize commits on current branch OR create a new feature branch
- Prepare changes for pull request review
Do NOT use for:
- Branch splitting or rebasing existing commits
- Amending published commits
- Reorganizing pushed commits
Overview
This skill transforms messy working directory changes into a clean commit history by:
- Analyzing all uncommitted changes (file types, diff content, intentions, security)
- Interviewing you with in-depth questions to uncover missing changes and improvements
- Grouping changes by intention and risk level (after understanding context from interview)
- Ordering commits optimally (provably safe changes first, features last)
- Deciding whether to use current branch or create new feature branch
- Committing with proper commit messages
- Preparing for PR creation (optional)
Workflow
Phase 1: Analysis (Read-Only)
The skill detects all changes and categorizes each file:
git status --porcelain
git diff HEAD --stat
git diff HEAD --cached --statFor each changed file, it determines:
- File category: TEST, DOCS, CONFIG, SOURCE
- Intention: F (feature), B (bugfix), R (refactoring), D (docs), T (test), E (environment). Tool-assisted changes (IDE rename, formatter, import updates) are R; comment-only changes are D.
- Change nature: Import-only, comment-only, mixed changes
Security Checks:
Before proceeding, scan diffs for sensitive data:
- API keys: Long alphanumeric strings (32+ chars)
- AWS credentials:
AKIA[A-Z0-9]{16}pattern - Private keys:
-----BEGIN.*PRIVATE KEY----- - Passwords: Common variable names in plain text (like
password =orPASSWORD =) - Tokens: patterns like
token =orauth_token =orbearer =
If potentially sensitive data is found:
- Warn user with file path and line number
- Show the matched pattern (partially redacted)
- Ask: "This looks like sensitive data in
<file>. Should we exclude this file or is it safe?"
Large File Handling:
For files with >1000 lines changed:
- Don't analyze diff content line-by-line
- Categorize by path pattern only
- Ask user: "
<file>changed (X lines). Categorize as<intention>based on path?"
Phase 2: In-Depth Interview
This is where the magic happens. The skill conducts a 2-4 question interview to:
- Uncover missing changes you haven't thought of yet
- Identify edge cases not yet handled
- Explore technical decisions and tradeoffs
- Understand UI/UX implications
- Reveal better organization of commits
Example questions (contextual, not obvious):
For authentication changes:
- "How should the system handle token refresh when user has multiple tabs open?"
- "What's the UX when a user's session expires mid-form-fill?"
- "Should admin users bypass rate limiting, or should they be rate-limited differently?"
For refactoring:
- "Are there other places using this same pattern that should also be refactored?"
- "Does this change affect any performance-critical code paths?"
- "Will this make it easier or harder to add [related feature] in the future?"
For UI changes:
- "How should this behave on mobile vs desktop?"
- "What happens if the data takes 5 seconds to load?"
- "Should keyboard navigation work differently here?"
Interview results are used to:
- Add missing changes (e.g., "oh, I should add loading state")
- Improve existing changes (e.g., handle identified edge case)
- Inform grouping decisions (e.g., separate concerns revealed during discussion)
- Understand dependencies (e.g., "these two are related")
Why interview first:
- Reveals missing changes before grouping
- Uncovers dependencies that affect commit organization
- Provides context for better risk assessment
- Prevents having to regroup after discovering issues
Phase 3: Initial Grouping
Now that we understand the full context from the interview, changes are grouped by:
- Single intention per commit: Features separate from refactorings separate from docs
- Test + implementation together: Tests and their implementation in same commit
- Related refactorings together: Structural changes grouped logically
- Separate automated from manual: Tool-generated separate from hand-written
- Config changes separate: Environment changes isolated
- Dependencies revealed in interview: Honor relationships discovered during interview
Phase 4: Refinement
After initial grouping, refine based on:
- Any new changes added during interview
- Dependencies identified during interview
- Better logical organization revealed
Phase 5: Risk Level Determination
The skill takes each commit group's annotation from commit-notation's criteria.
It does NOT reimplement the risk logic. Instead:
- Gather context for each commit group:
- Intention type (F/B/R/D/T/E)
- Files changed (count, types)
- Lines of code added/removed
- Test coverage (do tests exist? do they pass?)
- Change nature (imports-only? typo fix? IDE-assisted?)
- Apply commit-notation's risk criteria: Load the commit-notation skill once and apply its risk-level criteria (its REFERENCE.md tables) to each group's context: intention, LoC, test status, tool-assisted. Don't invent thresholds of your own. Record each group's annotation (e.g.
rfor a type-checked IDE rename) for Phase 8.
Why this matters:
- Lowercase (r, d, e, t) = Provably safe, don't need review, can touch MANY files
- UPPERCASE (R, D, E, T, F, B) = Test-verified, need review
- !! suffix = Risky, large, or incompletely verified
- ** suffix = Broken, WIP
Phase 6: Commit Ordering
Commits are ordered for optimal review:
- e/E (Environment) - dependencies, config (foundation)
- r/R (Refactoring) - IDE renames, import updates, formatter runs, structural prep for features
- t/T (Test-only) - if standalone
- F/B (Features/Bugfixes) - in dependency order (main review focus)
- d/D (Documentation) - standalone docs and comment-only changes
Rationale:
- Lowercase first - Provably safe, don't need review, clear the noise
- Infrastructure before behavior - Enable subsequent work
- Refactoring before features - Prepare the ground
- Features last - Main review focus, reviewers see cleaned-up code
Phase 7: User Interaction
Step 1: Detect current branch:
current_branch=$(git branch --show-current)Branch Decision Flowchart:
digraph branch_decision {
rankdir=TD;
node [shape=box, style=rounded];
detect [label="Detect current branch\n(git branch --show-current)"];
is_protected [label="Is branch protected?\n(main/master/develop/trunk/\nstaging/production)", shape=diamond];
case_a [label="Case A: Protected Branch\nInform: 'Creating feature branch required'\nPropose branch name\nSet needs_new_branch = true", style="rounded,filled", fillcolor="#ffcccc"];
ask_user [label="Case B: Feature Branch\nAsk: 'Use this branch?'", shape=diamond, style="filled", fillcolor="#ccf0ff"];
use_current [label="User: YES\nUse current branch\nSet needs_new_branch = false", style="rounded,filled", fillcolor="#ccffcc"];
create_new [label="User: NO\nPropose new branch name\nSet needs_new_branch = true", style="rounded,filled", fillcolor="#ffcccc"];
confirm [label="Final Confirmation\nShow commits + branch strategy"];
detect -> is_protected;
is_protected -> case_a [label="Yes"];
is_protected -> ask_user [label="No"];
ask_user -> use_current [label="Yes"];
ask_user -> create_new [label="No"];
case_a -> confirm;
use_current -> confirm;
create_new -> confirm;
}Step 2: Branch decision logic:
Case A: User on a protected branch (see Protected Branches Configuration)
- Inform: "You're on
<branch>. Creating a feature branch is required." - Propose branch name based on detected ticket or first commit
- Allow custom input
- Mark:
needs_new_branch = true
Case B: User on feature branch
- Ask: "You're on
<current-branch>. Use this branch for commits?"- Yes → Mark:
needs_new_branch = false, use existing branch - No → Propose new branch name, mark:
needs_new_branch = true
- Yes → Mark:
Step 3: Final confirmation - Show refined commits with:
- Commit notation (e.g.,
F: Add user authentication) - Files included
- Ticket number (if applicable)
- Branch strategy:
- If
needs_new_branch = false: "Using current branch:<name>" - If
needs_new_branch = true: "Creating new branch:<name>"
- If
Options: Proceed / Adjust / Cancel
Phase 8: Execution
Step 1: Create branch (only if needs_new_branch = true):
# Create and switch to new branch
# Skip this step if using existing branch
git checkout -b <branch-name>Step 2: Create commits:
For each commit group:
# Stage files
git add <file1> <file2> ...
# Create commit message using commit-notation format
git commit -m "$(cat <<'EOF'
X: Summary in active voice
#TICKET-123
EOF
)"Project Override: Use # prefix for ticket numbers (e.g., #FOO-123)
- This overrides Quatico standard which uses no prefix
- Required for this project's conventions
Step 3: Push commits:
# Always check if branch tracks remote (regardless of needs_new_branch flag)
# This handles edge case: user on local-only branch that doesn't track remote yet
current_branch=$(git branch --show-current)
if git rev-parse --abbrev-ref @{upstream} &>/dev/null; then
# Branch already tracks remote - just push
echo "Pushing to existing upstream..."
git push
else
# Branch doesn't track remote yet - set upstream and push
# (Can happen even if needs_new_branch=false: user on local-only feature branch)
echo "Setting upstream and pushing..."
git push -u origin "$current_branch"
fiKey insight: Don't rely solely on needs_new_branch flag. A user might be on an existing local branch that never tracked remote. Always check tracking status to determine correct push command.
Phase 9: PR Preparation (Optional)
Two-step question workflow:
- Ask: "Would you like a PR description?"
- If NO → Done
- If YES → Continue to step 2
- Ask: "How should I provide the PR description?"
- Option A: "Just generate markdown description" → Generate and display markdown
- Option B: "Create the PR with description" → Chain to
handling-pull-requestsskill
Why two steps:
- You might want description ready but create PR manually
- You might want to edit description before creating PR
- You might just want commits without any PR preparation
Implementation Notes
When executing this skill, Claude should use the following tools and patterns:
Tools to Use
- Bash tool for all git operations:
# Detection git status --porcelain git diff HEAD git diff HEAD --stat # Execution git add <files> git commit -m "<message>" git push -u origin <branch> - AskUserQuestion tool for interview phase:
- Minimum 2 questions, maximum 4
- Use
multiSelect: false(one answer per question) - Provide 2-4 options per question
- Questions must be contextual, not obvious
- Skill tool to load
commit-notationonce; apply its criteria to each group - Read tool for analyzing file contents (if needed):
- Check file patterns
- Analyze diff content for security issues
Protected Branches Configuration
The skill treats these branches as "protected" - requiring new branch creation:
mainmasterdeveloptrunkstagingproduction
When current branch matches any of these, the skill will require creating a feature branch (Case A logic).
Detection logic:
current_branch=$(git branch --show-current)
protected_branches=("main" "master" "develop" "trunk" "staging" "production")
if [[ " ${protected_branches[@]} " =~ " ${current_branch} " ]]; then
# Case A: Protected branch - must create feature branch
echo "You're on protected branch '$current_branch'. Creating a feature branch is required."
# Propose branch name...
else
# Case B: Feature branch - ask user preference
echo "You're on '$current_branch'. Use this branch for commits?"
# Get user choice...
fiBranches NOT in this list are considered "feature branches" and trigger the "use this branch?" prompt.
Edge cases:
release/1.0→ Considered feature branch (ask user)hotfix/critical→ Considered feature branch (ask user)- Custom base branches → If you use different base branch names (e.g.,
devinstead ofdevelop), add them to the protected list
Implementation Flow
1. Run git commands (Bash)
2. Analyze changes (pattern matching, Read tool if needed)
3. Check for security issues (scan diffs)
4. Interview user (AskUserQuestion - 2-4 contextual questions)
5. Group changes based on interview insights
6. For each group:
a. Gather context
b. Apply commit-notation's risk criteria
c. Store annotation for later
7. Detect current branch (Bash - git branch --show-current)
8. Branch decision:
- If on a protected branch (see Protected Branches Configuration): Propose new branch, set needs_new_branch=true
- If on feature branch: Ask "Use this branch?", set needs_new_branch accordingly
9. Show proposed commits with branch strategy (text output)
10. Get confirmation (AskUserQuestion or wait for approval)
11. If needs_new_branch=true: Create branch (Bash - git checkout -b)
12. Execute commits (Bash - git add, git commit)
13. Push: `git push` if the branch tracks an upstream, else `git push -u origin <branch>` (Phase 8 Step 3)
14. Optional: PR workflow (two-step questions)Pattern: Interview Questions
Use AskUserQuestion with structure:
// Example for authentication changes
{
questions: [
{
question: "How should the system handle token refresh when user has multiple tabs open?",
header: "Multi-tab auth",
multiSelect: false,
options: [
{
label: "Sync across tabs",
description: "Use BroadcastChannel to sync token refresh across all tabs"
},
{
label: "Independent refresh",
description: "Each tab manages its own token refresh independently"
},
{
label: "Single leader tab",
description: "One tab handles refresh, others listen for updates"
}
]
},
{
question: "What's the UX when a user's session expires mid-form-fill?",
header: "Session expiry",
multiSelect: false,
options: [
{
label: "Save draft & redirect",
description: "Save form data locally, then redirect to login"
},
{
label: "Modal login",
description: "Show login modal overlay, preserve form state"
},
{
label: "Lose data & redirect",
description: "Clear form and redirect to login page"
}
]
}
]
}Error Handling
Git Command Failures
If git status, git diff, or analysis commands fail:
- Show the error to user
- Ask: "Git command failed:
<error>. How should I proceed?" - Options:
- Retry the command
- Skip this step
- Abort the skill
If git add fails:
- Show which files failed
- Show the error message
- Ask: "Failed to stage
<files>:<error>. Continue with successfully staged files?"
If git commit fails due to hooks:
- Show hook output
- DO NOT use
--no-verifywithout permission - Ask: "Pre-commit hook failed:
<output>. What should I do?" - Options:
- Fix the issue and retry
- Skip hooks with --no-verify (requires explicit user permission)
- Abort
If git push fails:
- Show push error
- Common causes: authentication, branch exists upstream, conflicts
- Ask user how to proceed (don't retry automatically)
Branch Already Exists
If proposed branch name exists (only relevant when creating new branch):
- Check if it's the current branch
- If current: "Already on branch
<name>. Use this branch for commits?"- This should have been caught in Phase 7 detection
- If different: "Branch
<name>exists. Choose different name or switch to it?"
If user chose to use current branch in Phase 7:
- No branch creation, proceed directly to commits
Detached HEAD State
If git branch --show-current returns empty string:
- User is in detached HEAD state (not on any branch)
- Detect with additional check:
current_branch=$(git branch --show-current) if [ -z "$current_branch" ]; then # Detached HEAD state echo "You're not on a branch (detached HEAD state)." fi - Inform user: "You're in detached HEAD state (not on any branch). Creating a feature branch is required to save your commits."
- Propose branch name based on:
- Current commit:
git log -1 --format=%s(use commit message) - Or ticket number if detected
- Or generic:
feature/detached-work-$(date +%s)
- Current commit:
- Proceed with Case A logic (mandatory branch creation)
Why this matters: Commits made in detached HEAD are easy to lose. The skill protects users by forcing branch creation.
No Changes Detected
If git status shows no changes:
- Inform user: "No uncommitted changes detected."
- Ask: "Should I check stashed changes or staged changes only?"
Security Check Failures
If sensitive data detected:
- STOP before grouping
- Show file path and line number (redact actual value)
- Example: "Potential API key in
src/config.ts:12(pattern:AKIA...)" - Ask: "This looks sensitive. Options:"
- Exclude this file from commits
- It's safe (test data, example)
- Abort and let me remove it
Interview Reveals Blockers
If interview uncovers issues:
- User says: "Oh, I need to add feature X first"
- Pause the workflow
- Inform: "Sounds like you need to make additional changes. Run this skill again when ready."
Large File Warnings
For files >1000 lines changed:
- Show warning: "
package-lock.jsonchanged (5000 lines)" - Ask: "Categorize as E (environment) without detailed analysis?"
- Don't try to analyze massive diffs line-by-line
Ticket Number Detection
The skill automatically detects ticket numbers:
- Check branch name: Look for pattern
XXX-123(extract without#) - Check recent commits:
git log origin/main..HEAD --oneline(look for#XXX-123) - Ask user: If not found
Format in commit: Add # prefix when writing commit message (e.g., #FOO-123)
Commit Message Format
Based on /commit-notation skill with project override for ticket format:
<risk-level><intention>[: ]<summary>
#<TICKET-NUMBER>Separator Convention:
- UPPERCASE intentions: Use
:separator (e.g.,F: Add feature,B: Fix bug) - Lowercase intentions: Omit separator (e.g.,
r Rename method,r Extract function) - Rationale: Lowercase = provably safe, less formal notation
Examples:
F: Add user authentication endpoint+#FOO-123(uppercase with:)r Extract calculateTotal method+#FOO-123(lowercase without:)Bwith risk suffix:Fix race condition in event handler+#BAR-456(uppercase with:)E: Add axios-retry dependency+ (optional ticket)r Update imports after file move+#FOO-123(lowercase without:)
Change Categorization
Intention Detection (F/B/R/D/T/E)
Feature (F) vs Bugfix (B): B when the diff repairs existing behavior that was wrong, F when it adds or changes intended behavior. Use the ticket type and the interview; ask if unclear.
Refactoring (R): structural changes with no behavior change, including tool-assisted ones (IDE rename, formatter, import updates).
Test-only (T):
# File is test file AND no source files in same group
path =~ /\.(spec|test)\.(ts|js|tsx|jsx)$/Documentation (D):
# Markdown files, README, docs/
path =~ /\.md$|^docs\//Environment (E):
# Config files, dependencies
path =~ /\.(json|yml|yaml)$|package\.json|tsconfig/Comment-only changes are D.
Context for commit-notation
For each commit group, collect:
- Intention: F/B/R/D/T/E
- File count: How many files in this commit
- LoC: Lines added + removed
- Test status: Tests exist? Tests pass?
- Change nature: Describe what changed (imports-only, typo fix, new function, etc.)
- Tool-assisted: IDE refactoring? Manual edit?
Then apply commit-notation's risk criteria to this context to choose the annotation.
Integration with Existing Skills
With commit-notation:
- Apply its risk-level criteria to each commit group (intention, LoC, file count, change nature, test status), so annotations match manual commits
- Also use it for final message formatting
With commit:
- Follow "one concern per commit" principle
- Respect "what belongs together" guidelines
- Reference for atomic commit rules
With handling-pull-requests:
- Two-step PR workflow after commits
- Can generate markdown description or create full PR
- Commits already use proper notation for PR description generation
With show-your-work:
- Before claiming a branch is complete, capture evidence rather than asserting it
- Long-running or multi-session work should leave an artefact, not a summary
Examples
Example 1: Using Current Branch
Scenario:
- Already on branch:
feature/auth-improvements - Changes: authentication improvements
Changes:
src/auth.ts- improved token validationsrc/auth.spec.ts- additional tests
Phase 7 interaction:
You're on `feature/auth-improvements`. Use this branch for commits?
→ YesResult:
# No branch creation
# Commits directly to feature/auth-improvements
# Commit 1
F: Improve token validation logic
#FOO-123
# Push
git pushExample 2: Simple Feature (New Branch)
Changes:
src/auth.ts- new authentication functionsrc/auth.spec.ts- unit tests
Result:
# Commit 1
F: Add user authentication endpoint
#FOO-123Example 3: Mixed Changes
Changes:
src/feature.ts- new featuresrc/feature.spec.ts- testsREADME.md- documentationpackage.json- new dependency
Interview reveals: "Should add loading state for async operation"
Result:
# Commit 1
E: Add axios dependency
#FOO-123
# Commit 2 (after adding loading state based on interview)
F: Add data fetching feature with loading state
#FOO-123
# Commit 3
D: Document data fetching API
#FOO-123Example 4: IDE Rename
Changes:
- 50 files changed
- All changes:
oldMethod→newMethod - TypeScript verified
Result:
# Commit 1
r Rename oldMethod to newMethod
#FOO-123Note: Lowercase r because provably safe (IDE-assisted, type-checked)
Note: All 50 files in one commit because it's safe to do so
Example 5: Typo Fix Across Docs
Changes:
- 10 markdown files
- All changes:
recieve→receive
Result:
# Commit 1
d Fix typo: recieve → receiveNote: Lowercase d because provably safe (simple typo fix)
Note: All 10 files in one commit because it's safe to do so
Success Criteria
✓ Skill correctly categorizes files by intention (F/B/R/D/T/E)
✓ Conducts in-depth interview (2-4 contextual questions)
✓ Risk level of each commit group follows commit-notation's criteria
✓ Commits grouped logically (test+impl together, intentions separate)
✓ Provably safe commits (lowercase) can touch many files without being split
✓ Commits ordered optimally (lowercase first, then UPPERCASE, features last)
✓ Detects current branch and offers to use it (if on feature branch)
✓ Creates new branch only when user chooses to (or when on a protected branch)
✓ Correctly handles both workflows: current branch vs new branch
✓ Two-step PR workflow works (markdown generation + optional PR creation)
✓ Uses # prefix for ticket numbers in commit messages
✓ Handles detached HEAD state gracefully (forces branch creation)
✓ Always checks upstream tracking status before pushing (not just flag-based)
✓ Correctly identifies protected vs feature branches using explicit list
✓ Handles local-only branches (no upstream tracking) without errors
Common Pitfalls
Don't:
- Reimplement risk level logic (use
/commit-notationinstead) - Split provably safe changes across multiple commits
- Skip the interview phase (it reveals critical improvements)
- Create PR without asking user preference
- Force branch creation when user is already on a feature branch
- Forget to detect current branch before proposing new one
- Forget
#prefix on ticket numbers
Do:
- Apply commit-notation's criteria to every commit group
- Ask in-depth, contextual questions during interview
- Allow many files in lowercase commits (they're provably safe)
- Detect current branch and ask if user wants to use it
- Create new branch only when explicitly chosen or on a protected branch
- Give user choice on PR description (markdown vs full PR)
- Use
#FOO-123format for ticket numbers
See Also
- REFERENCE.md - Detailed categorization rules and examples
/commit-notation- Commit message formatting and risk level logic/commit- Atomic commit principles/handling-pull-requests- PR creation workflow
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

