git-branchless
Enforce idiomatic git-branchless during planning and executing tasks — detached-HEAD-first work, in-memory rebase via `git move`, event-log recovery via `git…
Skill by OutlineDriven
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/outlinedriven-git-branchless
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/git-branchless
What's inside
- Skill name
git-branchless- Description
- Enforce idiomatic git-branchless during planning and executing tasks — detached-HEAD-first work, in-memory rebase via `git move`, event-log recovery via `git undo`, deferred branch creation, speculative-merge `git sync` for base updates. Use when planning or executing multi-commit work, history rewrites, stack edits, rebase/reorder, fixup insertion mid-stack, stacked-PR publishing, or recovery from bad git ops; or when the user mentions branchless, smartlog, `git move`, or `git undo`. Silently inert if branchless is not initialized for the current repo.
- License
- Apache-2.0
- Instructions
- 137 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- commands.md · references/
- recipes.md · references/
- recovery.md · references/
SKILL.md (first lines)
# Git-branchless
Branchless treats commits as checkpoints, detached HEAD as the default
work mode, and branches as publishing artifacts. This skill enforces that
mental model and routes every common git workflow to its branchless
equivalent. Reference docs:
- `references/commands.md` — every command, flag, revset, config key.
- `references/recipes.md` — concrete sequences + decision rubric.
- `references/recovery.md` — undo, restack, hide, snapshot, GC semantics.
---
## Pre-flight gate [LOAD-BEARING]
Before applying any rule below, confirm branchless is initialized for the
current repository. Run:
```
test -d "$(git rev-parse --git-common-dir)/branchless" && git config --get branchless.core.mainBranch
```
(Resolving the git-common-dir handles linked worktrees, where `.git` is a
file rather than a directory and branchless state lives in the main repo's
git dir.)
| Result | Skill behavior |
|--------|----------------|
| Both succeed | Skill is active. Apply the rules below. Acknowledge with one line: `git-branchless active — main=<value>`. |
| Either fails | Skill is **silently inert**. Emit one line: `git-branchless not initialized; skill inactive`. Yield to plain git. Do **not** suggest `git branchless init` unless the user explicitly asks how to enable. |
The inert path is intentional. This skill does not nag and does not refuse
legitimate work in repos where branchless was never adopted.
---
## Always / Never (operation-class framing)
Each rule names an **operation class**, not a command. Plain-git commands
are fine when they fall outside the class.
| Class | Always | Never |
|-------|--------|-------|
| **Stack edits** (reorder, fixup, squash, split) | `git move`, `git move -F`, `git reword`, and `git split` where available `[v0.11.0+]` (use the Recipe 4 workaround on older versions). | `git rebase -i` to drive stack edits. |
| **Base updates** (rebase a stack onto fresh main) | `git sync --pull` (or `git move -b 'stack()' -d origin/main`). Read the skip summary. | `git pull --rebase` against a stack. |
| **Undoing committed history** | `git undo -i`. | `git reset --hard <SHA>` against any commit you have already made. |
| **Discarding local work in progress** | `git hide -r <tip>` (recoverable). | `git branch -D` or `git reset --hard` purely to wipe. |
| **Branch creation for ephemeral work** | Detached HEAD until publish; commit immediately, branch later. | `git checkout -b feature/X` before the first commit exists. |
| **Publishing** | Branch the tip then `git push -u`, or `git submit -c` on supported forges. | Force-push as a way to "fix" your local history. |
Edge cases that are still legitimate (do not block these):
- `git reset --soft HEAD~` against staging when nothing has been committed yet.
- `git rebase --onto` for a one-off, non-interactive upstream sync in a repo where branchless is not initialized (the skill is inert there anyway).
- `git checkout -b` when the work is genuinely about to be pushed.
---
## Workflow phases
```
Init → git branchless init (one-time per repo)
Work → git switch --detach origin/main → edit → git commit (or git record)
Refine → git move | git move --fixup | git amend | git reword | git split [v0.11.0+]
Sync → git sync --pull (re-base onto fresh main; read skip summary)
Verify → git test run --exec '<cmd>' 'stack()' (revset is positional)
Publish→ git branch <name> <tip> && git push -u origin <name>
(or git submit -c on Phabricator; treat GitHub forge as experimental)
Recover→ git undo -i (event-log walk replaces reflog spelunking)
```
Restack is mostly automatic. After `git amend`, `git reword`, `git move`,
or `git split`, descendants are auto-restacked in-memory. Run
`git restack` manually only when the smartlog warns about abandoned
subtrees (`✕` ancestors).
---
## Decision rubric (quick lookup)
| Goal | Command sequence |
|------|------------------|
| Insert a fixup mid-stack | `git commit --fixup <target>` then `git move -s HEAD -d <target> --fixup` |
| Reorder commits | `git move -s <src> -d <dest>` |
| Squash two commits | `git move -s <child> -d <parent> --fixup` |
| Split a commit | `git split <commit>` `[v0.11.0+]` (or workaround in `recipes.md` Recipe 4) |
| Rebase stack onto main | `git sync --pull` |
| Find first failing commit | `git test run --search binary --exec '<cmd>' 'stack()'` |
| Recover lost work | `git undo -i` |
| Discard a local experiment | `git hide -r <tip>` |
| Publish | `git branch <name> <tip>` then `git push -u`, or `git submit -c` |
Full recipes with rationale: `references/recipes.md`.
---
## Hand-off
- **`atomic-commit`** is the per-commit-grouping concern. Pair this skill
with `atomic-commit` when the task is "commit my changes" — branchless
handles workflow, atomic-commit handles per-change boundaries.
- **`git-guardrails-claude-code`** is the complementary block-list hook.
This skill teaches the branchless idioms; that skill enforces a hard
block on `git push --force`, `git reset --hard`, and similar. They
coexist — the hook surfaces a refusal, this skill surfaces the right
alternative.
- **`fix`** drives iterative repair via per-iteration commits + revert
protocol. `fix` already uses `git revert HEAD --no-edit` (event-log-friendly)
rather than `git reset --hard`; this skill is consistent with that.
ODIN-baseline agents already have an abridged branchless cheat-sheet in
their style block. This skill is the canonical, deeper reference for both
ODIN and non-ODIN agents — it does not depend on the baseline being loaded.
---
## Self-skepticism notes
Things this skill is **uncertain** about and treats accordingly:From OutlineDriven/odin-codex-plugin, Apache-2.0.
More from OutlineDriven/odin-codex-plugin
- 0.525score
improve-codebase-architecture
OutlineDriven
Surface deepening refactors that turn shallow modules into deep ones, informed by `CONTEXT.md` and `docs/adr/`.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
proof-driven
OutlineDriven
Proof-driven development.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
domain-model
OutlineDriven
Grill against the existing domain model.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
gh-fix-ci
OutlineDriven
Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize the failure, then plan and implement the fix after user approval.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
memory-update
OutlineDriven
Scan agent's session-history transcripts for save-worthy signals (corrections, preferences, decisions, references), propose and write auto-memory files with…
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
memory-sanitize
OutlineDriven
Produce share-safe copies of memory files under /tmp with PII redacted (paths, emails, session IDs, dates) and credentials scanned (tokens, keys); never…
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
cleanup-codebase
OutlineDriven
Reduce concepts, duplication, and ceremony in internal code while touching nearby code.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
design-by-contract
OutlineDriven
Design-by-Contract (DbC) development.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
fix
OutlineDriven
Polymorphic iterative repair loop — accept a verifier failure, structured findings (review/resolve/triage-issue), or a bug description; modify→verify→keep on…
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
design
OutlineDriven
Set visual and interaction direction for any UI surface (web, React, TUI, CLI, desktop, Qt, design-system tokens) before any UI code.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
memory-clean
OutlineDriven
Audit memory directory for structural issues (orphans, dangling refs, duplicates, missing sections, oversized entries) and staleness against session-history…
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
setup-gitignore
OutlineDriven
Initialize or idempotently revise the repo's .gitignore by composing gitignore.io templates, AI-tooling/IDE patterns, and confirmed noise from git status.
SkillCFreshness: C★ 14Claude Code +9
Signals
- Stars
- 14
- Forks
- 2
- Open issues
- 2
- Last commit (this folder)
- Apr 28, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Website
- outlinedriven.github.io
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from OutlineDriven
- 0.525score
design-by-contract
OutlineDriven
Design-by-Contract (DbC) development.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
fix
OutlineDriven
Polymorphic iterative repair loop — accept a verifier failure, structured findings (review/resolve/triage-issue), or a bug description; modify→verify→keep on…
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
cleanup-codebase
OutlineDriven
Reduce concepts, duplication, and ceremony in internal code while touching nearby code.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
design
OutlineDriven
Set visual and interaction direction for any UI surface (web, React, TUI, CLI, desktop, Qt, design-system tokens) before any UI code.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
domain-model
OutlineDriven
Grill against the existing domain model.
SkillCFreshness: C★ 14Claude Code +9 - 0.525score
gh-fix-ci
OutlineDriven
Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize the failure, then plan and implement the fix after user approval.
SkillCFreshness: C★ 14Claude Code +9
Cite this page
git-branchless skill. Agent Mart. https://agentmart.dev/skills/outlinedriven-git-branchless (last updated 2026-10-24)