Command Palette

Search for a command to run...

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

git-ops

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

Git + worktree orchestrator: status survey, per-worktree triage, commits, PRs, branches, releases, rebases — reads inline, writes to a background agent…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

Git Ops

Intelligent git operations orchestrator. Routes read-only queries inline for speed, dispatches write operations to a background Sonnet agent (git-agent) to free the main session.

Architecture

User intent (commit, PR, rebase, status, etc.)
    |
    +---> Tier 1: Read-only (status, log, diff, blame)
    |       |
    |       +---> Execute INLINE via Bash (fast, no subagent)
    |
    +---> Tier 2: Safe writes (commit, push, tag, PR, stash)
    |       |
    |       +---> Gather context from conversation
    |       +---> Dispatch to git-agent (background, Sonnet)
    |       |       +---> Fallback: general-purpose with inlined protocol
    |       +---> Agent executes and reports back
    |
    +---> Tier 3: Destructive (rebase, reset, force-push, branch -D)
            |
            +---> Dispatch to git-agent (background, Sonnet)
            |       +---> Fallback: general-purpose with inlined protocol
            +---> Agent produces PREFLIGHT REPORT (does NOT execute)
            +---> Orchestrator relays preflight to user
            +---> On confirmation: re-dispatch with execute authority

Safety Tiers

Tier 1: Read-Only - Run Inline

No subagent needed. Execute directly via Bash for instant results.

Operation Command
Status (rich) bash $HOME/.claude/skills/git-ops/scripts/status.sh — one-shot HEAD + sync + tree + worktrees + branches + PR
Worktree survey bash $HOME/.claude/skills/git-ops/scripts/worktree-survey.sh — per-worktree state, drift detection, prunable/WIP/ghost/orphan triage
Land-all plan bash $HOME/.claude/skills/git-ops/scripts/land-all.sh [--porcelain] — classifies every branch as LANDABLE/STALE/WIP/ACTIVE/MERGED/ERROR for a batch land (see "Land all" below)
Status (bare) git status --short
Log git log --oneline -20
Diff (unstaged) git diff --stat
Diff (staged) git diff --cached --stat
Diff (full) git diff [file] or git diff --cached [file]
Branch list git branch -v
Remote branches git branch -rv
Stash list git stash list
Blame git blame [file]
Show commit git show [hash] --stat
Reflog git reflog --oneline -20
Tags git tag --list --sort=-v:refname
Worktree list git worktree list
PR list gh pr list
PR status gh pr view [N]
Issue list gh issue list
CI checks gh pr checks [N]
Run status gh run list --limit 5

For T1 operations, format results cleanly and present directly. Use delta for diffs when available.

When to reach for the bundled scripts:

  • User asks "status", "where are we", "anything to commit", "anything to push" → status.sh
  • User asks about worktrees, prunable branches, drift, "what can we clean up" → worktree-survey.sh
  • Both scripts exit 0 if clean, 1 if attention needed, 2 if not-a-repo — composable.

Hygiene Checks (Proactive — Run During Every T1 Status)

When running any status check, scan for these anti-patterns and surface them before the status output. Don't wait for the user to notice. The status.sh script handles checks 1 and 2 automatically; checks 3 and 4 are Claude's responsibility.

Anti-pattern 1: Main checkout on a feature branch 🔴

Signal: In the main checkout (not a worktree) and git branch --show-current ≠ the repo's default branch (main/master/trunk).

Why it's bad: The main checkout is the fallback workspace. Feature branches sitting there block clean status reads, confuse worktree operations, and make it unclear what "current" state is. Feature work belongs in dedicated worktrees.

Flag it: Emit a prominent warning before the status output.

Fix:

git checkout main                                              # return main to trunk
git worktree add .claude/worktrees/<name> <feature-branch>   # move work to worktree
# machine sets WORKTREE_ROOT? put it there instead: "$WORKTREE_ROOT/<repo>/<name>"

Detecting main checkout vs worktree:

GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
# ".git"               → main checkout  → check applies
# contains "worktrees" → inside a worktree → skip this check

Anti-pattern 2: Stale merged branches 🟡

Signal: git branch --merged <default> returns branches other than the trunk.

Why it's bad: Merged-but-undeleted branches are noise that obscures what's actually in flight.

Flag it: Report the count. Suggest fleet sweep (fleet-ops): its --apply deletes merged, worktree-less branches no open session holds, zero-loss, after a typed confirm.

Anti-pattern 3: WIP commits on a pushed branch 🟡

Signal: git log --oneline @{u}..HEAD contains subject lines matching wip|WIP|todo|TODO|fixme|FIXME|temp|TEMP|hack|HACK.

Why it's bad: WIP markers in pushed history signal unfinished work that shouldn't have left the local machine. Creates confusing history and blocks clean PRs.

**Fl

Полный SKILL.md на GitHub

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

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

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

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

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

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

Read
Bash
Glob
Grep
Agent
TaskCreate
TaskUpdate

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

assets/.gitkeepreferences/advanced-git.mdreferences/dispatch.mdreferences/extended-operations.mdreferences/land-all.mdreferences/lane-provisioning.mdreferences/rebase-patterns.mdreferences/stash-patterns.mdscripts/.gitkeepscripts/land-all.shscripts/new-lane.shscripts/status.shscripts/worktree-survey.sh

FAQ

Что делает скилл git-ops?

Git + worktree orchestrator: status survey, per-worktree triage, commits, PRs, branches, releases, rebases — reads inline, writes to a background agent. Triggers on: git status, anything to commit, anything to push, commit, push, create PR, rebase, release, tag, changelog, worktree, land worktrees.

Как установить скилл git-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл git-ops запускает скрипты?

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

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

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