git-edit-commit

git-edit-commit is a skill for Claude Code from LandonSchropp/agent-toolkit. It costs 51 tokens per session (635 once invoked), scanned A, original, MIT.

A helper for changing the order or content of commits already recorded in a Git branch. Git is a version-control system, and these changes are commonly called rebasing or editing history.

In plain words
What is it for?
Use it to fix up, combine, remove, rename, reorder, or otherwise edit commits without relying on an interactive terminal.
Why use it?
Interactive Git rebase normally needs a terminal interface that coding agents may not have.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ls-git plugin — 8 skills, 1 hook shipped together

Good fit Use it to fix up, combine, remove, rename, reorder, or otherwise edit commits without relying on an interactive terminal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/landonschropp/agent-toolkit/git-edit-commit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LandonSchropp/agent-toolkit --skill git-edit-commit
Clone the repo
git clone --depth 1 https://github.com/LandonSchropp/agent-toolkit

Made for: Claude Code.

Or install ls-git, the plugin that ships this one along with the rest of its 8 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-edit-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/git-edit-commit/github.svg)](https://agentmods.dev/skills/landonschropp/agent-toolkit/git-edit-commit)
Your own site
<a href="https://agentmods.dev/skills/landonschropp/agent-toolkit/git-edit-commit"><img src="https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/git-edit-commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-edit-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/landonschropp/agent-toolkit/git-edit-commit"><img src="https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/git-edit-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 635 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00635
Opus 5.5 $0.00020 $0.00254
Sonnet 5.5 $0.00010 $0.00127
Haiku 4.5 $0.00005 $0.00064

Measured 1mo ago against content hash b3cf4c5e5634, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-edit-commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/commit-message-editor.sh, scripts/non-interactive-git-rebase.sh, scripts/reword-commit.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ls-git/skills/git-edit-commit/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Edit Commit

This skill outlines how agents can edit previous commits. Agents can't use git rebase -i directly, which requires a TTY. This skill provides helper scripts instead.

REQUIRED: Always reference commits by SHA, not by HEAD-relative notation like HEAD~3.

Inspect Commits First

Run git log --oneline to get SHAs. Output is newest-first; the rebase plan is oldest-first.

Amending the Latest Commit

To fold staged changes into the most recent commit without changing its message:

git add <files>
git commit --amend --no-edit
git commit --fixup=<target-sha>   # merge into target, discard message
git commit --squash=<target-sha>  # merge into target, combine messages

# <oldest-sha-in-scope>^ is the parent of the oldest commit in scope; use --root if it's the first commit
scripts/non-interactive-git-rebase.sh --autosquash <oldest-sha-in-scope>^

Drop, Reorder, Edit

Use scripts/non-interactive-git-rebase.sh. Supply the plan via stdin. Use --root when the oldest commit in scope is the repository's first commit.

scripts/non-interactive-git-rebase.sh <oldest-sha-in-scope>^ <<'PLAN'
pick abc1234 Keep this commit
squash def5678 Merge this into the previous
drop ghi9012 Remove this commit entirely
PLAN

Edit

Mark the commit edit in the plan. Git pauses there. Then:

git add <files>
git commit --amend --no-edit
git rebase --continue

Reword

scripts/reword-commit.sh --sha <sha> --message "New commit message"

Rationalizations

Thought Reality
"I can't do interactive rebase without a TTY" Use scripts/non-interactive-git-rebase.sh instead
"I'll use HEAD~N as the upstream" Use a SHA — HEAD~N is fragile and ambiguous
"I'll just --amend instead" (for an older commit) --amend only works on the latest commit; use rebase for others
"I'll undo the commits and redo them one by one" Rebase rewrites history in one step — no need to redo commits
"I'll create a new commit to fix it" That pollutes history; rebase is the right tool

Read the full file on GitHub · 72 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +1 lines · +5 tokens per session b3cf4c5e5634
  2. 1mo ago First seen · 71 lines · 46 tokens per session scan A 91a3f466a86d

Subscribe to this mod's changes

git-edit-commit is a skill published in the GitHub repository LandonSchropp/agent-toolkit (3 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 635 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.