modify

modify is a command for Claude Code from pleaseai/claude-code-plugins. It costs 20 tokens per session (588 once invoked), scanned A, original, MIT.

A Git branch editing command that either updates the current commit or creates a new one, then reapplies later branches on top. Git is the system that records code changes in commits and branches.

In plain words
What is it for?
Use it to amend staged changes, make a new commit, or apply changes to an ancestor branch. It is useful when working with stacked branches, where each branch depends on the one below it.
Why use it?
It keeps dependent branches aligned after changing an earlier commit, reducing manual rebasing and branch confusion.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the graphite plugin — 3 skills, 16 commands shipped together

Good fit Use it to amend staged changes, make a new commit, or apply changes to an ancestor branch. It is useful when working with stacked branches, where each branch depends on the one below it.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/pleaseai/claude-code-plugins/modify
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.

Clone the repo
git clone --depth 1 https://github.com/pleaseai/claude-code-plugins

Made for: Claude Code.

Or install graphite, the plugin that ships this one along with the rest of its 3 skills, 16 commands.

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 modify

README.md
[![agentmods](https://agentmods.dev/badge/commands/pleaseai/claude-code-plugins/modify/github.svg)](https://agentmods.dev/commands/pleaseai/claude-code-plugins/modify)
Your own site
<a href="https://agentmods.dev/commands/pleaseai/claude-code-plugins/modify"><img src="https://agentmods.dev/badge/commands/pleaseai/claude-code-plugins/modify/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 modify

Your own site · 80×15
<a href="https://agentmods.dev/commands/pleaseai/claude-code-plugins/modify"><img src="https://agentmods.dev/badge/commands/pleaseai/claude-code-plugins/modify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 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.00020 $0.00588
Opus 5 $0.00010 $0.00294
Sonnet 5 $0.00004 $0.00118
Haiku 4.5 $0.00002 $0.00059

Measured yesterday against content hash e573878d9129, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

modify 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 yesterday.

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/graphite/commands/modify.md · 50 lines

How it starts

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

Apply working-tree changes to the current branch and automatically restack every upstack descendant. User input: $ARGUMENTS.

Modes

  • Amend (default) — folds staged changes into the existing commit. PR keeps the same identity; force-push needed on next submit.
    gt modify -a              # stage all + amend
    gt modify                 # amend already-staged changes
    
  • New commit — adds a new commit on the same branch.
    gt modify -cam "fix tests"        # stage all + new commit with message
    gt modify -cm "fix tests"         # already-staged changes + new commit with message
    
    Always pass -m "<message>"gt modify -c alone opens $EDITOR for the message, which hangs in a non-interactive shell.
  • Into a downstack branch — amend changes into an ancestor branch, then restack upward.
    gt modify --into <ancestor-branch>
    

Steps

  1. Run git status --short and gt ls so the user sees what is staged and where it will land.
  2. Pick the mode from $ARGUMENTS. If ambiguous (multi-commit branch already exists), ask the user: amend or new commit? Amend keeps the branch single-commit (preferred Graphite style); new commit makes it a multi-commit branch that may need gt squash later.
  3. Run the chosen gt modify command.
  4. If the auto-restack hits conflicts:
    • Resolve in the editor.
    • gt add . to mark resolved.
    • gt continue -a to finish the restack chain.
    • gt abort to back out cleanly.
  5. Run gt ls to confirm the new state.

Key flags

  • -a, --all — stage all modified files before amending
  • -c, --commit — create a new commit instead of amending
  • -m, --message <msg> — commit message (for -c or to reword on amend)
  • -p, --patch — interactive hunk staging
  • --into <branch> — amend into a downstack branch in one step

When to use gt absorb instead

If the working-tree changes belong to multiple downstack branches (e.g. you fixed several bugs across the stack), use gt absorb -a — Graphite picks the right branch per hunk.

Read the full file on GitHub · 50 lines

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. yesterday First seen · 50 lines · 20 tokens per session scan A e573878d9129

Subscribe to this mod's changes

modify is a command published in the GitHub repository pleaseai/claude-code-plugins (13 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 588 once invoked, about $0.0001 per session on Opus 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-09-07.