Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By smykla-skalskiv2.1.7MITIn 1 marketplace
Stages only part of a file's changes for a commit without git add -p or a TTY, selecting hunks by ID, regex or line range. Pattern and range modes need the optional patchutils package.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
git-staging, hunk-staging, partial-commit, selective-add, git-add-p, non-interactive, diff, staging ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Non-interactive hunk staging. Stage only your changes when a file has edits from multiple sessions or agents. Commit part of a file without git add -p. Works without a TTY.
The plugin is a portable Agent Plugin with one Agent Skill, so the same package works in Claude Code, Codex, Copilot CLI and opencode.
Claude Code (Copilot CLI is the same with copilot in place of claude):
claude plugin marketplace add smykla-skalski/sai
claude plugin install git-stage-hunk@sai
Codex:
codex plugin marketplace add smykla-skalski/sai
codex plugin add git-stage-hunk@sai
opencode, or any agent that reads Agent Skills, loads skills/git-stage-hunk/ directly:
ln -s /path/to/sai/plugins/git-stage-hunk/skills/git-stage-hunk ~/.config/opencode/skills/git-stage-hunk
Local checkout: claude --plugin-dir /path/to/sai/plugins/git-stage-hunk/
In Claude Code and Copilot CLI use /git-stage-hunk, in Codex $git-stage-hunk. Codex only runs it when you name it, because it writes the git index. The script runs from the skill's scripts/ directory against the repository in your current working directory.
Non-interactive hunk staging for selective git add. Lists hunks with stable IDs, then stages by ID, pattern, file, or line range. Supports splitting large hunks into sub-hunks when multiple changes got merged by git's default context.
/git-stage-hunk --list --table
/git-stage-hunk --list --file src/auth.ts --table
/git-stage-hunk --list --split --table
/git-stage-hunk --split H3
/git-stage-hunk --hunk H1,H3 --table
/git-stage-hunk --hunk H3.1,H3.2 --table
/git-stage-hunk --hunk H3:5-10 --table
/git-stage-hunk --hunk H1,H3.2,H5:10-15 --table
/git-stage-hunk --hunk H2 --dry-run --table
/git-stage-hunk --pattern 'handleAuth' --table
/git-stage-hunk --file src/auth.ts --table
/git-stage-hunk --range src/auth.ts:45-60 --table
/git-stage-hunk --verify --table
| Flag | Purpose |
|---|---|
--list | List all unstaged hunks with IDs and previews |
--list --file PATH | List hunks filtered to file(s) |
--list --split | List all hunks with sub-hunk breakdown |
--split H3 | Show sub-hunks for one specific hunk |
--hunk H1,H2 | Stage specific hunks by global ID |
--hunk H3.1 | Stage sub-hunks by dot-notation ID |
--hunk H3:5-10 | Stage hunk-relative lines within a hunk |
--pattern REGEX | Stage hunks matching regex (needs patchutils) |
--file PATH | Stage all hunks for file(s) |
--range FILE:S-E | Stage hunks in line range (needs patchutils) |
--table | Output as markdown table (default is NDJSON) |
--dry-run | Preview without applying |
--verify | Show staged vs unstaged summary |
--file has dual behavior: with --list it filters the listing, without --list it stages all hunks for that file.
--pattern and --range modes)Install patchutils: brew install patchutils (macOS) or apt install patchutils (Debian/Ubuntu). The plugin works without it using a pure-Python fallback for --list, --hunk, and --file modes.
MIT
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub smykla-skalski/sai --plugin git-stage-hunkPlugins from other owners that cover similar ground