← ClaudeAtlas

git-repository-setuplisted

Sets up a project's git repository with best practices — a main default branch, .gitignore and .gitattributes, committed git hooks (secret and large-file checks, conventional commit messages), GitHub Actions CI, branch protection on main, and semantic-version release tags with a changelog — inspecting what already exists and asking before any change to GitHub. Use when the user wants to set up, harden or tidy a git repository, add hooks or CI, protect main, or start versioning releases. Examples include "set up git properly for this project", "add pre-commit hooks", "create a CI workflow", "protect my main branch", "rename master to main" and "how should I tag releases?".
whoamimi/plugin-mimi · ★ 3 · Code & Development · score 66
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