git-setup
Initialize git in the workspace and connect a GitHub remote. Use for /git-setup or when the user asks to set up version control.
by HenriGrimm★ 25 GitHub stars
Install git-setup in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Git & GitHub setup
When to use
- User invokes
/git-setupor asks to initialize git / connect GitHub - Orchestrator board preflight requested git setup for a non-repo workspace (init only — no remote)
- Orchestrator board preflight requested GitHub remote setup for a repo without
origin
Steps
- Detect state — run
execute_commandwithgit rev-parse --is-inside-work-tree(orgit_status). If already inside a git repo, skipgit initand report the current branch and remotes. - Initialize — when not a repo, run
git initin the workspace root. - Baseline ignore — if
.gitignoredoes not exist, create one with sensible defaults (node_modules/,.env,.env.*,dist/,build/, OS junk like.DS_StoreandThumbs.db). Do not overwrite an existing.gitignore. Minnow also runs this step programmatically when/git-setupstarts (before tools run) so fresh repos always get a baseline ignore even if this step is skipped in chat. Orchestrator board onboarding runs init,.gitignore, and the initial commit programmatically after the dedicated git prompt — do not redo that work if the folder is already a repo. - Initial commit — when there are untracked files and no commits yet, stage all with
git_addand commit with messagechore: initial commit. - GitHub remote
- Run
gh auth status. If unauthenticated, explain that the user must rungh auth loginin a terminal and stop — do not invent tokens or credentials. - When
ghis available and authenticated: callask_questionfor repo visibility (public / private), then rungh repo createwith--source=.and the chosen visibility. Verifygit remote -vshowsorigin. - When
ghis missing orgh repo createfails: callask_questionfor an existing GitHub remote URL, thengit remote add origin <url>. Ask before pushing; on approval rungit push -u origin HEAD.
- Run
- Summarize — report branch name, remote URL, and whether the initial push succeeded.
Do not re-confirm
The user already chose to run this skill (slash command or board preflight). Do not call ask_question to confirm git init, .gitignore, the initial commit, or "no GitHub remote". Execute those steps with tools immediately. Use ask_question only for GitHub visibility, an existing remote URL, or push approval.
Quality checks
- Never commit secrets (
.env, credentials, API keys) — warn and exclude them in.gitignoreif present - Do not force-push or rewrite history
- Prefer
gh repo createover manual remote setup whenghworks
Tools
execute_command, git_status, git_add, git_commit, read_file, write_file, ask_question
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the git-setup skill do?
Initialize git in the workspace and connect a GitHub remote. Use for /git-setup or when the user asks to set up version control.
How do I install the git-setup skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the git-setup skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…