prompts/skills/git-lines/SKILL.md
Stages specific lines from git diffs when hunk-level staging is too coarse. Use when a file contains multiple unrelated changes that need separate semantic commits, split commits, partial staging, or cherry-picking specific lines. Requires git-lines tool on PATH.
npx skillsauth add ramblurr/nix-devenv git-linesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The git-lines tool must be installed and on PATH:
git-lines --version # verify installation
Important: Use normal git for viewing changes, staging whole files, and committing. Only use git-lines for the specific task of staging individual lines.
git diff # review changes (normal git)
↓ decide: "need to split this file"
git lines diff config.rs # get line numbers
git lines stage config.rs:10 # stage first change
git commit -m "feat: first change"
git lines stage config.rs:25 # stage second change
git commit -m "fix: second change"
Can be invoked as git-lines or git lines (if on PATH).
View line numbers (only when you intend to stage):
git lines diff # all changed files
git lines diff file.rs # specific file
Example output:
file.rs:
+10: new_function();
-25: old_code();
+26: replacement_code();
+40: another_addition();
Stage specific lines:
git lines stage file.rs:10 # single addition
git lines stage file.rs:-25 # single deletion
git lines stage file.rs:-25,26 # replacement (delete old, add new)
git lines stage file.rs:10..20 # range of additions
git lines stage file.rs:10,15,-20 # multiple (mixed)
git lines stage a.rs:5 b.rs:10 # multiple files
git lines stage -q file.rs:10 # quiet mode (no output)
After staging, shows what was staged:
Staged:
file.rs:
-25: old_code();
+25: replacement_code();
Use --quiet / -q to suppress this output.
Line numbers always refer to working tree positions, which don't change until you edit the file. You can run multiple git lines stage commands using line numbers from the same initial git lines diff output.
testing
Use this OCP when executing or preparing to execute commands that change a live or important system, service reloads/restarts, package changes, deployments, migrations, firewall/network/access changes, credential rotation, NixOS switch/test/boot/deploy, or incident mitigation. It guides safe operations with a persisted ledger for scope, preflight, baseline, rollback, validation, and evidence.
development
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
documentation
Naming conventions for workflow documents in prompts/. Use when creating plans, PRDs, research reports, idea capture or other workflow documents. Triggers on (1) creating new planning documents, (2) naming PRDs or research reports, (3) questions about document organization in prompts/.
testing
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.