git-setup
БесплатноБез исполняемых скриптовНе проверенAudit Git configuration with one read-only baseline command, then propose confirmed, non-destructive fixes for identity, editor, and diff and merge tooling…
от microsoft★ 1 654 звезды на GitHubОб этом скилле
Git Setup
Goal
Help the user configure Git consistently for everyday work (add, commit, fetch, pull, push) without overwriting preferred settings. Verify current values before suggesting changes, and never modify configuration without explicit confirmation.
Scope:
- Identity:
user.nameanduser.emailare set. - Editing, diff, and merge tooling is configured when currently unset.
- Commit signing (GPG or SSH) help happens only when the user asks for it or reports a signing error.
- A
safe.directoryentry is proposed only when the user reports a Git ownership or unsafe-repository error. - Existing customizations stay intact; never downgrade or remove settings.
Flow
- Audit the current configuration with exactly one command:
git config --list --show-origin. It captures values and their source files. Run no other lookup,gpg, orssh-keygencommand during the audit. - Report gaps and desirable improvements from that output.
- Propose minimal remediation commands, grouped logically.
- Ask for confirmation per group before applying it, and apply only confirmed groups.
- Verify applied settings with single
git config --get <key>reads and show a before and after summary. - Summarize applied changes and remaining optional improvements.
Detection
Classify each area from the baseline output only, in this order:
- Identity: parse
user.nameanduser.emailand note each scope from its origin path. Mark a value missing when no scope sets it. - Commit signing (passive scan): parse
commit.gpgSign,gpg.format, anduser.signingkey, and classify the result for display only:- Disabled:
commit.gpgSignis false or unset. - Configured candidate: signing is true and both
gpg.formatanduser.signingkeyare present. - Incomplete: signing is true but
gpg.formatoruser.signingkeyis missing. - Not configured: all three are unset.
- Disabled:
- Editor and tools: parse
core.editor,diff.tool, andmerge.tool, and mark each missing value as a gap. - Safe directory: note whether any
safe.directoryentry includes the current repository path. - Line endings: parse
core.autocrlfandcore.eol, and flag them only when both are unset and the user mentions cross-platform needs.
Proposals
- Build a remediation group for each identity or editor and tooling gap, with the rationale, exact commands, and expected effect.
- Build a signing group only when the user asks about signing, wants to enable or disable it, or reports a signing verification error.
- Build a safe-directory group only when the user reports an unsafe-repository error from Git.
- Offer line-ending settings only when the user mentions cross-platform concerns.
- Write each command on its own line, directly runnable and human-auditable, with no chaining through
&&,;, pipes, or subshells. Idempotent commands are acceptable when the user confirms them. - When one specific value needs clarification later, propose a single follow-up
git config --get <key>after user confirmation rather than a batch. - Propose, but do not run,
gpg --list-secret-keysonly when signing is enabled or the user wants to enable signing and is unsure which keys exist. - Propose key generation only when the user opts into signing and the configuration shows no usable key.
- Never push, fetch, pull, or alter remotes, and never show secrets or private key content. Redact the email only when the user asks for privacy.
Command Templates
Adapt these after the user confirms the group; do not emit a template that no current gap or request needs.
Identity:
git config --global user.name "<user-name>"
git config --global user.email "<user-email>"
Disable misconfigured signing for now:
git config --global commit.gpgSign false
Trust a repository path after an unsafe-repository error:
git config --global --add safe.directory "<repo-path>"
Enable SSH signing with an existing key (Git 2.34 or later):
git config --global gpg.format ssh
git config --global user.signingkey "~/.ssh/id_ed25519.pub"
git config --global commit.gpgSign true
Generate and configure a GPG signing key:
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
gpg --armor --export <KEY_ID> > public-gpg-key.asc
git config --global gpg.format openpgp
git config --global user.signingkey <KEY_ID>
git config --global commit.gpgSign true
Generate and configure an SSH signing key:
# Linux and macOS
ssh-keygen -t ed25519 -C "<user-email>" -f ~/.ssh/id_ed25519
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# Windows PowerShell with the built-in OpenSSH agent
ssh-keygen -t ed25519 -C "<user-email>" -f $HOME/.ssh/id_ed25519
Start-SSHAgent
ssh-add $HOME/.ssh/id_ed25519
# Both platforms
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgSign true
Use VS Code as the editor, diff tool, and merge tool wh
Установить git-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл git-setup?
Audit Git configuration with one read-only baseline command, then propose confirmed, non-destructive fixes for identity, editor, and diff and merge tooling, with signing and safe.directory help only on request. Use when setting up or checking Git on a workstation.
Как установить скилл git-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic