git-add-commit-pushlisted
Install: claude install-skill fmind/dotfiles
# Git Add, Commit, and Push
Wraps the commit-subject rules from `conventional-commit`, then stages, commits, and pushes — auto-healing lefthook pre-commit/pre-push failures along the way.
## Workflow
1. **Check Working Directory & Staging State**:
- Run `git branch --show-current` and record it — committing and pushing directly to `main`/`master` is allowed and is the normal flow. Branch first via the [feature-branch](../feature-branch/SKILL.md) skill only when the user asked for a PR flow, or when the push is later rejected by branch protection.
- Check if there are staged changes: `git diff --cached --name-only`.
- If nothing is staged, check if there are unstaged changes: `git status --short`.
- If there are unstaged changes, stage them using `git add` to prepare for commit.
- If the working tree is completely clean and nothing is staged, say so and stop.
1. **Generate Commit Message**:
- Craft the commit subject using the naming rules from the [conventional-commit](../conventional-commit/SKILL.md) skill (`<type>(<scope>): <description>`, imperative mood, under 72 chars). Do NOT run its commit/stop-on-failure steps — this skill performs the commit and auto-heals hook failures below.
1. **Commit Stage (Pre-Commit Hook Auto-Healing)**:
- Run `git commit -m "<subject>"` to commit the staged changes.
- If the commit fails (pre-commit hook failure):
- Read the hook output carefully to diagnose the issues.
- **Formatting/Linting**: Run the