git-commit

Verify, commit, and push feature changes with lint, typecheck, build, and Playwright gates.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/keefhub/travel-expense --skill git-commit-keefhub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/keefhub/travel-expense/tree/main/.claude/skills/git-commit
Command: npx skills add https://github.com/keefhub/travel-expense --skill git-commit-keefhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Committing half-verified code pollutes git history and risks pushing broken builds to protected branches. This Skill enforces a fail-closed verify-then-commit pipeline so only changes that pass lint, typecheck, build, and Playwright specs ever enter git history. ## Core Features & Use Cases - Gated verification pipeline: Runs lint, typecheck, conditional build, and Playwright specs in sequence, stopping at the first failure and logging full output to output/error/{feature}.md. - Conventional commit generation: Stages only feature-related files, reads the staged diff, and writes a Conventional Commits message with a Spec: traceability footer. - Protected-branch push guard: Runs an unconditional final build before pushing, and redirects commits on master/main to a feature branch instead of pushing directly. - Use Case: After implementing features/005.record-expense.md, invoke the skill to verify the change, commit it as feat(005), and push feat/005-record-expense without ever touching master. ## Quick Start Ask the agent to verify, commit, and push the current feature changes using the git-commit skill.

Frequently Asked Questions about git-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit and push a feature safely with git?

Invoke the skill with an optional feature number like /git-commit 005. It runs lint, typecheck, build, and Playwright specs, commits with a Conventional Commits message derived from the staged diff, then pushes to a feature branch after a final build gate.

What happens when lint or build fails before a commit?

The skill stops immediately and never commits. It writes the full failing command output plus git status to output/error/{feature}.md, leaves the working tree untouched, and reports which command failed so the caller can fix and retry.

Can I push commits directly to master or main?

No. Master and main are unconditionally protected. The skill points a new branch at the commit using git branch -f and pushes that branch instead, keeping the working checkout on master so the next feature cycle continues uninterrupted.

When does the skill run npm run build versus skipping it?

Build runs during verification only when the change touches routes, config, or dependencies, since tsc covers other cases. However, an unconditional final build always runs before any push, regardless of the earlier heuristic.

Why does the skill avoid git add -A when staging files?

Blanket staging can sweep in stray debug files, .env files, or credentials. The skill stages only files actually touched for the feature, inspects git status --short, and flags anything unexpected instead of committing it.