Commit work
Create high-quality git commits: review/stage intended changes, split into logical commits, write clear Conventional Commits messages, and run the project's pipeline gate before each commit. Use when committing within an agentic-sdlc cycle or whenever staging changes.From its SKILL.md
npx -y skills add inperegelion/agentic-sdlc --skill commit-workAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.5 KB, as published. Nobody here has run it
Commit work
Goal
Make commits that are easy to review and safe to ship:
- Only intended changes are included.
- Commits are logically scoped (split when needed).
- Commit messages describe what changed and why.
- The project's pipeline (lint, typecheck, test, build) is green before each commit.
Inputs
- Single commit or multiple commits? Default to multiple small commits when changes are unrelated.
- Commit style: Conventional Commits required.
- Project profile: read
_/sdlc-config.mdif present. Useoverrides.pipeline_commandfrom its frontmatter if set; otherwise resolve the pipeline command at use site frompackage.json:scripts.pipeline|ci|check(first match), falling back to a chainedlint && typecheck && test && build.
Workflow
-
Inspect the working tree
git statusgit diff(unstaged)git diff --statif many changes
-
Decide commit boundaries
- Split by: feature vs refactor · backend vs frontend · formatting vs logic · tests vs production code · dependency bumps vs behavior changes.
- If changes are mixed within one file, plan to use patch staging.
-
Stage only what belongs in the next commit
- Prefer
git add -pfor mixed changes. - Unstage with
git restore --staged -porgit restore --staged <path>.
- Prefer
-
Review staged changes
git diff --cached- Sanity checks:
- No secrets or tokens (run
git diff --cached | grep -i -E 'password|secret|token|api[_-]?key'and inspect). - No accidental debug logging (
console.log,dbg!,print(in non-debug paths). - No unrelated formatting churn.
- No commits of files under
_/(the agentic-sdlc working dir is gitignored, but double-check). - No references to
_/paths inside staged files (e.g. a source file mentioning_/tracks/...in a comment). The working directory is local-only — code shipped to git must not point at it.
- No secrets or tokens (run
-
Describe the staged change in 1–2 sentences before writing the message.
- "What changed?" + "Why?"
- If you can't describe it cleanly, the commit is too big or mixed. Go back to step 2.
-
Run the pipeline gate
- If
_/sdlc-config.mdexists and frontmatter hasoverrides.pipeline_commandset → run it. - Else read
package.json:scriptsand run the first ofpipeline,ci,check. - Else chain
lint && typecheck && test && build(each frompackage.json:scripts.*;typecheckfalls back totsc --noEmitwhentsconfig.jsonexists). Prefix every invocation with the detected package manager (npm/pnpm/yarn/bun). - Else (no clues at all) → ask the user for the known-good check command.
- Don't commit on a red pipeline. Fix and re-stage.
- If
-
Write the commit message
- Conventional Commits format:
<type>(<scope>): <short summary> <body — what/why, not implementation diary> <footer if needed — BREAKING CHANGE, Refs, Co-authored-by> - Use an editor for multi-line:
git commit -v. - Pass via HEREDOC to preserve formatting.
- Never use
--no-verify/--no-gpg-signunless the user explicitly asks. If a hook fails → investigate. - Don't amend already-pushed commits. Create a new commit.
- Conventional Commits format:
-
Repeat until the working tree is clean.
Hard rules
- No
git add -A/git add .blindly. - No commits of
.env, lockfiles you didn't intend to bump, large binaries, or build artifacts. - No "Fix tests" / "Small edits" / "WIP" messages.
- Always run the pipeline gate before each commit (the original
commit-workskill suggested it; this version enforces it). - Conventional Commits subject ≤ 72 characters. Body wraps at 100.
- Co-authored-by lines only when explicitly requested. Attribution defaults are user-configured.
- Never reference
_/paths in commit messages — no "see_/tracks/TICKET-1.md", no "per_/recordings/...", no mention of the track, scenario, or recordings. The agentic-sdlc working directory is local and gitignored; commit messages get pushed to GitHub and must not leak it. Cite code paths, ticket ids, and behavior — not the working dir.
Deliverable
- Final commit message(s).
- Short summary per commit (what / why).
- Commands used to stage and verify (
git diff --cached, pipeline output).