Skip to content
Development
Skill

/git-master

MUST USE for ANY git operations: atomic commits, rebase/squash/fixup, and history search (blame, bisect, log -S, reflog). Load it before running git yourself, or pass load_skills=['git-master'] to the task that commits. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when

From plugin
lazycodex
3.9k28 skills5 MCP

Claude Code

$ npx -y skills add code-yeongyu/lazycodex --skill git-master --agent claude-code

SKILL.md

git-master.SKILL.md
name: git-master
description: "MUST USE for ANY git operations: atomic commits, rebase/squash/fixup, and history search (blame, bisect, log -S, reflog). Load it before running git yourself, or pass load_skills=['git-master'] to the task that commits. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'."

Git Master

Use this skill when the user asks you to operate on Git history or answer a Git-history question. Be exact, conservative, and evidence-led. Read the repository state before you infer anything.

Mode Gate

Classify the request first:

  • `COMMIT`: stage and commit local changes.
  • `REBASE`: rebase, squash, fixup, autosquash, reorder, split, or otherwise rewrite branch history.
  • `HISTORY`: answer when, where, who, why, or which commit changed something.
  • `STATUS`: inspect branch, diff, or working-tree state without changing it.

Do not commit, rebase, push, force-push, reset, stash-pop, or delete anything unless the user explicitly asked for that operation. When a workflow the user started mandates one of them (ulw-loop commits each verified unit, ulw-execute lands its branches), that workflow's instruction is the ask. If the request is only investigative, report findings and stop.

Ground Truth

Gather independent facts in parallel when the tools allow it:

git status --short
git diff --stat
git diff --staged --stat
git branch --show-current
git log -30 --oneline
git log -30 --pretty=format:%s
git rev-parse --abbrev-ref @{upstream}
git merge-base HEAD origin/main
git merge-base HEAD origin/master

Missing upstream or missing `main`/`master` is normal. Fall back to the best available branch or report the missing fact. Never treat a failed lookup as proof.

PR Body Evidence Attachments

When a PR body needs screenshots or terminal PNGs, the allowed hosting path is GitHub user attachments from the authenticated web attachment flow; never commit temporary images, never use GitHub Releases for PR evidence, and never use external image hosts. Do not log browser cookies, CSRF tokens, S3 form fields, or upload headers.

The flow needs an authenticated GitHub web session (a `gh` API token alone is not enough):

1. Open the target PR or issue page in that session and read its file-attachment CSRF token and repository id. 2. `POST https://github.com/upload/policies/assets` with `repository_id`, `name`, `size`, `content_type`, and that token as `authenticity_token`. 3. Upload the bytes to the returned S3 URL with the returned form fields exactly as given. 4. `PUT https://github.com/upload/assets/:id` with the returned `asset_upload_authenticity_token`. 5. Put only the final `https://github.com/user-attachments/assets/<uuid>` URL in the PR body (write the body to a temp file and pass it with `gh pr edit --body-file`).

If no authenticated browser session is available, leave the local evidence paths in the PR body and state the blocker.

Commit Mode

Commit only the user's requested changes. Preserve unrelated dirty work.

1. Detect message style from recent history. Use the dominant local pattern, language, and casing. Do not default to Conventional Commits unless the repo uses them. 2. Inspect the full diff, not only filenames. Separate unrelated user edits from the requested commit. 3. Build atomic groups by behavior, module, and revertability. Keep implementation and its direct tests together. 4. Prefer multiple commits for unrelated concerns. A single commit is acceptable only when the changed files form one indivisible behavior or the user explicitly asks for one commit. 5. Stage by path or hunk so each commit contains only its atomic group. 6. Before each commit, verify `git diff --staged --stat` and enough staged diff to prove the group is right. 7. Commit with the detected style. After each commit, verify `git log -1 --oneline`.

Grouping rules:

  • Split different features, modules, generated artifacts, config, docs, and test-only changes unless they are inseparable.
  • Keep generated files with the source change that produced them when omitting them would leave the repo inconsistent.
  • Never hide failing or unrelated changes inside a broad commit.

Final report: list commit hashes, messages, and any remaining uncommitted files.

Rebase Mode

History rewriting is a shared-impact operation.

  • Never rebase or rewrite `main`, `master`, `dev`, release branches, or a protected branch unless the user explicitly named that exact operation.
  • If commits may already be pushed, ask before force-pushing. Use `--force-with-lease`, never plain `--force`.
  • If the worktree is dirty, preserve it intentionally before rebasing. Do not stash-pop over conflicts without checking what changed.
  • For fixups, prefer `git commit --fixup=<hash>` followed by `GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash <base>`.
  • For conflicts, read the conflicting files and resolve by intent. Do not choose ours/theirs blindly.
  • If a rebase goes wrong, use `git rebase --abort` first. Use reflog only after explaining the recovery path.

After rewriting, run the relevant tests or at least the project's cheapest smoke check, then show the new branch log from base to HEAD.

History Mode

Choose the Git tool by the question:

  • `git log -S "text"`: when the count of an exact string changed.
  • `git log -G "regex"`: when diffs touched lines matching a pattern.
  • `git blame -L start,end -- file`: who last changed specific lines.
  • `git log --follow -- file`: history across renames for one file.
  • `git show <hash>`: inspect the commit that appears relevant.
  • `git bisect`: find the first bad commit when there is a deterministic pass/fail command and known good/bad bounds.
  • `git reflog`: recover or explain recent local history movement.

Always cite the exact command evidence in the answer: commit hash, subject, file path, and line or diff context when relevant. If the evidence is ambiguous, say what remains unproven.

Safety Checks

Before

Read more
@code-yeongyu
Ships withlazycodex

The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.

3.9k28 skills5 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
3.9k
Star history of code-yeongyu/lazycodex on GitHub, a chart by star-history.com

Other skills on lazycodex.

comment-checker

comment-checker

Use when Codex needs to understand or respond to automatic comment-checker feedback emitted after an edit-like PostToolUse hook.

lcx-doctor

lcx-doctor

Diagnose LazyCodex and Codex CLI installation health against the latest sources. Use whenever the user asks for a doctor or…

lcx-report-bug

lcx-report-bug

Create a high-signal bug issue or PR in the repo that owns the defect. Use this whenever the user asks to report, file, open, or…

lsp

lsp

Use when Codex needs language-server diagnostics, definitions, references, symbols, or rename safety checks in the current…

rules

rules

Use when the user asks about Codex Rules behavior, injected project rules, supported rule file locations, matching, or…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about git-master.

Which coding agents can use git-master?
git-master installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.