/nlsmdn:commitfrom nlsmdn
Commit ONLY the changes this session made, never another agent's work in the same checkout. With a message argument, makes one commit; with no argument, splits the session's work into the fewest self-contained commits and generates a short message for each — feat/fix/chore in the user's own repos, the repo's own history convention elsewhere. Use when the user says "commit", "commit this", "commit my changes", "commit just my/this session's changes", or invokes commit — especially when multiple agents share one working tree.
Ships in nlsmdn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Commit the changes this session made — and nothing else. Multiple agents may
share one checkout; a plain git add -A / git add . would sweep in another
session's work. This skill stages by explicit path, and at hunk granularity when
a file was touched by more than one session.
/commit # split this session's work into logical commits, auto-message each
/commit "fix: correct pager" # one commit, using this message verbatim
An argument is always the message for a single commit — never split when one is given. With no argument, group into the fewest self-contained commits (Step 3).
Build the set of paths you edited this session from your own actions — the
Write, Edit, NotebookEdit, and file-creating Bash calls you ran. This is
the source of truth for ownership, not the working tree.
Run these (read-only) to compare your list against reality:
git status --porcelain
git diff --stat # unstaged
git diff --cached --stat # anything already staged
Anything changed in the tree that is NOT in your Step-1 list belongs to another session (or the user) — leave it alone.
If files are already staged that you did NOT edit, unstage them first so your
commit stays clean: git restore --staged <their-file>.
Argument given → one group containing everything from Step 1. Skip to Step 4.
Blank → partition your files into the fewest groups such that each group
is one self-contained unit of work. Read your own diff (git diff <your paths>)
if the split isn't obvious from the file list.
Keep in the same commit:
Split into separate commits only when two changes are genuinely independent: either could have been made without the other, and neither explains the other — e.g. a new feature in module A alongside an unrelated typo fix in module B.
Rules of thumb:
feat + its docs + its tests + its connected
chores is ONE commit, not four. Type is the wrong axis to cut on.Then run Steps 4–6 once per group, in order. Do not ask for confirmation of the grouping — just commit and report the result (Step 6).
Stage only the paths in the group you're currently committing. For each such path, decide file-level vs hunk-level:
File only you touched (its entire current diff is your work) → stage whole:
git add <path> # modified or new
git rm <path> # you deleted it
New files you created and untracked → git add <path>.
File you AND another session touched (its diff contains hunks you didn't write) → stage surgically with the helper so foreign hunks stay unstaged:
python3 scripts/stage-hunks.py <path> --list # numbered hunks
python3 scripts/stage-hunks.py <path> 1 3 4 # stage only yours
Identify "yours" by matching each hunk to an edit you actually made. When in doubt about a hunk, exclude it — under-committing is recoverable, committing someone else's half-finished work is not.
Verify before committing: git diff --cached should show this group's changes
and only those — nothing from another session, nothing from a later group.
Argument given → use it verbatim as the subject.
Blank → first decide, once per run, which convention applies:
git remote get-url origin against what they list).git log --no-merges -30 --format='%s%n%b%n--' and copy what the majority
does: prefix style (Conventional Commits types and scopes, area:,
[component], plain sentence), capitalization, mood, trailing period,
subject length, and whether commits carry a body. If every recent commit has
Signed-off-by, commit with -s. Never invent a ticket or issue number the
convention wants — leave it out and say so in the report.House format:
feat (user-noticeable addition), fix (something broken now
works), or chore (everything else). No scopes/parentheses.type: short description, lowercase, imperative, no trailing period.Whichever convention applies: if a group's subject needs an "and" to cover it, the grouping was too coarse; if two groups would get near-identical subjects, it was too fine.
Commit the staged changes, then move to the next group (back to Step 4) — don't ask for confirmation first (unless Troubleshooting sent you to confirm ownership):
git commit -m "feat: add commit skill"
Once every group is committed, report one line per commit — files + message:
Committed 3 files as "feat: add commit skill".
Committed 1 file as "chore: bump lefthook to 1.14".
(Left src/api.ts from another session untouched.)
If a pre-commit hook fails, fix the reported problem and retry — never
--no-verify. If a hook reformats your staged files, re-stage them (Step 4) and
commit again.
git add -A, git add ., git add -u, or git commit -a.git push (harness-blocked; not this skill's job).User: commit "fix: correct off-by-one in pager"
Actions:
src/pager.ts only.git status shows src/pager.ts modified plus src/api.ts modified — api.ts
isn't mine, leave it.git add src/pager.ts; git diff --cached confirms only my change.git commit -m "fix: correct off-by-one in pager".
Result: Committed 1 file as "fix: correct off-by-one in pager" (left src/api.ts from another session untouched).User: commit
Actions:
utils.ts and created helper.ts +
helper.test.ts, and documented it in README.md. Another session also
changed utils.ts (added a different function).git add helper.ts helper.test.ts README.md. For utils.ts:
stage-hunks.py utils.ts --list shows 2 hunks; hunk 1 is mine, hunk 2 is
theirs → stage-hunks.py utils.ts 1.git diff --cached shows my files + only my utils.ts hunk.feat: add slugify helper.git commit -m "feat: add slugify helper".
Result: Committed 4 files as "feat: add slugify helper" (staged only my hunk of utils.ts).User: commit
Actions:
export.ts, export.test.ts,
docs/export.md, a new dep in package.json), and separately fixed a stale
path in the unrelated scripts/deploy.sh.git add export.ts export.test.ts docs/export.md package.json;
git commit -m "feat: add CSV export".git add scripts/deploy.sh;
git commit -m "fix: correct build path in deploy script".
Result:Committed 4 files as "feat: add CSV export".
Committed 1 file as "fix: correct build path in deploy script".
User: commit
Actions:
src/client/retry.go and its test.git remote get-url origin points at an owner the user's instructions don't
list → match history.git log --no-merges -30 shows subjects like client: fix nil deref on close
— lowercase package: description, no bodies.git add src/client/retry.go src/client/retry_test.go;
git commit -m "client: honor context deadline in retry loop".
Result: Committed 2 files as "client: honor context deadline in retry loop".Cause: Context was summarized, or the tree has changes you can't attribute. Solution: Do not commit wide. List the specific files/hunks you believe are yours, state which you're unsure about, and ask the user to confirm before committing. Safety overrides the silent-commit default here.
Cause: The changes are related but not obviously one unit. Solution: Default to one commit. A slightly-too-broad commit is a normal commit; a too-narrow one leaves history with entries that don't stand alone. If they're genuinely unrelated, the subject line test settles it — if you can't write one short subject covering both without "and", split.
stage-hunks.py reports "git apply --cached failed"Cause: The working tree shifted between listing and staging, or the hunk
context moved.
Solution: Re-run stage-hunks.py <file> --list to get fresh hunk numbers,
then retry. If a hunk still won't apply cleanly, stage that file whole only if
its entire diff is yours; otherwise report the conflict to the user.
Cause: Your edits were already committed, or another session committed them.
Solution: git log --oneline -5 and git status to confirm. If your work is
already in history, say so — don't create an empty commit.
Cause: Lint/format/type errors in the staged (or repo-wide) code.
Solution: Read all reported errors and fix them (per the repo's Test & Lint
policy — never skip with --no-verify), re-stage, and commit again.
What SKILL.md sets; muted values are Claude Code's defaults
mediumOther plugins' skills for the same job
npx claudepluginhub nielsmadan/skills --plugin nlsmdn65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`)./check-agent-logsSearch past Claude Code, Codex, Cursor CLI, Devin CLI, Droid, and Pi session logs to recover context from earlier work across the current project and sibling checkouts. Use when a bug, topic, or decision was handled in a previous session but its agent or checkout is unknown; when the user says "we fixed/discussed this before", "find the session where", "recover prior context", "check agent logs", "check Claude projects", "search past sessions/transcripts", or "which checkout was that in". Do not use for aggregate failure-pattern analysis; use review-logs for that./codebase-reviewReview a whole codebase aspect by aspect, with aspects fitted to the project type (mobile, desktop, web frontend, static site, CLI, backend, library) — docs truth-check, architecture, tests, security, the type's foundations, feature deep dives, consistency, roadmap — writing a doc per aspect and a verified findings ledger that doubles as the TODO. Plans first (recon, `blind-spots`, `review-plan`, plan approval), then walks the plan with the user aspect by aspect — agents review and verify in the background, the user confirms rulings and decides judgment calls one at a time. `--auto` runs independently after the gate, with decision waves at the end. `--fix` hands settled findings through `crew` to worker sessions, integrated locally, never pushed. Use for "codebase review", "review the whole codebase", "onboard me to this repo", "deep dive this app", "audit the code base", "review and fix everything". Not for a diff or PR (code-review), a CLI release pass (release-review), or building a feature (longshot)./codebase-review-typescriptSupply TypeScript and JavaScript structural evidence to codebase-review using dependency-cruiser, ESLint complexity, and Git churn. Use for whole-codebase import-cycle and complexity-hotspot investigation, or when discovered as a project-local codebase-review extension. Does not replace review-typescript's type-design checks or review a diff./code-guideCoach the user through writing a feature themselves, one small step at a time, the way an experienced developer would build it. Each step comes with the code to type and a checkpoint that proves it works, such as logging the endpoint's response shape before typing it, or rendering a hardcoded value before wiring the real one. After each step the agent reads the user's diff and verifies it. The happy path comes first and edge cases come last. Use when the user says "code-guide", "guide me to write", "help me write this myself", "I want to code it myself", "coach me through implementing", "walk me through building this feature", "don't write it for me", or wants to learn by typing the code. Do NOT use for console or dashboard setup (use guide), explaining existing code (use code-tour), or when the agent should implement the change itself (use plan or longshot).