一键导入
commit-quality
Use when about to git commit — validates commit message format, lints staged files, and scans staged content for secrets and debug artifacts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when about to git commit — validates commit message format, lints staged files, and scans staged content for secrets and debug artifacts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when starting any creative work — creating features, components, or functionality, modifying behavior, or solving ambiguous problems — before design or implementation. Covers product discovery, competitive research, feature analysis, technical design, and capability spec writing. Applies to every project; routes to writing-plans (non-UI) or design-workflow (UI).
Use when finishing an edit to source files — runs format, typecheck, and console.log detection before moving to the next task.
Use when implementation of a bug fix or feature task is complete — dispatches the appropriate language and global reviewers and returns a binary APPROVE/BLOCK verdict.
Use when reaching the design-workflow V2-4 hard gate — adversarially reviews design artifacts (token coverage, contract completeness, artifact consistency, accessibility docs, responsive coverage, DESIGN.md compliance) against docs/designs/<feature>/ before development handoff.
Use when a task involves UI — new pages, components, visual interactions, or design tokens — including work in docs/designs/, *.pen files, or with Pencil MCP tools. Skip for backend-only, config-only, or refactoring without visual impact. Routes to writing-plans on completion.
Use when building Django features involving authentication, authorization, user input, sessions, or deployment — covers CSRF, SQL injection, and XSS prevention plus secure production configuration.
| name | commit-quality |
| description | Use when about to git commit — validates commit message format, lints staged files, and scans staged content for secrets and debug artifacts. |
| origin | ECC |
Run this skill before every git commit to enforce commit message conventions, catch last-minute quality issues, and prevent secrets from leaking into the repository.
git commitgit addValidate that the commit message follows Conventional Commits:
<type>(<scope>): <subject>
[optional body]
[optional footer]
Allowed types: feat, fix, refactor, docs, test, chore, perf, ci, revert
Rules:
Good examples:
feat(auth): add OAuth2 login
fix(api): handle null response in user endpoint
test(auth): add unit tests for token validation
Bad examples:
fixed stuff # no type, vague
Update. # no type, period at end
feat: Added the new payment flow and also fixed the login bug and updated docs # too long, too many concerns
Run the linter on staged files only before committing.
JavaScript / TypeScript
# lint-staged (if configured)
npx lint-staged
# Manual: Biome
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx|js|jsx)$' | xargs npx biome lint
# Manual: ESLint
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx|js|jsx)$' | xargs npx eslint
Python
git diff --cached --name-only --diff-filter=ACM | grep '\.py$' | xargs ruff check
Check staged files for debug statements.
# Detect console.log / debugger in staged JS/TS files
git diff --cached | grep -E '^\+.*(console\.(log|debug|warn)|debugger)'
# Detect print / breakpoint in staged Python files
git diff --cached | grep -E '^\+.*(^print\(|breakpoint\(\))'
If found: remove before committing, or replace with a proper logger.
Check staged files for common secret patterns. Do not commit if any are found.
Patterns to detect:
api_key\s*=\s*["'][A-Za-z0-9]{20,}["'](token|secret|password)\s*=\s*["'][^"']{8,}["']AKIA[0-9A-Z]{16}-----BEGIN (RSA |EC )?PRIVATE KEY-----://[^:]+:[^@]+@# Quick scan of staged diff
git diff --cached | grep -iE '(api_key|secret|password|token)\s*=\s*["\x27][^"\x27]{8,}'
If found: stop immediately, remove the secret, add the file to .gitignore if needed, and rotate the exposed credential.
Never use flags that skip git hooks:
# NEVER use these
git commit --no-verify
git commit -n
git push --no-verify
These flags disable pre-commit, commit-msg, and pre-push hooks that protect the repository. If a hook is failing, fix the underlying issue instead of bypassing it.
All checks must pass before committing:
| Check | Pass Condition |
|---|---|
| Commit message | Follows Conventional Commits format |
| Lint | Zero errors on staged files |
| Debug artifacts | None in staged files |
| Secrets | None in staged diff |
| Hook bypass | No --no-verify flag used |
git add, then retry.console.log / debugger / print() statements, re-stage..gitignore. Rotate the credential if it was ever pushed.--no-verify to bypass.