git-repository-setuplisted
Install: claude install-skill whoamimi/plugin-mimi
# Git Repository Setup
Turn a project folder into a well-configured repository, one step at a time. Templates are in `${CLAUDE_PLUGIN_ROOT}/skills/git-repository-setup/templates/`.
Related skills in this plugin: `get-started` scaffolds a new local project, and `backup-project` checks GitHub access and makes the first push. Use `backup-project` when the repository has no GitHub remote yet.
## Rules
- **Inspect before changing.** Never overwrite an existing file; show the difference and merge.
- **Local changes** (files, hooks, git config inside the repo): explain each one, then make it.
- **Anything outside the folder** (pushing, renaming the remote default branch, repository settings, branch protection, global git config): show the exact command and run it only after the user says yes.
- Never commit secrets. If the checks below find any, stop and help the user remove and rotate them first.
## Steps
Copy this checklist into your reply and tick items off as you go:
```
- [ ] 1. Inspect the repository
- [ ] 2. main as the default branch
- [ ] 3. Repository files
- [ ] 4. Git hooks
- [ ] 5. CI workflow
- [ ] 6. Protect main on GitHub
- [ ] 7. Versioning and releases
- [ ] 8. Verify
```
### 1. Inspect the repository
```bash
git rev-parse --is-inside-work-tree 2>/dev/null || echo "not a repository"
git branch --show-current; git remote -v; git config --get core.hooksPath
ls -a; ls .github/workflows .githooks 2>/dev/null
gh repo view --json defaultBranchRef,visibility 2>/d