Agent skill

Git Machete

by VirtusLab in VirtusLab/git-machete

A skill your agent uses whenever invoking the git machete CLI to organize branch chains, compute fork points, run stacked rebases/merges, or manage GitHub/GitLab PR/MR chains - especially in a repo…

MITAuto-check passedDevelopment

Install Git Machete

skills CLI
$ npx skills add VirtusLab/git-machete --skill git-machete -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VirtusLab/git-machete git-machete --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VirtusLab/git-machete.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/git-machete .claude/skills/git-machete && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-machete
GitHub stars
1.1k
Token cost
~6.1k tokens
SKILL.md length
2,451 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses whenever invoking the git machete CLI to organize branch chains, compute fork points, run stacked rebases/merges, or manage GitHub/GitLab PR/MR chains - especially in a repo…

  • Works in 7 steps: Prefer dedicated subcommands over… → Register every new branch in the layout.… → Never invoke a command that reads stdin… → …
  • Invoking the git machete CLI to organize branch chains
  • SKILL.md covers Hard rules - read first, Command catalog with side…, Recipes and Hooks, plus 2 more sections
  • Calls git, gh and glab; needs GITHUB_TOKEN and GITLAB_TOKEN

What it does

Git Machete is an agent skill from VirtusLab/git-machete. Use whenever invoking the git machete CLI to organize branch chains, compute fork points, run stacked rebases/merges, or manage GitHub/GitLab PR/MR chains - especially in a repo that already has a .git/machete file. Lists which subcommands modify .git/machete, run rebase/merge, run hooks, or read stdin, so the agent can pick the right one and pass the right flags. Crucially, names the commands that MUST be invoked with -y/--yes (and the few that have no -y and therefore must NOT be invoked at all without a tty)…

Its SKILL.md is about 6.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git, GitHub and GitLab. The repository describes itself as: Probably the sharpest git repository organizer & rebase/merge workflow automation tool you've ever seen. The licence is MIT.

When your agent uses it

  • Invoking the git machete CLI to organize branch chains
  • Compute fork points
  • Run stacked rebases/merges
  • Manage GitHub/GitLab PR/MR chains - especially in a repo that already has a .git/machete file

Example prompts

  • “/git-machete”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Prefer dedicated subcommands over hand-editing .git/machete when one fits the task. You can edit the layout file directly, but parse…
  2. Register every new branch in the layout. Whenever you create a branch as part of the user's actual work (git checkout -b ..., git switch…
  3. Never invoke a command that reads stdin without -y/--yes. Commands with a -y/--yes flag: add, advance, clean, delete-unmanaged, discover…
  4. Some commands prompt and have no -y to suppress it - avoid or work around them
  5. Plumbing commands have stable output across minor versions and are safe for scripting. Use these for any "I need to read state from…
  6. To open a PR/MR, use git machete github create-pr -y (or gitlab create-mr -y), not raw gh pr create / glab mr create.
  7. Resolve yellow edges before running update/traverse. A yellow edge means a child branch is a descendant of its parent but git-machete's…

What it can do on your machine

Read from SKILL.md and the folder at commit 7d88494. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • glab
    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN
    • GITLAB_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Machete loads about 6.1k tokens when it runs. Until then it costs about 163 tokens; SKILL.md has 2,451 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~163
When it runs · the whole SKILL.md, loaded when a task matches
~6.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from VirtusLab/git-machete at commit 7d88494, republished under its MIT licence (© VirtusLab). 2,451 words, ~6,125 tokens.

Download SKILL.mdSave it as .claude/skills/git-machete/SKILL.md (or your agent's skills folder).
name
git-machete
description
Use whenever invoking the `git machete` CLI to organize branch chains, compute fork points, run stacked rebases/merges, or manage GitHub/GitLab PR/MR chains - especially in a repo that already has a `.git/machete` file. Lists which subcommands modify `.git/machete`, run rebase/merge, run hooks, or read stdin, so the agent can pick the right one and pass the right flags. Crucially, names the commands that MUST be invoked with `-y/--yes` (and the few that have no `-y` and therefore must NOT be invoked at all without a tty) so the agent never hangs on an interactive prompt. Also warns against hand-editing the `.git/machete` layout file.

git-machete

git machete is a logic- and feature-heavy CLI for managing chains of branches, but it keeps almost no extra state of its own: the only user-visible file it owns is .git/machete (the "branch layout" - a tree of branches with parent/child relationships, fork points and PR/MR annotations). It also maintains a transparent merge-base cache for performance, which the user never needs to touch. Everything else - rebases, merges, pushes, status rendering, PR/MR creation - is driven straight off git and the hosting API.

If the repo has no .git/machete file yet (check with git machete file && test -s "$(git machete file)"), the layout has not been initialized: run git machete discover -y (or ask the user) before anything else.

Do not run git machete discover against an already-initialized layout unless the user explicitly asks for it. discover re-derives the entire layout from heuristics (recent commit dates, branch reachability) and silently overwrites any hand-curated ordering, parenting, or annotations the user has built up. Use the targeted commands (add, slide-out, hand-edit) for incremental changes.

Hard rules - read first

  1. Prefer dedicated subcommands over hand-editing .git/machete when one fits the task. You can edit the layout file directly, but parse errors are quiet, so reach for a subcommand whenever there is one that fits:

    • git machete add [-y] [<branch>] [--as-root|--onto <parent>] - add a branch
    • git machete slide-out [<branch>...] - remove a branch and re-parent its children (non-interactive by default; see rule 4 for --delete)
    • git machete anno [<text>] - set/clear annotation on the current branch
    • git machete rename <new-name> - rename a local branch and its layout entry (use this instead of git branch -m)

    The layout file grammar is small: one branch per line, each child indented one level deeper than its parent, with an optional annotation after whitespace on the same line. Any consistent indent unit works (a tab or N spaces), but the same unit must be used throughout the file.

    For operations with no dedicated command (e.g. reparenting an existing branch, splitting one branch into two, ad-hoc reordering of siblings), hand-edit .git/machete directly. The file is small and brittle: edit it in place with the agent's structured editing tool (StrReplace / equivalent string-replacement primitive), not by piping it through sed/awk or rewriting it from a shell heredoc - one stray space changes the parent/child relationship silently. Recommended sequence:

    1. MACHETE="$(git machete file)" - resolve the actual path (worktree/submodule-aware).
    2. cp -a "$MACHETE" "$MACHETE~" - back up; the file is NOT tracked by git, so this is your only undo.
    3. Read the file, perform a structured in-place edit (preserve the existing indent unit), write it back.
    4. git machete status - verify the parse. If it errors, restore with cp -a "$MACHETE~" "$MACHETE".

    When indenting, match the unit already used in the file (could be a tab or any number of spaces, but it must stay consistent throughout). For a brand-new layout, use two spaces.

    In the common case the layout file lives at .git/machete and hard-coding that is fine. The two exceptions are submodules (.git/modules/<path>/machete) and linked worktrees with git config machete.worktree.useTopLevelMacheteFile false (.git/worktrees/<wt-name>/machete); when in doubt, git machete file always resolves correctly.

  2. Register every new branch in the layout. Whenever you create a branch as part of the user's actual work (git checkout -b ..., git switch -c ..., git branch ...), follow it with git machete add -y [--onto <parent>] so the new branch joins .git/machete. In a git-machete-managed repo, the layout is the index of "branches I care about": users typically keep every branch they actively touch under git-machete, and the only branches deliberately left out are unrelated ones (someone else's WIP, throwaway branches checked out for a quick look). Defer to the user if they ask you to leave a branch unmanaged - but don't silently skip the add step; ask if you're unsure.

  3. Never invoke a command that reads stdin without -y/--yes. Commands with a -y/--yes flag: add, advance, clean, delete-unmanaged, discover, traverse, github create-pr, gitlab create-mr. Always pass -y from a non-interactive context (CI, agent, script).

  4. Some commands prompt and have no -y to suppress it - avoid or work around them:

    • git machete update - prompts only if the current branch is missing from the layout. Workaround: git machete add -y first, then git machete update.
    • git machete status - prompts to slide out stale branches when stdout is a tty. Workaround: pipe through | cat or redirect, or use git machete status --color=never > /tmp/status.txt.
    • git machete slide-out --delete ... - prompts once per branch and the prompt can't be silenced. Workaround: run plain git machete slide-out <branch>... first, then git branch -D <branch>... yourself (or skip the --delete entirely). Plain slide-out (and slide-out --removed-from-remote) is non-interactive.
    • git machete go without a direction - opens an interactive single-keystroke picker. Never invoke this form from an agent. Use git machete go <direction> (up/down/prev/next/root/first/last) instead, which is non-interactive (but may still prompt if down is ambiguous - prefer git machete show down | head -1 for scripted child discovery).
    • git machete edit - opens $EDITOR. Never invoke this form from an agent. Use the dedicated subcommands from rule 1, or hand-edit .git/machete for the cases that have no subcommand.
  5. Plumbing commands have stable output across minor versions and are safe for scripting. Use these for any "I need to read state from git-machete" task:

    • git machete file - absolute path of .git/machete
    • git machete fork-point [--inferred] [<branch>] - prints fork-point SHA on stdout (and only that)
    • git machete is-managed [<branch>] - exit code 0 if managed, non-zero otherwise; no stdout
    • git machete list <category> [<branch>] - newline-separated branch names; categories: managed, addable, childless, slidable, slidable-after <branch>, unmanaged, with-overridden-fork-point
    • git machete show <direction> [<branch>] - newline-separated branch names for the given direction
    • git machete version - prints git-machete version X.Y.Z

    All other commands' stdout/stderr formatting may change between minor versions, including status.

  6. To open a PR/MR, use git machete github create-pr -y (or gitlab create-mr -y), not raw gh pr create / glab mr create. The machete subcommand does three things the hosting CLI doesn't:

    • sets the PR/MR base to the branch's parent in the layout, not the repo default branch (correct for stacked PRs);
    • writes the new PR/MR number back onto the branch in .git/machete so subsequent status / traverse / retarget-{pr,mr} see it;
    • uses .git/info/description for the default PR title.

    The host's own CLI is only the right tool for things git-machete doesn't cover (read-only listing/commenting, deleting a PR, fetching CI status, etc.). See the Create / restack / retarget PRs recipe.

  7. Resolve yellow edges before running update/traverse. A yellow edge means a child branch is a descendant of its parent but git-machete's inferred fork point lies somewhere earlier than the parent tip - usually because the branch was rebased over commits from another branch, or its real parent is a different managed branch. In ASCII-only output the edge marker is ?- (e.g. ?-feature-x); with colour it's yellow. Do not run git machete update / git machete traverse blindly in this state - a rebase from the inferred fork point will pull extra commits onto the branch.

    Instead, run git machete status --list-commits --color=never | cat (which prints the relevant suggestion under the tree) and present the options to the user. The three resolutions, in roughly the order to consider them, are:

    • git machete fork-point <branch> --override-to-parent - accept the parent branch tip as the fork point (use when the branch was rebased and the inferred fork point is stale).
    • git machete update (rebase) - only after confirming the inferred fork point really is correct and the extra commits should be re-applied.
    • Reattach the branch under a different parent (e.g. hand-edit .git/machete as in rule 1) - use when the layout is wrong and the branch's real parent is a different managed branch.

    Pick based on what the user wants; don't auto-choose.

Command catalog with side effects

The table lists every non-deprecated top-level command and github/gitlab subcommand. The brace notation {github,gitlab} verb-{pr,mr} is shorthand for the pair github verb-pr and gitlab verb-mr.

Commands absent from every row (completion, diff, help, log, plus the plumbing commands listed above, plus {github,gitlab} update-{pr,mr}-descriptions which only talks to the hosting API) do not satisfy any of these properties.

Side effectCommands
reads stdin<sup>[1]</sup>add, advance, clean, delete-unmanaged, discover, {github,gitlab} create-{pr,mr}, go<sup>[2]</sup>, slide-out<sup>[3]</sup>, status<sup>[4]</sup>, traverse, update
displays status (runs machete-status-branch hook)discover, {github,gitlab} create-{pr,mr}, {github,gitlab} restack-{pr,mr}, go<sup>[2]</sup>, status, traverse
writes .git/machete (branch layout)add, advance, anno, clean, discover, edit<sup>[5]</sup>, {github,gitlab} anno-{pr,mr}s, {github,gitlab} checkout-{pr,mr}s, {github,gitlab} create-{pr,mr}, {github,gitlab} restack-{pr,mr}, {github,gitlab} retarget-{pr,mr}, rename, slide-out, traverse
mutates the git repository (refs / index / worktree / config)<sup>[6]</sup>add, advance, clean, delete-unmanaged, fork-point<sup>[7]</sup>, {github,gitlab} checkout-{pr,mr}s, {github,gitlab} create-{pr,mr}, {github,gitlab} restack-{pr,mr}, go, reapply, rename, slide-out, squash, traverse, update
checks out a branch (git checkout, switching which branch HEAD points to)<sup>[11]</sup>add<sup>[12]</sup>, {github,gitlab} checkout-{pr,mr}s, go, slide-out, traverse
runs git mergeadvance<sup>[8]</sup>, slide-out, traverse, update
runs git rebase (runs machete-pre-rebase hook)reapply<sup>[9]</sup>, slide-out, traverse, update
slides out a branch (runs machete-post-slide-out hook)advance, slide-out<sup>[10]</sup>, traverse
requires no ongoing rebase / merge / cherry-pick / revert / am / bisectadvance, go, reapply, slide-out, squash, traverse, update
Show full SKILL.md (976 more words)Show less
Footnotes

[1]: Commands with a -y/--yes flag (add, advance, clean, delete-unmanaged, discover, traverse, {github,gitlab} create-{pr,mr}) are safe to run from an agent as long as -y is passed. Without -y they read stdin to confirm decisions. The rest (see [2]-[4]) cannot be silenced and need a workaround.

[2]: go without a direction is fully interactive (single-keystroke picker reading stdin). Never run this form from an agent. go <direction> (up/down/prev/next/root/first/last) is non-interactive, but down may prompt if there are multiple children; prefer git machete show down to enumerate them and then check out manually with git checkout.

[3]: slide-out only reads stdin under --delete (one yes/no per branch). slide-out and slide-out --removed-from-remote without --delete are non-interactive.

[4]: status reads stdin only when stdout is a tty and the layout references branches that no longer exist in the repo. Redirected/non-tty runs (| cat, > file) skip the prompt entirely. CI runs are safe.

[5]: edit doesn't itself write the layout file; it just opens $GIT_MACHETE_EDITOR/$GIT_EDITOR on it and any change is done by the editor. Never run this form from an agent.

[6]: Pure hosting-API operations don't count here - that's why {github,gitlab} retarget-{pr,mr} and {github,gitlab} update-{pr,mr}-descriptions are absent.

[7]: fork-point mutates .git/config only under its override flags (--override-to=..., --override-to-inferred, --override-to-parent, --unset-override). The default mode and --inferred/--explain are read-only.

[8]: advance can only run fast-forward merge (git merge --ff-only).

[9]: reapply can run rebase but can't run merge (merging a branch with its own fork point is a no-op).

[10]: slide-out --removed-from-remote removes branches from the layout but does NOT run the machete-post-slide-out hook. The regular slide-out and the slide-out triggered by advance/traverse do.

[11]: This is the operation that fails with fatal: '<branch>' is already used by worktree at <path> when the target branch is already checked out in another linked worktree - the class of bug that has to be guarded against (and was fixed for traverse and slide-out; each command in this row needs auditing for it, ideally refusing before any layout/refs mutation rather than midway through). Commands that only fast-forward or rewrite the current branch in place are deliberately NOT in this row, because they never switch to a different branch and so can't hit that conflict: advance (git merge --ff-only advances the current branch), squash (rewrites the current branch tip), and update/reapply (rebase the current branch). Note that git rebase <branch> does implicitly check <branch> out, but the rebase-running commands either rebase the already-current branch (update, reapply) or check the branch out explicitly just beforehand (slide-out, traverse, already counted here via that explicit checkout).

[12]: add checks out a branch only when it has to create or fetch a new local branch (e.g. git machete add <new-branch>, or adding a branch that exists only on the remote) - the CLI path opts into switching HEAD onto the freshly created branch. Adding a branch that already exists locally (including the common git machete add on the current branch) doesn't move HEAD.

Recipes

Initialize the branch layout for a fresh repo
bash
git machete discover -y

Only run this when the layout doesn't exist yet (or the user explicitly asks to re-derive). On an existing layout, discover silently replaces any user-curated parenting/ordering.

Add the current branch under its parent
bash
git checkout -b feature/new-thing
git machete add -y
Add a branch under an explicit parent
bash
git machete add -y --onto develop feature/new-thing
Rename a branch (keeping the layout consistent)
bash
git machete rename feature/new-name

Do not use git branch -m; it leaves the layout out of sync.

Get current branch state
bash
git machete status -l                    # human-friendly, with commits
git machete status -l --color=never | cat   # safe for agents (never prompts)
Sync the current branch with its parent
bash
git machete update --no-interactive-rebase    # rebase-based (default)

If update complains the current branch isn't in the layout, run git machete add -y (or git machete discover -y) first.

Walk the whole chain and bring everything up to date
bash
git machete traverse -y --no-push                # rebase only, don't push
git machete traverse -y                          # rebase + push (default)
GIT_MACHETE_PUSH_OPTS="--push-option=ci.skip" git machete traverse -y  # rebase + push, forwarding a push option to every push

GIT_MACHETE_PUSH_OPTS is split on whitespace and passed straight through to every git push git-machete runs (traverse, advance, github/gitlab create-{pr,mr}/restack-{pr,mr}) - same mechanism as GIT_MACHETE_REBASE_OPTS for git rebase. It's how a bulk restack avoids firing one CI pipeline per branch (ci.skip is GitLab's spelling). Set it for a single invocation rather than exporting it, so it doesn't leak into unrelated commands.

Do not pass -M/--merge (to update, traverse, or slide-out). For stacked branches, merge-based sync entangles history quickly and recovery is non-trivial (see the README FAQ for rationale). Rebase is the only mode an agent should use. If the user explicitly asks for merge mode, repeat the warning and ask them to confirm.

Drop a branch from the layout (after merge)
bash
git machete slide-out <branch>                          # branch still exists locally; non-interactive
git machete slide-out --removed-from-remote             # clean up branches whose remote is gone (non-interactive, no hook)

To also delete the branch from git, run git branch -D <branch> yourself after slide-out - the built-in --delete flag prompts per branch and can't be silenced.

Inspect / set / clear fork-point overrides
bash
git machete fork-point                       # prints SHA
git machete fork-point --inferred            # what git-machete would infer
git machete fork-point --explain             # human-readable rationale (uses stderr)
git machete fork-point --override-to-parent  # pin fork point to the parent branch tip
git machete fork-point --unset-override
Create / restack / retarget PRs (GitHub)
bash
git machete github create-pr -y              # safe: -y skips push/sync prompts
git machete github restack-pr                # non-interactive
git machete github retarget-pr               # non-interactive, hosting-API only
git machete github checkout-prs --mine       # non-interactive (forces non-interactive `add`)

GitLab equivalents: gitlab create-mr -y, restack-mr, retarget-mr, checkout-mrs --mine.

Discover children/parent for scripting (instead of go)
bash
git machete show up                          # parent
git machete show down                        # all children, one per line
git machete show prev                        # previous in DFS order
git machete show next                        # next in DFS order
git machete show root                        # root of the current chain
git machete list managed                     # everything in the layout
git machete list slidable                    # branches that can be slid out

Hooks

git machete invokes three optional hooks if executable scripts of the matching names exist in .git/hooks/:

  • machete-pre-rebase <onto> <fork-point> <branch> - run before each git rebase initiated by git-machete (i.e. from reapply, slide-out, traverse, update). Non-zero exit aborts the rebase.
  • machete-post-slide-out <new-upstream> <slid-out-branch> [<new-downstream>...] - run after a successful slide-out triggered by advance, slide-out (without --removed-from-remote), or traverse.
  • machete-status-branch <branch> - run once per branch during status display; its stdout is appended to the branch's line in status output.

Files this tool reads/writes

PathPurpose
.git/machetebranch layout (parent/child tree, annotations, qualifiers). The literal path varies by context (worktree, submodule); always resolve via git machete file. Not git-tracked, so back up to .git/machete~ before manual edits.
.git/machete-merge-base-cachetransparent merge-base cache.
.git/config (machete.* keys)fork-point overrides set via fork-point --override-to=...; also feature toggles like machete.worktree.useTopLevelMacheteFile, machete.traverse.push, machete.squashMergeDetection.
.git/info/descriptionused as PR/MR title default when creating with github create-pr / gitlab create-mr.
~/.github-tokenGitHub API token (alternative: GITHUB_TOKEN env var).
~/.gitlab-tokenGitLab API token (alternative: GITLAB_TOKEN env var).

Further reading

For per-command detail (full flag list, exit codes, examples), run git machete help <command> (e.g. git machete help traverse). It prints the same content as the readthedocs page for that subcommand, but in a single plain-text response that's cheap to ingest.

© VirtusLab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/git-machete of VirtusLab/git-machete.

Open the folder on GitHubat commit 7d88494

Compare with similar skills

Git Machete next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Machete compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Machete this skillVirtusLab/git-machete1.1k—~6.1kAutomated safety check: PassMIT
degit Project ScaffoldingRich-Harris/degit7.9k—~534Automated safety check: PassMIT
MR and PR Description Draftertabler/tabler42k—~2kAutomated safety check: PassMIT
Git Init Remoteexception-coder/npe_get_jobs176—~662Automated safety check: PassCustom licence
Git Smart Pushexception-coder/npe_get_jobs176—~2.4kAutomated safety check: NotesCustom licence
Conventional Gitsamber/cc-skills228—~1.8kAutomated safety check: PassMIT

Similar skills

  • degit Project Scaffolding

    Rich-Harris/degit

    Downloads a repository snapshot or template with degit into an empty folder, from GitHub, GitLab, Bitbucket, Sourcehut or a Gist, optionally at a branch, tag or commit.

    7.9k GitHub stars~534 tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Drafts a merge request or pull request title and body in simple English from the branch's git history and diff against origin/dev, ready to paste into GitLab or GitHub.

    42k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Init Remote

    exception-coder/npe_get_jobs

    Initialize git in a local project without a repository, connect it to a remote, and generate a proper .gitignore.

    176 GitHub stars~662 tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Git Smart Push

    exception-coder/npe_get_jobs

    Analyze local code changes, automatically generate meaningful commit messages based on the changes, and push to remote repository (GitHub, GitLab, Gitee, Alibaba Cloud DevOps, etc.).

    176 GitHub stars~2.4k tokensUpdated 14 days ago
    DevelopmentAuto-check: notes
  • Conventional Git

    samber/cc-skills

    Conventional Commits v1.0.0 branch naming, worktree naming, and commit message standards for GitHub and GitLab projects.

    228 GitHub stars~1.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Dev PR

    codeaholicguy/ai-devkit

    AI DevKit · Publish a ready feature branch for review. An agent skill from codeaholicguy/ai-devkit.

    1.6k GitHub stars~613 tokensUpdated yesterday
    DevelopmentAuto-check passed

Works with

Categories

Questions about Git Machete

What does Git Machete do?

A skill your agent uses whenever invoking the git machete CLI to organize branch chains, compute fork points, run stacked rebases/merges, or manage GitHub/GitLab PR/MR chains - especially in a repo…. Git Machete is an agent skill from VirtusLab/git-machete.git/machete file.

When should I use Git Machete?

Git Machete fits situations like: invoking the git machete CLI to organize branch chains; compute fork points; run stacked rebases/merges; manage GitHub/GitLab PR/MR chains - especially in a repo that already has a .git/machete file.

How do I install Git Machete in Claude Code?

Run `npx skills add VirtusLab/git-machete --skill git-machete -a claude-code`. Or copy the skill folder (skills/git-machete in VirtusLab/git-machete) into .claude/skills/git-machete in your project. Claude Code loads it when a task matches its description.

How do I install Git Machete in Codex?

Run `npx skills add VirtusLab/git-machete --skill git-machete -a codex`. Or copy the skill folder (skills/git-machete in VirtusLab/git-machete) into .agents/skills/git-machete in your project. Codex loads it when a task matches its description.

Can I use Git Machete in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VirtusLab/git-machete --skill git-machete -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-machete, .gemini/skills/git-machete, .github/skills/git-machete and .opencode/skills/git-machete in your project.

What does Git Machete need to run?

Going by SKILL.md and its folder, Git Machete needs the command-line tools its instructions call (git, gh, glab and go) and credentials named GITHUB_TOKEN and GITLAB_TOKEN.

Does Git Machete access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Git Machete safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Machete use?

Git Machete is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Machete use?

About 6.1k tokens (SKILL.md is roughly 25k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Machete?

Skills that share tags, products or a category with Git Machete: degit Project Scaffolding (Rich-Harris/degit, 7.9k stars), MR and PR Description Drafter (tabler/tabler, 42k stars), Git Init Remote (exception-coder/npe_get_jobs, 176 stars) and Git Smart Push (exception-coder/npe_get_jobs, 176 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Machete?

VirtusLab (a GitHub organization) maintains it in VirtusLab/git-machete, which has 1,142 GitHub stars. The repository was last updated on October 4, 2026.

Source: VirtusLab/git-machete on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.