SourceControl
Professional git workflow automation with conventional commits, mode-aware interaction, ticket reference parsing, and clean commit rules.
Customization
Before executing, check for user customizations at:
~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/SourceControl/
If this directory exists, load and apply any PREFERENCES.md configurations (commit templates, branch naming conventions, protected branches). If not, proceed with defaults.
Prerequisites
LifeOS must be installed. Check ~/.claude/LIFEOS/VERSION. If missing, inform user: "LifeOS is required. Run /setup:lifeos to install."
Workflow Routing
| Workflow | Trigger | File |
|----------|---------|------|
| Commit | "commit", default invocation, git changes | Workflows/Commit.md |
| CreateBranch | "branch", "create branch", spec folder ref | Workflows/CreateBranch.md |
| CreatePR | "PR", "pull request", "create PR" | Workflows/CreatePR.md |
Auto-Detection
Default invocation routes to Commit workflow.
Configuration
The skill reads configuration from .claude/hooks.json (config section) when available:
config.git.auto_push— Auto-push after commitconfig.git.branch_protection— Protected branches listconfig.git.conventional_commits— Enforce conventional formatconfig.git.sign_commits— GPG signing
Examples
Example 1: Simple commit
User: "/buddy:commit"
-> Detects changes, stages, generates conventional commit message
-> Uses AskUserQuestion for confirmation
-> Creates commit, offers to push
Example 2: Commit with ticket reference
User: "/buddy:commit SDO-123 --yes"
-> Auto-yes mode, stages all changes
-> Generates: "SDO-123: feat(auth): add JWT validation"
-> Commits and pushes automatically
Example 3: Create pull request
User: "/buddy:commit PR"
-> Routes to CreatePR workflow
-> Ensures changes committed, generates PR description
-> Creates PR via gh CLI, returns URL