gitlisted
Install: claude install-skill dean0x/devflow
# Git & GitHub Patterns
Unified skill for safe git operations, atomic commits, honest PR descriptions, and GitHub API interactions. Used by Coder and Git agents.
## Iron Law
> **EVERY COMMIT TELLS AN HONEST, ATOMIC STORY** [1][3]
>
> Each commit captures one logical change with a message that explains *what* changed
> and *why*, not just *how*. Atomic commits make history reviewable, bisectable, and
> revertable. Never bundle unrelated changes. Never write vague messages.
---
## When This Skill Activates
- Staging files, creating commits, pushing branches
- Creating or updating pull requests
- Rebasing, force-pushing, merge conflicts, undoing commits
- GitHub API operations (PR comments, issues, releases)
- Any `git` or `gh` CLI command
---
## Safety
### Lock File Handling
Check for lock before git operations. If `.git/index.lock` exists, wait or abort.
```bash
[ -f .git/index.lock ] && echo "Lock exists - wait" && exit 1
```
### Sequential Operations
```bash
# WRONG: git add . & git status &
# CORRECT:
git add . && git status && echo "Done"
```
### Forbidden Operations
| Action | Risk |
|--------|------|
| `git push --force` to main/master | Destroys shared history |
| `git commit --no-verify` | Bypasses safety hooks |
| `git reset --hard` without backup | Loses work permanently |
| Parallel git commands | Causes lock conflicts |
| Commit secrets/keys | Security breach |
| Amend pushed commits | Requires force push |
| Interactive rebase (`-i`) | Requires user