askill
git-workflow

git-workflowSafety 80Repository

Automate Git commit and push workflows with intelligent prompts and safety checks. Checks workspace status, lists changes, confirms with user, and handles push operations safely. Never commits without explicit user approval.

3 stars
1.2k downloads
Updated 2/11/2026

Package Files

Loading files...
SKILL.md

Git Workflow Skill

Automate Git operations with safety checks and user confirmation.

What This Skill Does

  1. Checks Workspace Status

    • Shows modified files
    • Lists untracked files
    • Detects conflicts or merge states
  2. Smart Confirmation Prompt

    • Lists all changes clearly
    • Asks for explicit approval
    • Provides multiple options (commit all, specific files, ignore, skip)
  3. Safe Commit & Push

    • Only commits after confirmation
    • Handles GitHub authentication
    • Reports success or failure
  4. Conflict Detection

    • Detects merge conflicts
    • Suggests resolution steps
    • Prevents force pushes

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 <resolved-files>
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

Install

Download ZIP
Requires askill CLI v1.0+β–Ά

AI Quality Score

72/100Analyzed 2/24/2026

Well-structured Git workflow skill with clear safety rules, comprehensive examples, and good documentation. Covers the full commit/push workflow with user confirmation, conflict detection, and error handling. Minor issues: relies on external Python script not included in repo, and tags don't accurately describe the skill content. The skill is reusable and actionable for general Git operations."

80
85
70
60
65

Metadata

Licenseunknown
Version-
Updated2/11/2026
PublisherDqz00116

Tags

apigithubgithub-actionspromptingtesting