
Quality Commit
- 23 installs
- 22 repo stars
- Updated May 28, 2026
- acedergren/agentic-tools
quality-commit is a Claude Code skill that runs lint, typecheck, Semgrep, and related tests on staged files before creating a quality-gated commit.
About
quality-commit is a Claude Code skill for creating a quality-gated commit. It runs lint, typecheck, a Semgrep security scan, optional CodeRabbit review, and related tests on staged files before committing, and can push after. A developer uses it when committing changes and wanting gates enforced instead of relying on pre-commit hooks. It bundles scripts to classify staged files and find related tests, plus a per-file Semgrep workaround.
- Runs lint, typecheck, Semgrep, optional CodeRabbit, and related tests before committing
- Stages only named files and never uses git add . or -A
- Supports --review, --push, --dry-run, and --message flags with a per-file Semgrep workaround
Quality Commit by the numbers
- 23 all-time installs (skills.sh)
- Ranked #377 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
quality-commit capabilities & compatibility
- Capabilities
- quality gating · security scan · test runner · git commit
- Works with
- github
- Use cases
- code review · security audit · testing
- Pricing
- Free
What quality-commit says it does
Run all quality gates on staged changes, then commit.
Never run `git add .` or `git add -A` — always stage specific files by name.
npx skills add https://github.com/acedergren/agentic-tools --skill quality-commitAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 23 |
|---|---|
| repo stars | ★ 22 |
| Last updated | May 28, 2026 |
| Repository | acedergren/agentic-tools ↗ |
What it does
Run lint, typecheck, Semgrep, and related tests on staged files, then create a quality-gated commit.
Who is it for?
Committing code only after lint, typecheck, Semgrep, and related tests pass.
Skip if: Staging all files indiscriminately, bypassing hooks on failure, or unrelated repo cleanup during commit prep.
When should I use this skill?
Committing code changes.
What you get
A committed change that passed lint, typecheck, Semgrep, and related tests, optionally pushed.
- quality-gated commit
- gate summary table
- optional remote push
By the numbers
- Five-gate pipeline: lint, typecheck, Semgrep, tests, commit
- Per-file Semgrep loop workaround for 1.146.0+
Files
Quality Commit
Run all quality gates on staged changes, then commit. Replaces manual multi-step commit prep that frequently causes pre-commit hook friction.
NEVER
- Never run
git add .orgit add -A— always stage specific files by name. - Never commit after partial gate failures by bypassing hooks — gates exist for correctness.
- Never let optional tools (CodeRabbit, Semgrep) block the workflow when not installed — skip with warning.
- Never widen scope to unrelated repo cleanup during commit prep.
- Never attempt to auto-fix gate failures and retry — report errors, let the agent fix first.
Decision: What Gates to Run
Has staged files?
├─ No → Print warning, exit
└─ Yes →
├─ Always: Lint → TypeCheck → Semgrep → Tests → Commit
├─ --review or --full: Add CodeRabbit (slow, ~30s) before commit
└─ --push: After commit, Semgrep committed files, push to remoteGate Execution
Scope detection
STAGED=$(git diff --cached --name-only --diff-filter=ACMR)
bash scripts/classify-staged-files.sh # categorizes into frontend/api/sharedSemgrep: file-at-a-time (critical workaround)
Semgrep 1.146.0+ crashes with multiple file arguments (Invalid_argument: invalid path). Always loop:
for f in $STAGED_FILES; do
semgrep scan --config auto --json "$f" 2>/dev/null || true
doneBlock on critical/high findings. Warn on medium/low. Skip if not installed.
TypeCheck workspace commands
- frontend:
npx svelte-check --tsconfig ./tsconfig.json --threshold error(11 pre-existing errors in test files are known baseline — ignore) - api:
npx tsc --noEmit - shared:
npx tsc --noEmit
Related test discovery
node scripts/find-related-tests.js <staged-file>
# src/lib/server/auth/rbac.ts → src/lib/server/auth/rbac.test.tsRun discovered tests: npx vitest run <test-files> --reporter=verbose
Commit message format
type(scope): description
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Types: feat, fix, refactor, test, docs, chore Scopes: security, phaseX.Y, api, frontend, database, auth, workflows
Push flow (--push only)
1. Re-run Semgrep on committed files (same file-at-a-time loop, use git diff --name-only HEAD~1) 2. Detect upstream: git rev-parse --abbrev-ref @{u} 2>/dev/null 3. If no upstream: git push -u origin $BRANCH, else git push 4. Abort push on critical/high Semgrep findings — commit stays intact, do NOT undo it
Summary table
| Gate | Status | Details |
|------------|--------|----------------------------|
| Lint | PASS | 5 files, 0 errors |
| TypeCheck | PASS | api + frontend |
| Semgrep | PASS | 0 findings |
| CodeRabbit | SKIP | (use --review to enable) |
| Tests | PASS | 3 test files, 12 tests |
| Commit | DONE | abc1234 |
| Push | SKIP | (use --push to enable) |Arguments
- (empty): lint + typecheck + semgrep + tests + commit
--review/--full: Add CodeRabbit review--dry-run: Run all gates, skip actual commit and push--push: Commit then semgrep + push to remote--message "...": Use custom commit message
quality-commit - Standardized Quality Gates for Git
Version: 1.0.0 Status: Production-Ready Framework: OCI Self-Service Portal (SvelteKit + Fastify + shared packages)
What This Skill Does
Automates the multi-step commit workflow: lint staged changes, run type checks, security scan (Semgrep), execute tests, and commit with conventional message format — all in one command. Replaces manual multi-step processes that frequently cause pre-commit hook friction.
Problem It Solves
Before: Developers manually run: 1. eslint on staged files 2. tsc/svelte-check for types 3. semgrep for security 4. vitest for affected tests 5. git commit with message 6. (optional) git push
Each step can fail silently, miss files, or require manual recovery. Pre-commit hooks catch failures after work is already done.
After: Single command runs all quality gates in order, with clear exit on first failure.
Key Features
Scoped Quality Gates
- Lint: Only checks staged files, workspace-specific (frontend/api/shared)
- TypeCheck: Only affected workspaces (not entire monorepo)
- Semgrep: Scans one file at a time (bug workaround in Semgrep 1.146.0+)
- Tests: Discovers colocated
.test.tsfiles and runs only those - Commit: Conventional message format with Co-Authored-By trailer
Workspace Intelligence
- Detects which packages have staged changes (frontend, api, shared)
- Runs lint/tsc/tests only on affected workspaces
- Avoids full monorepo builds
Optional Enhancements
--review: Include CodeRabbit code review (slower, ~30s)--push: After successful commit, run semgrep on committed files and push--dry-run: Validate all gates but skip commit/push--message "...": Custom commit message instead of auto-generate
Error Recovery
- Prints specific errors on gate failure
- Stops immediately (no auto-fix attempts)
- Leaves staged changes intact for manual remediation
- Re-run
/quality-commitafter fixing
Usage Examples
Standard flow (lint, typecheck, semgrep, tests, commit):
/quality-commitFull validation with CodeRabbit review:
/quality-commit --reviewValidate everything but don't commit:
/quality-commit --dry-runCommit and push:
/quality-commit --pushFull flow with review and push:
/quality-commit --review --pushCustom commit message:
/quality-commit --message "fix(security): add IPv6 SSRF checks"Technical Details
Monorepo Workspace Detection
STAGED=$(git diff --cached --name-only --diff-filter=ACMR)
# Categorize into frontend, api, sharedSemgrep Bug Workaround
Semgrep 1.146.0–1.151.0+ crashes with Invalid_argument: invalid path when given multiple files. Solution: Scan each file individually and aggregate findings.
Test Discovery
For each staged .ts/.svelte file, looks for colocated .test.ts:
src/lib/auth/rbac.ts→src/lib/auth/rbac.test.tssrc/routes/chat.ts→src/routes/chat.test.ts
Commit Message Format
type(scope): description
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Types: feat, fix, refactor, test, docs, chore Scopes: security, phaseX.Y, api, frontend, database, auth, workflows
Gate Details
1. Lint
- Frontend:
cd apps/frontend && npx eslint <files> - API:
cd apps/api && npx eslint <files> - Shared:
cd packages/shared && npx eslint <files>
2. Type Check
- Frontend:
npx svelte-check --tsconfig ./tsconfig.json --threshold error - API:
npx tsc --noEmit - Shared:
npx tsc --noEmit
3. Semgrep Security
- Config:
auto(uses default rules) - Scans one file at a time
- Blocks on critical/high findings
- Warns on medium/low findings
4. CodeRabbit (Optional)
- Command:
coderabbit review --plain -t uncommitted - Blocks on critical findings
- Requires
--reviewflag to enable
5. Tests
- Discovers colocated
.test.tsfiles - Runs:
npx vitest run <test-files> --reporter=verbose - Blocks on test failures
6. Commit
- Stages all changes
- Commits with conventional message format
7. Push (Optional)
- Requires
--pushflag - Re-scans committed files with Semgrep (security gate)
- Pushes to remote:
git pushorgit push -u origin $BRANCH
Installation
# Copy to Claude Code skills directory
cp -r quality-commit ~/.agents/skills/
# Or for Cursor
cp -r quality-commit ~/.cursor/skills/Requirements
- pnpm (monorepo manager)
- eslint (frontend, api, shared)
- svelte-check (frontend type check)
- tsc (api, shared type check)
- vitest (test runner)
- semgrep (optional, security scanning)
- coderabbit CLI (optional, requires
--reviewflag)
Anti-Patterns & Gotchas
NEVER
1. Run without staging first - Ensure changes are staged with git add before calling /quality-commit 2. Auto-fix lint errors you didn't introduce - Let hook failures happen, fix them cleanly, then retry 3. Commit unrelated changes - Stage only the feature/fix you're working on 4. Skip Semgrep on security changes - Always review Semgrep findings before pushing 5. Push with critical CodeRabbit findings - Address critical issues first
Be Aware
- Lint is workspace-scoped, not global
- Tests are file-discovery based (look for
.test.tscolocated with source) - Semgrep has a known multi-file bug (scans one file at a time)
- Pre-existing lint errors in unrelated files won't block you
- TypeCheck errors will block commit (as intended)
Framework Integration
Designed for:
- Frontend: SvelteKit (adapter-node)
- API: Fastify 5
- Testing: Vitest 4
- Monorepo: pnpm
- CI/CD: GitHub Actions (compatible with pre-push hooks)
Exit Status
- 0: All gates passed, commit created (and pushed if
--pushwas used) - 1: A gate failed (see error output for details)
- 1: No staged changes found
Summary Output
On success, prints a gate summary table:
| Gate | Status | Details |
|-------------|--------|----------------------------|
| Lint | PASS | 5 files, 0 errors |
| TypeCheck | PASS | api + frontend |
| Semgrep | PASS | 0 findings |
| CodeRabbit | SKIP | (use --review to enable) |
| Tests | PASS | 3 test files, 12 tests |
| Commit | DONE | abc1234 |
| Push | SKIP | (use --push to enable) |See Also
#!/usr/bin/env bash
set -euo pipefail
STAGED=$(git diff --cached --name-only --diff-filter=ACMR)
if [ -z "$STAGED" ]; then
echo 'No staged files'
exit 0
fi
printf '## Staged File Classification\n\n'
printf '%s\n' "$STAGED" | while read -r file; do
case "$file" in
apps/frontend/*|apps/web/*) scope="frontend" ;;
apps/api/*) scope="api" ;;
packages/*) scope="package" ;;
docs/*|README.md|CLAUDE.md|AGENTS.md) scope="docs" ;;
*) scope="other" ;;
esac
printf '%s\t%s\n' "$scope" "$file"
done
#!/usr/bin/env node
import { existsSync } from 'node:fs';
import path from 'node:path';
for (const input of process.argv.slice(2)) {
const ext = path.extname(input);
const normalizedExt = ext || '.ts';
const base = ext ? input.slice(0, -ext.length) : input;
const candidates = [
`${base}.test${normalizedExt}`,
`${base}.spec${normalizedExt}`,
input.replace('/src/', '/src/tests/').replace(normalizedExt, `.test${normalizedExt}`),
];
const matches = candidates.filter((candidate) => existsSync(candidate));
if (matches.length > 0) {
console.log(matches.join('\n'));
}
}
Related skills
FAQ
How are files staged for the commit?
By name only; the skill never runs git add . or git add -A, so scope stays tight and unrelated files are not committed.
Why does Semgrep run file-at-a-time?
Semgrep 1.146.0+ crashes with multiple file arguments (Invalid_argument: invalid path), so the skill loops over each staged file.