git-workflow-helper
Automates git workflow tasks including status checks, branch creation, file staging, conventional commit message generation, and pull request creation with gh CLI. Use this skill when you need to commit changes, create PRs, check git status, create branches, push code, or generate commit messages. Ensures proper git workflow and commit standards.
Best use case
git-workflow-helper is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Automates git workflow tasks including status checks, branch creation, file staging, conventional commit message generation, and pull request creation with gh CLI. Use this skill when you need to commit changes, create PRs, check git status, create branches, push code, or generate commit messages. Ensures proper git workflow and commit standards.
Teams using git-workflow-helper should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/git-workflow-helper/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How git-workflow-helper Compares
| Feature / Agent | git-workflow-helper | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Automates git workflow tasks including status checks, branch creation, file staging, conventional commit message generation, and pull request creation with gh CLI. Use this skill when you need to commit changes, create PRs, check git status, create branches, push code, or generate commit messages. Ensures proper git workflow and commit standards.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Git Workflow Helper Skill
## Purpose
Automates common git workflow tasks while enforcing best practices and commit standards. Implements FR-008 from the feature specification. Follows constitutional requirement for feature branching and proper git workflow.
## How It Works
### Step 1: Git Status Check
Always start with status to understand current state:
```bash
# Check git status
git status
# Check branch name
git branch --show-current
# Check for uncommitted changes
git diff --stat
git diff --cached --stat
# Check unpushed commits
git log @{u}.. --oneline
```
Report:
```
📊 Git Status
Branch: feature/new-feature
Tracking: origin/feature/new-feature
Changes:
Modified: 3 files
Staged: 1 file
Untracked: 2 files
Unpushed commits: 2
Files:
M src/api/users.ts
M tests/users.test.ts
?? docs/API.md
```
### Step 2: Branch Creation
Create feature branch following naming conventions:
```bash
# Feature branch
git checkout -b feature/feature-name
# Bug fix branch
git checkout -b fix/bug-description
# Documentation branch
git checkout -b docs/topic
# Test branch
git checkout -b test/test-description
# Refactor branch
git checkout -b refactor/refactor-description
```
### Step 3: Stage Files
Intelligently stage relevant files:
```bash
# Stage specific files
git add src/api/users.ts src/models/user.ts
# Stage all in directory
git add src/
# Check what will be committed
git diff --cached
```
Avoid staging:
- Build artifacts (dist/, build/)
- Dependencies (node_modules/)
- Secrets (.env, credentials.json)
- Temporary files (*.tmp, *.log)
### Step 4: Generate Conventional Commit Message
Follow conventional commit format:
**Format**: `<type>(<scope>): <description>`
**Types**:
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation only
- `style`: Formatting changes
- `refactor`: Code restructuring
- `test`: Adding/updating tests
- `chore`: Build process or auxiliary tools
**Example Generation**:
Analyze staged changes:
```bash
git diff --cached --name-only
# Output:
# src/api/users.ts
# src/models/user.ts
# tests/users.test.ts
```
Analyze diff content:
```bash
git diff --cached src/api/users.ts
# Detect: New endpoint added
```
Generated message:
```
feat(api): Add user profile update endpoint
Implements user profile update functionality with validation
and authentication checks. Includes tests for success and error cases.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
```
### Step 5: Create Commit
```bash
# Create commit with generated message
git commit -m "$(cat <<'EOF'
feat(api): Add user profile update endpoint
Implements user profile update functionality with validation
and authentication checks. Includes tests for success and error cases.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
# Verify commit
git log -1 --format="%h %s"
```
### Step 6: Push Changes
```bash
# Push to remote (creates branch if needed)
git push -u origin feature/new-feature
# Verify push
git log @{u}.. --oneline
# (should be empty - all commits pushed)
```
### Step 7: Create Pull Request
Use gh CLI to create PR. Open as **draft** during plan/build stages; mark ready at delivery.
```bash
# Generate PR description from commits
PR_TITLE="feat(api): User Profile Management"
PR_BODY=$(git log origin/main..HEAD --format="- %s")
# Create draft PR (default — used at plan stage)
gh pr create --draft \
--title "$PR_TITLE" \
--body "$(cat <<EOF
## Summary
${PR_BODY}
## Changes
- Added user profile update endpoint
- Implemented validation and auth checks
- Added comprehensive tests
## Testing
- Unit tests: ✓ Pass
- Integration tests: ✓ Pass
- Manual testing: ✓ Completed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
# Mark PR ready for review (used at deliver stage)
gh pr ready
# Get PR URL
gh pr view --web
```
**Draft vs Ready**:
- `/aod.plan` opens a draft PR at branch creation for early visibility
- `/aod.deliver` marks the PR ready via `gh pr ready` when work is complete
- If no draft PR exists (e.g., ad-hoc branches), create a regular PR directly
## Examples
### Example 1: Commit Changes
**User Query**: "Commit my changes"
**Skill Actions**:
1. Run `git status` - 3 modified files
2. Analyze changes - new feature added
3. Stage relevant files
4. Generate conventional commit message
5. Create commit
6. Verify commit created
**Result**:
```
✅ Changes Committed
Branch: feature/user-profiles
Commit: a3f2c1d
Message:
feat(api): Add user profile endpoints
Implements GET and PUT endpoints for user profile management
with validation and authentication.
🤖 Generated with Claude Code
Staged files:
src/api/users.ts
src/models/user.ts
tests/users.test.ts
Next steps:
git push -u origin feature/user-profiles
```
### Example 2: Create Pull Request
**User Query**: "Create a pull request"
**Skill Actions**:
1. Check git status - on feature branch
2. Verify commits pushed to origin
3. Generate PR title and description from commits
4. Create PR using gh CLI
5. Get PR URL
**Result**:
```
✅ Pull Request Created
PR #42: feat(api): User Profile Management
URL: https://github.com/user/repo/pull/42
Summary:
- feat(api): Add user profile endpoints
- test(api): Add profile endpoint tests
- docs(api): Document profile API
Branch: feature/user-profiles → main
Status: Ready for review
The PR has been created successfully. Share the URL with your team!
```
### Example 3: Branch Creation
**User Query**: "Create a branch for the new notification system"
**Skill Actions**:
1. Check current branch - on main
2. Ensure working directory clean
3. Create feature branch
4. Verify branch created
**Result**:
```
✅ Branch Created
Branch: feature/notification-system
Base: main (a3f2c1d)
You're now on the new branch and ready to start work!
Workflow:
1. Make your changes
2. Commit with: "commit my changes"
3. Push with: git push -u origin feature/notification-system
4. Create PR with: "create PR"
```
## Integration
### Uses
- **Bash**: Execute git and gh CLI commands
- **Read**: Analyze changed files for commit message generation
- **Grep**: Pattern match for commit types and scopes
- **TodoWrite**: Track PR creation and review tasks
### Updates
- Git repository (commits, branches, pushes)
- GitHub (pull requests via gh CLI)
### Safety Features
- **Never force push** to main/master without explicit confirmation
- **Warn on destructive operations** (reset --hard, push --force)
- **Verify before push** - show what will be pushed
- **Check for secrets** before committing
## Commit Message Generation Logic
```bash
# Analyze file types
MODIFIED_FILES=$(git diff --cached --name-only)
# Detect scope
if [[ $MODIFIED_FILES == *"src/api"* ]]; then
SCOPE="api"
elif [[ $MODIFIED_FILES == *"tests/"* ]]; then
SCOPE="test"
elif [[ $MODIFIED_FILES == *"docs/"* ]]; then
SCOPE="docs"
fi
# Detect type
if grep -q "new.*function\|new.*class" <(git diff --cached); then
TYPE="feat"
elif grep -q "fix\|bug" <(git diff --cached); then
TYPE="fix"
elif [[ $MODIFIED_FILES == *".md" ]]; then
TYPE="docs"
fi
# Generate message
COMMIT_MSG="${TYPE}(${SCOPE}): ${DESCRIPTION}"
```
## Constitutional Compliance
- **Git Workflow**: Enforces feature branching and proper workflow (Principle V)
- **Commit Standards**: Conventional commits for clarity
- **Never Skip Hooks**: Respects pre-commit hooks and validation
- **No Force Push**: Prevents destructive operations on shared branches
- **Safety First**: Warns before potentially dangerous git operationsRelated Skills
code-execution-helper
Guide for using code execution capabilities to perform parallel batch processing, conditional filtering, and data aggregation. This skill should be used when agents need to analyze multiple files efficiently, validate large result sets, aggregate data from multiple sources, or reduce token consumption through execution-based filtering. Provides reusable templates for quota-aware workflows, error handling patterns, and token-efficient data processing.
~aod-status
On-demand backlog snapshot and lifecycle stage summary. Regenerates BACKLOG.md from GitHub Issues and displays item counts per stage. Use this skill when you need to check backlog status, view stage counts, regenerate BACKLOG.md, or get a lifecycle overview.
~aod-spec
Validates specification completeness and quality by checking for mandatory sections, [NEEDS CLARIFICATION] markers, testable criteria, and clear scope boundaries. Use this skill when you need to check if spec is complete, validate specifications, review spec.md, or check specification quality. Ensures specifications are ready for architecture and implementation phases.
~aod-score
Re-score an existing idea's ICE rating when circumstances change. Use this skill when you need to re-evaluate ideas, update ICE scores, change idea priority, or re-assess deferred ideas.
~aod-run
Full lifecycle orchestrator that chains all 6 AOD stages (Discover, Define, Plan, Build, Deliver, Document) with disk-persisted state for session resilience and governance gates at every boundary. Use this skill when you need to run the full lifecycle, orchestrate stages, resume orchestration, or check orchestration status.
~aod-project-plan
Validates architecture documentation completeness by checking for technology stack, API specifications, database schema, security architecture, and alignment with feature specification. Use this skill when you need to check if plan.md is complete before implementation, validate architecture documentation, or review technical plans for completeness.
~aod-plan
Plan stage orchestrator that runs all three Plan sub-steps (spec → project-plan → tasks) in sequence with governance gates. Stops on rejection, continues through approvals. Use this skill when you need to run the full Plan stage, navigate planning sub-steps, or resume after a rejection.
~aod-kickstart
POC kickstart skill that transforms a project idea into a sequenced consumer guide with 6-10 seed features. Use when a developer invokes /aod.kickstart to generate a consumer guide, when starting a new project and needing a structured backlog plan, or when converting a project idea into seed features for the AOD lifecycle. Three-stage workflow: Idea Intake, Stack Selection, Guide Generation.
~aod-discover
Unified discovery skill with 4 entry points: /aod.discover (full flow: capture + score + validate), /aod.discover --seed (fast-track pre-vetted ideas with auto defaults), /aod.idea (capture + score only), /aod.validate (PM validation for existing idea). Use this skill when you need to capture ideas, run discovery, validate ideas with PM, generate user stories, log feature requests, or add items to the ideas backlog.
~aod-deliver
Structured delivery retrospective for the AOD Lifecycle's Deliver stage. Validates Definition of Done, captures delivery metrics (estimated vs. actual duration), logs surprises, feeds new ideas back into discovery via GitHub Issues, and creates Institutional Knowledge entries. Use this skill when you need to close a feature, run a delivery retrospective, capture lessons learned, or complete the AOD lifecycle.
~aod-define
Internal skill invoked by /aod.define to generate industry-standard PRD content using proven frameworks from Google, Amazon, and Intercom. Do NOT invoke directly — use /aod.define instead, which wraps this skill with Triad governance and sign-offs.
~aod-build
Generate standardized checkpoint reports for multi-phase implementation projects. Use this skill when pausing implementation at strategic milestones (phase completion, user story completion, critical features) to create comprehensive progress reports with task breakdowns, metrics, knowledge base entries, and resume instructions.