GTST-17 feat: add Claude Code skill for gitsift selective staging#14
GTST-17 feat: add Claude Code skill for gitsift selective staging#14
Conversation
- Skill teaches agents how to use gitsift for selective staging - Covers: hunk-level staging, line-level staging, multi-commit workflows - Gotchas from real testing: untracked files workaround, merged hunks, re-diff after stage, one mode per request, 0-based indices - Tested in real repo with 5 scenarios (all passing with workarounds)
Review -- Opus 4.6Review ResultOverall Verdict: HAS_ISSUES 1. CorrectnessVerdict: HAS_ISSUES IssuesImportant
Minor
Fix Instructions
2. ArchitectureVerdict: HAS_ISSUES IssuesImportant
Minor
Fix InstructionsAdd a section after "Stage by line" or in the "Response Format" area covering protocol mode: ## Protocol Mode (Long-Running Sessions)
For persistent agent sessions, use protocol mode to avoid process spawn overhead:
```bash
gitsift protocolSend JSON-lines requests on stdin, receive JSON-lines responses on stdout: {"method": "diff", "params": {"file": "src/main.rs"}}
{"method": "stage", "params": {"hunk_ids": ["abc123"]}}
{"method": "status"}Each response uses the same envelope format. All logs go to stderr only. |
- Fix JSON example: add missing hunk fields (file_path, old_start, etc.) - Fix content values: remove diff prefix chars (content is raw text) - Add note clarifying content format - Add Protocol Mode section covering gitsift protocol for persistent sessions
Summary
Add a Claude Code skill that teaches agents how to use gitsift for selective staging.
Users can copy
skills/gitsift-staging/into their.claude/skills/to enable it.What the skill covers
--hunk-ids--from-stdinandline_selectionsGotchas (from real testing)
git addnew files first (GTST-18)Tested scenarios