git-workflowlisted
Install: claude install-skill rkaliev/eng-kit
# Git workflow
## Before starting: isolate
1. **Detect the current state.**
- Isolation: `git rev-parse --git-dir` differs from `--git-common-dir` means you are already in a worktree.
- Branch: `git branch --show-current`.
- Uncommitted changes: `git status --porcelain`.
2. **On `main`/`master`**, or with someone else's uncommitted changes: create a branch, or ask first. Never stash or reset work you didn't create.
3. **Parallel work** needs a worktree. Use the project's convention, else `.worktrees/<branch>`, and confirm the path is ignored first (`git check-ignore -q .worktrees`; if it isn't, add it to `.gitignore` in its own commit).
```bash
git worktree add .worktrees/<branch> -b <branch>
```
4. **Set up and record a baseline:** install with the lockfile (`npm ci`, `pnpm i --frozen-lockfile`…), then run the verification commands. Report existing failures before you change anything.
Branch names follow the repo convention. Default: `<type>/<short-kebab-description>`, for example `feat/refund-api`.
## Commits
- Commit small, coherent steps, each green. Follow the repo's convention, or Conventional Commits by default (`feat(scope): add refund endpoint`). The subject says *what* changed; the body says *why*, when it isn't obvious.
- Stage specific paths (`git add path/…`), never secrets, build output or unrelated changes. Review `git diff --staged` before committing.
- Respect hooks. **Never** use `--no-verify`, `-n`, or `commit --amend` on pushed commi