git-expert
БесплатноЗапускает вложенные скриптыНе проверенAdvanced Git operations wrapper. Optimizes token usage by guiding complex git workflows into efficient CLI commands.
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Git Expert Skill
Installation
The skill invokes the git CLI. Install Git if not present:
- Windows: Download from git-scm.com or
winget install --id Git.Git -e --source winget - macOS:
brew install gitor Xcode CLI tools:xcode-select --install - Linux:
apt-get install git(Debian/Ubuntu),dnf install git(Fedora),pacman -S git(Arch)
Verify: git --version
Cheat Sheet & Best Practices
Essential commands (token-efficient):
git status -s— short status;git add -p— stage hunks;git diff --cached— review stagedgit switch -c <branch>orgit checkout -b <branch>— new branch;git branch— listgit log --oneline -5— compact history;git log --follow <file>— track renamesgit restore <file>— discard unstaged;git reset --soft HEAD~1— undo last commit (keep changes)git fetchthengit mergeorgit pull— prefer fetch+merge over blind pull
Hacks: Set git config --global color.ui auto and user.name/user.email. Use .gitignore aggressively. Prefer git merge --squash for clean history on feature merge. Use git cherry-pick <commit> to bring single commits. Never rebase pushed commits without team agreement.
Certifications & Training
Free / official: Atlassian Git Tutorials (beginner–advanced). Microsoft Learn – GitHub Training (GitHub Foundations path). GitHub Learn (Git + GitHub). No single “Git cert”; GitHub Foundations aligns with fundamentals.
Skill data: Focus on branching, undo (reset/restore/revert), merge vs rebase, remote workflow, and safety (no force-push, no secrets).
Hooks & Workflows
Suggested hooks: Pre-commit: run commit-validator (conventional commits). Pre-push: run tests (reference tdd / verification-before-completion). Post-merge: optional memory/learnings update.
Workflows: Use with developer (primary), devops (always). Flow: branch → edit → add → validate commit message → commit → push; use github-ops or github-mcp for PR/create. See .claude/workflows for feature-development and code-review workflows that use git-expert.
⚡ Token-Efficient Workflow
Do not use git status repeatedly. Use this workflow:
- Check State:
git status -s(Short format saves tokens) - Diff:
git diff --cached(Only check what you are about to commit) - Log:
git log --oneline -5(Context without the noise)
🔄 Common Patterns
Safe Commit
git add <file>
git diff --cached # REVIEW THIS!
git commit -m "feat: description"
Undo Last Commit (Soft)
git reset --soft HEAD~1
Fix Merge Conflict
git statusto see conflict files.- Edit file to resolve markers (
<<<<,====,>>>>). git add <file>git commit --no-edit
Iron Laws
- NEVER use
git push --forceon shared branches — force-pushing rewrites history for all collaborators, causes lost commits, and breaks in-progress rebases silently; use--force-with-leasewhen truly necessary. - NEVER commit secrets, credentials, or tokens to the repository — once pushed, secrets are visible in all forks and clones forever even after deletion from HEAD.
- ALWAYS run the test suite and verify it passes before pushing to shared branches — broken code in shared branches blocks everyone and triggers emergency rollbacks.
- ALWAYS rebase feature branches onto the base branch before merging — merging with a stale base creates avoidable conflicts and produces noisy merge commits in shared history.
- NEVER rebase or rewrite history on commits that have already been pushed to a shared remote — teammates' local branches will diverge and produce duplicate commits on next pull.
Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
git push --force on shared branches |
Overwrites teammates' commits; destroys in-progress rebase branches | Use --force-with-lease for personal branches only; never on main/develop |
Committing .env or credentials |
Permanently visible in history even after deletion; requires key rotation | Add sensitive files to .gitignore; use pre-commit secret-scanning hooks |
| Long-lived feature branches (>5 days) | Massive merge conflicts; integration bugs discovered too late | Use short-lived branches with daily rebases onto main (trunk-based dev) |
git commit -m "fix" or wip messages |
Makes git log useless for bisect and changelog generation |
Установить git-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadВложенные файлы
FAQ
Что делает скилл git-expert?
Advanced Git operations wrapper. Optimizes token usage by guiding complex git workflows into efficient CLI commands.
Как установить скилл git-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-expert запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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