AgentStack
SKILL verified MIT Self-run

Git Workflow

skill-dqz00116-skill-lib-git-workflow · by Dqz00116

Use when committing code, pushing changes, or managing Git operations that require safety checks

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add skill-dqz00116-skill-lib-git-workflow

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Git Workflow? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Git Workflow Skill

Overview

Automate Git operations with safety checks and user confirmation. This skill ensures changes are reviewed and explicitly approved before committing or pushing.

When to Use

  1. Checks Workspace Status
  • Shows modified files
  • Lists untracked files
  • Detects conflicts or merge states
  1. Smart Confirmation Prompt
  • Lists all changes clearly
  • Asks for explicit approval
  • Provides multiple options (commit all, specific files, ignore, skip)
  1. Safe Commit & Push
  • Only commits after confirmation
  • Handles GitHub authentication
  • Reports success or failure
  1. Conflict Detection
  • Detects merge conflicts
  • Suggests resolution steps
  • Prevents force pushes

When NOT to use:

  • When you need automated/unattended commits without user interaction
  • When performing complex Git operations beyond standard commit/push workflows
  • When a different skill or tool is explicitly designated for Git operations

Quick Start

Simple Commit

python scripts/git_commit.py

The script will:

  1. Show git status
  2. Ask for confirmation
  3. Commit and push if approved

Interactive Mode

python scripts/git_commit.py --interactive

Step-by-step confirmation for each file.

Confirmation Format

📋 **Git Status Summary:**
Modified:
  - SOUL.md (41 insertions)
  - README.md (5 deletions)

Untracked:
  - new-feature.md
  - temp.log (should be ignored?)

✅ **Confirm:** 
  Reply:
  - "yes" → commit all modified
  - "commit with untracked" → commit all including untracked
  - "only SOUL.md" → commit specific file
  - "ignore temp.log" → add to .gitignore
  - "skip" → do nothing

Safety Rules

Never

  • ❌ Commit without checking status first
  • ❌ Commit without user confirmation
  • ❌ Force push (git push -f)
  • ❌ Commit binary/temporary files without asking

Always

  • ✅ Check git status before any operation
  • ✅ Show list of changes for approval
  • ✅ Respect .gitignore
  • ✅ Handle errors gracefully
  • ✅ Report what was done

Usage Examples

Example 1: Simple Workflow

$ python scripts/git_commit.py

📊 Git Status:
 M SOUL.md
?? new-file.md

📋 Changes Summary:
Modified: SOUL.md
Untracked: new-file.md

✅ Confirm: Reply "yes" to commit modified, "commit with untracked" for all, or specify files
> yes

📝 Commit message: Update SOUL.md

✅ Committed: a1b2c3d Update SOUL.md
🚀 Pushed to origin/main

Example 2: With Untracked Files

$ python scripts/git_commit.py

📊 Git Status:
 M README.md
?? temp.log
?? important.md

📋 Changes Summary:
Modified: README.md
Untracked: temp.log, important.md

✅ Confirm: What to commit?
> commit with untracked

⚠️  temp.log looks like a temporary file. Add to .gitignore instead?
> yes

📝 Commit message: Update README and add important docs

✅ Committed: b2c3d4e Update README and add important docs
🚀 Pushed to origin/main

Example 3: Skip Everything

$ python scripts/git_commit.py

📊 Git Status:
 M SOUL.md

📋 Changes Summary:
Modified: SOUL.md

✅ Confirm: Reply "yes" to commit
> skip

⏹️  Skipped. No changes committed.

Handling Edge Cases

Merge Conflicts

⚠️  **Merge Conflict Detected!**

Conflicted files:
  - README.md
  - config.yaml

Cannot commit until conflicts are resolved.

Suggested steps:
1. Edit files to resolve conflicts
2. Run: git add 
3. Run this script again

Diverged Branches

⚠️  **Local branch is behind remote**

Run: git pull origin main first?
> yes

Pulling latest changes...
[...]

✅ Now you can commit your changes.

Authentication Issues

❌ **Push Failed: Authentication Error**

Possible causes:
- SSH key not configured
- Token expired
- Wrong remote URL

Suggested fixes:
1. Check: git remote -v
2. Test: ssh -T git@github.com
3. Or use HTTPS with token

Best Practices

  1. Check before committing: Always review changes
  2. Write clear messages: Describe what and why
  3. Commit related changes: One logical change per commit
  4. Don't commit secrets: Check for API keys, passwords
  5. Keep commits small: Easier to review and revert

Troubleshooting

"nothing to commit"

# Check if files are actually modified
git status

# Check if in git repository
git rev-parse --git-dir

"Permission denied"

# Check SSH key
ssh -T git@github.com

# Or use HTTPS
git remote set-url origin https://github.com/username/repo.git

"failed to push"

# Pull first
git pull origin main

# Resolve any conflicts
# Then commit again

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.