Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

git-expert

БесплатноЗапускает вложенные скриптыНе проверен

Advanced Git operations wrapper. Optimizes token usage by guiding complex git workflows into efficient CLI commands.

oimiragieoот 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 git or 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 staged
  • git switch -c <branch> or git checkout -b <branch> — new branch; git branch — list
  • git log --oneline -5 — compact history; git log --follow <file> — track renames
  • git restore <file> — discard unstaged; git reset --soft HEAD~1 — undo last commit (keep changes)
  • git fetch then git merge or git 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:

  1. Check State: git status -s (Short format saves tokens)
  2. Diff: git diff --cached (Only check what you are about to commit)
  3. 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

  1. git status to see conflict files.
  2. Edit file to resolve markers (<<<<, ====, >>>>).
  3. git add <file>
  4. git commit --no-edit

Iron Laws

  1. NEVER use git push --force on shared branches — force-pushing rewrites history for all collaborators, causes lost commits, and breaks in-progress rebases silently; use --force-with-lease when truly necessary.
  2. 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.
  3. 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.
  4. 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.
  5. 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
Полный SKILL.md на GitHub

Установить git-expert в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read

Вложенные файлы

commands/git-expert.mdhooks/post-execute.cjshooks/pre-execute.cjsreferences/research-requirements.mdrules/git-expert.mdschemas/input.schema.jsonschemas/output.schema.jsonscripts/main.cjstemplates/implementation-template.md

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить git-expert с