cli-lazygit
Skill3 starsChanged 8 months agoMITView on GitHub
Covers effective use of lazygit for terminal UI git operations including staging, committing, pushing, branching, interactive rebase, merge conflict resolution, cherry-pick, bisect, and worktrees. Activates when the user asks about lazygit, TUI git workflows, or interactive git operations.
- Commits and pushes
In this repository95 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-architectSkill
- architect-plan-for-dispatchSkill
- automate-auditSkill
- brain-dumpSkill
- chat-to-code-promptSkill
- cli-apifySkill
- cli-batSkill
- cli-duckdbSkill
- cli-fdSkill
- cli-ffmpegSkill
- cli-fzfSkill
- cli-ghSkill
- cli-httpieSkill
- cli-imagemagickSkill
- cli-jqSkill
- cli-pandocSkill
- cli-playwrightSkill
- cli-ripgrepSkill
- cli-sqliteSkill
- cli-yqSkill
- cli-yt-dlpSkill
- codebase-reviewSkill
- context-summarySkill
- decomposeSkill
- delegateSkill
- design-a-systemSkill
- design-doc-reviewSkill
- devils-advocateSkill
- gh-repo-createSkill
- ig-savesSkill
- interrogateSkill
- mentor-aristotleSkill
- mentor-attiaSkill
- mentor-aureliusSkill
- mentor-bloomSkill
- mentor-brownSkill
- mentor-buffettSkill
- mentor-builderSkill
- mentor-carnegieSkill
- mentor-clearSkill
- mentor-councilSkill
- mentor-cunninghamSkill
- mentor-dalioSkill
- mentor-davinciSkill
- mentor-demingSkill
- mentor-ferrissSkill
- mentor-feynmanSkill
- mentor-franklSkill
- mentor-garyveeSkill
- mentor-godinSkill
- mentor-gogginsSkill
- mentor-greeneSkill
- mentor-holidaySkill
- mentor-hormoziSkill
- mentor-houselSkill
- mentor-jockoSkill
- mentor-jungSkill
- mentor-kahnemanSkill
- mentor-kingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 241
ripgrep (cli-ripgrep): Use rg to find which files contain a pattern before opening lazygit to selectively stage only relevant hunks
- Very specific: line 242
fd (cli-fd): Use fd to locate files that changed before opening lazygit focused on that path with lazygit -p
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
lazygit — Terminal UI for Git
Repo: https://github.com/jesseduffield/lazygit
Full-featured terminal UI for git. Navigate your repo, stage changes, commit, push/pull, manage branches, resolve conflicts, and run interactive rebases — all without leaving the terminal.
When to Activate
Manual triggers:
- "How do I use lazygit?"
- "Interactive git TUI"
- "Stage individual lines in the terminal"
- "Interactive rebase without memorizing flags"
Auto-detect triggers:
- User wants to stage hunks or individual lines interactively
- User wants to resolve merge conflicts in the terminal
- User wants to cherry-pick commits across branches
- User wants to run interactive rebase with a visual UI
- User wants to bisect or manage worktrees interactively
Key Bindings
Navigation (Global)
hjkl / arrow keys Navigate panels and lists
[ ] Switch between panels (left/right)
<tab> Cycle focus between panels
q Quit lazygit
? Show keybinding help for current panel
: Run a custom git commandFiles Panel
space Stage / unstage file
a Stage all / unstage all
c Commit staged changes
A Amend last commit
e Open file in editor
d Discard file changes
Enter Expand file to view diff / stage by hunkStaging by Hunk or Line
# In expanded diff view (press Enter on a file):
space Stage / unstage hunk
v Toggle line selection mode
space (line mode) Stage / unstage selected lines
= Increase context lines
- Decrease context linesCommits Panel
Enter View commit diff
r Rename/reword commit message
R Reword with editor
d Drop commit
s Squash into parent
f Fixup into parent
e Edit commit (interactive rebase stop)
p Pick commit
t Revert commit
c Copy commit (cherry-pick)
C Copy commit range (cherry-pick)
v Paste (apply cherry-picks)
i Start interactive rebase from this commitBranches Panel
b Open branches panel
space Checkout branch
n New branch
d Delete branch
r Rebase current branch onto selected
M Merge selected branch into current
f Fast-forward branch
Enter View commits on branchStash Panel
s Stash changes (all)
S Stash options (staged, untracked, etc.)
space Apply stash
g Pop stash
d Drop stashSync (Push/Pull)
p Pull (current branch)
P Push (current branch)
f Fetch all remotesAdvanced Patterns
Interactive Rebase
# In Commits panel: position cursor on the oldest commit you want to rebase
# Press i — opens interactive rebase mode
# Use e to edit, s to squash, f to fixup, d to drop, r to reword
# Changes are applied as you move through the rebaseMerge Conflict Resolution
# When a conflict exists, lazygit shows conflict markers in the diff panel
# Navigate to the conflicted file — press Enter to expand
# Use:
# 1 — pick "ours" (current branch)
# 2 — pick "theirs" (incoming)
# 3 — pick both
# e — open in editor for manual resolution
# After resolving all conflicts, stage the file and continueCherry-Pick Workflow
# In Commits panel on source branch:
c # Copy commit (marks it for cherry-pick)
C # Copy commit range (mark start, then C on end)
# Switch to target branch (Branches panel → space)
v # Paste (apply all copied commits)Bisect
# In Commits panel:
b # Start bisect (mark current commit as bad)
# Navigate to a known-good commit → mark good
# lazygit checks out the midpoint automatically
# Mark each as good/bad until the culprit is foundWorktrees
# In the worktrees panel (W key from any panel):
n # Create a new worktree
space # Switch to worktree
d # Remove worktreeCustom Commands
# ~/.config/lazygit/config.yml
customCommands:
- key: "C"
command: "git commit -m '{{index .PromptResponses 0}}'"
context: "files"
prompts:
- type: "input"
title: "Commit message"
- key: "<c-r>"
command: "gh pr create --fill"
context: "files"
description: "Open PR on GitHub"Reviewing AI-Generated Diffs
# After applying an AI-suggested patch or large diff:
# 1. Open lazygit — the Files panel shows changed files
# 2. Press Enter on each file to expand the diff
# 3. Use line-level staging (v mode) to accept only the parts you want
# 4. Stage approved hunks, discard unwanted ones with d
# 5. Commit staged portion, leaving the rest for reviewBulk Operations
# Stage all files: a (in Files panel)
# Discard all changes: d (in Files panel, on "all files" row)
# Drop multiple commits: select with space → d (in Commits panel)
# Delete multiple branches: select with space → d (in Branches panel)Practical Examples
# Launch lazygit in current repo
lazygit
# Launch in a specific directory
lazygit -p /path/to/repo
# Launch with a specific git config
LG_CONFIG_FILE=~/.config/lazygit/work.yml lazygitTypical Commit Workflow
1. Files panel shows unstaged changes
2. Press Enter on a file to review diff
3. Use v + space to stage specific lines
4. Press Esc to return to Files panel
5. Press c to commit → type message → Enter
6. Press P to pushConfiguration
# ~/.config/lazygit/config.yml
gui:
theme:
activeBorderColor: ["green", "bold"]
showFileTree: true
splitDiff: "auto"
git:
paging:
colorArg: always
pager: delta --dark --paging=never # use delta as pager
commit:
signOff: false
merging:
manualCommit: false
log:
order: "topo-order"Chaining with Other Skills
- gh (GitHub CLI): Bind a custom command to run
gh pr createorgh pr viewfrom within lazygit's files panel - ripgrep (cli-ripgrep): Use rg to find which files contain a pattern before opening lazygit to selectively stage only relevant hunks
- fd (cli-fd): Use fd to locate files that changed before opening lazygit focused on that path with
lazygit -p - delta: Set
git.paging.pager: deltain lazygit config for side-by-side diffs with syntax highlighting inside the TUI
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

