smart-commit

Runs quality gates, scans staged changes, and creates conventional commits.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill smart-commit-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-commit
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/smart-commit
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill smart-commit-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Committing code often skips linting, typechecking, and tests, and produces vague messages like "fix bug" that make history hard to audit. This Skill enforces a consistent pre-commit workflow so every commit passes quality gates and follows the conventional commit format. ## Core Features & Use Cases - Quality Gates: Runs lint, typecheck, and affected tests before any commit is created. - Pre-Commit Review Scan: Flags console.log statements, hardcoded secrets, and leftover test-only code in staged production files, while suppressing noise like formatting-only changes. - Conventional Commit Messages: Drafts typed messages (feat, fix, refactor, etc.) with scoped summaries under 72 characters and bodies explaining why. - Use Case: After finishing a feature branch, say "commit my changes" and the Skill verifies tests pass, reviews the diff for issues, stages only the relevant files, and writes a properly formatted commit. ## Quick Start Ask the assistant to commit your current changes and it will run the quality gates, review the staged diff, and create a conventional commit.

Frequently Asked Questions about smart-commit

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

FAQPage Schema
How do I create a conventional commit message automatically?

Stage your changes and ask to commit. The Skill inspects the diff, determines the appropriate type (feat, fix, refactor, test, docs, chore, perf, ci, style), and drafts a scoped summary under 72 characters with a body explaining why the change was made.

How to run lint and tests before committing code?

The Skill runs npm run lint, npm run typecheck, and tests on affected files as mandatory quality gates before creating any commit. It reports pass/fail results and will not skip these checks unless you explicitly request it.

What issues does the pre-commit review scan detect?

The scan flags console.log and debugger statements in production code, hardcoded secrets or API keys, and leftover test-only code. It suppresses noise like formatting-only changes, import reordering, and console.log in test files.

Can I commit all files at once with git add -A?

No. The Skill's guardrails prohibit git add -A and git add . entirely. It stages only specific files by name to prevent accidentally committing unrelated or sensitive changes.

When should I skip quality gates before committing?

Quality gates should only be skipped when you explicitly instruct the Skill to do so. By default, lint, typecheck, and tests always run, since skipping them risks committing broken or non-conforming code.