一键导入
commit-quality-check
Automatically analyze code changes to create meaningful commit messages and improve team collaboration through better git history.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automatically analyze code changes to create meaningful commit messages and improve team collaboration through better git history.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
小模型专用输出规范模板。自动注入,无需手动加载。 约束工具使用范围和输出格式,提高小模型准确率。 # 小模型专用参数 max_context_tokens: 800 injection_mode: system_prompt priority: high
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
Build AI chat interfaces using ai-elements components — conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chatbot, AI assistant UI, or any AI-powered chat interface.
Autonomous iteration loop: modify, verify, keep/discard against any metric
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
| title | Generate Precise Commit Messages and Accelerate Code Reviews by 60% |
| slug | write-better-commits |
| description | Automatically analyze code changes to create meaningful commit messages and improve team collaboration through better git history. |
| skills | ["git-commit-pro","code-reviewer","cicd-pipeline"] |
| category | development |
| tags | ["git","commits","code-review","workflow","automation","collaboration"] |
Dani runs a 31-person software company, and the git history reads like a crime scene. The repo has 3,247 commits -- a solid majority of which say things like "fix stuff", "update", "wip final", and "FINALLY WORKS!!!" When production breaks at 2 AM, engineers spend 45 minutes just deciphering what changes might have caused the issue before they can even start debugging.
The math is brutal: 8 engineers averaging 23 commits per week, with roughly 12 minutes wasted per unclear commit trying to understand context. That's 22 hours of engineering time per week -- more than half a full-time salary -- lost to poor commit hygiene. Last month proved the real cost: a 3-hour production outage traced back to a "quick fix" commit from two weeks prior. Nobody could identify what the change was supposed to do without reading the entire diff line by line. Customer impact: $47,000 in lost revenue and 23 support tickets.
Code reviews compound the problem. Reviewers spend more time asking "what does this change do?" than actually reviewing logic. Average PR review time is 6.7 hours from submission to approval -- the target is 2.5. Two-thirds of review comments are requests for clarification rather than technical feedback. New team members take 40% longer to ramp up because the code history tells them nothing.
Using the git-commit-pro, code-reviewer, and cicd-pipeline skills, Dani overhauls the team's commit workflow: semantic analysis of staged changes to generate conventional commit messages, automated pre-commit quality checks, CI/CD integration for changelog generation, and a team adoption plan that gets buy-in without slowing anyone down.
Dani starts with a real change -- the RBAC middleware a senior engineer just finished. Instead of the usual "add auth stuff" commit, the engineer asks the agent to look at what's actually staged:
Analyze my staged changes and generate a conventional commit message that explains what changed and why.
The analysis breaks down every file and its role in the change:
Staged changes detected:
| File | Changes | Purpose |
|---|---|---|
src/auth/middleware.ts | +47, ~12, -3 | Core RBAC permission checking logic |
src/auth/types.ts | +23 (new file) | UserRole and Permission type definitions |
tests/auth/middleware.spec.ts | +89 | 3 test suites, 23 test cases (94% coverage) |
docs/api/authentication.md | ~15 | Updated API docs with RBAC examples |
Change analysis:
jsonwebtoken@^9.0.0, removed deprecated auth-helpersGenerated commit message:
feat(auth): implement role-based access control middleware
Add RBAC system with permission checking for route-level authorization.
Includes admin/editor/viewer role hierarchy and configurable permissions.
- Add RoleMiddleware with permission validation logic
- Create UserRole and Permission type definitions
- Implement role hierarchy checking (admin > editor > viewer)
- Add comprehensive test suite with 94% coverage
- Update API documentation with RBAC examples
Closes #156, addresses security requirements from audit
Compare that to "add auth stuff." A reviewer reading this commit message immediately knows the scope, the motivation, and what to look for in the diff. Six months from now, when someone runs git log --grep="RBAC", they'll find exactly this commit.
Good commit messages describe what changed; pre-commit validation makes sure what changed is actually good. Before the commit goes through, the engineer runs the changes through the code reviewer:
Review the changes before committing to catch potential issues and ensure code quality standards.
The review comes back with a structured assessment:
Quality checks:
Issues identified:
auth/middleware.ts:34 -- Role permissions are looked up on every request. For high-traffic apps, consider caching the permission map. Not blocking, but worth a follow-up PR.auth/types.ts:12 -- UserRole enum could be a string union type for better TypeScript inference. Stylistic, not functional.Impact analysis:
Verdict: Safe to commit. The caching optimization is a good idea but belongs in a separate PR.
This catches the kind of thing that normally surfaces 4 hours into a code review -- or worse, in production.
One engineer writing good commits doesn't fix the repo. Dani needs the whole team on board. The first step is understanding how bad things actually are:
Ensure all team commits follow conventional format and integrate with CI/CD for automated changelog generation.
An audit of the last 50 commits tells the story:
| Metric | Current State |
|---|---|
| Non-conventional format | 67% ("fix stuff", "update", "wip") |
| Missing scope | 34% (feat: add feature instead of feat(auth): add feature) |
| No body text | 78% (zero context or rationale) |
| No issue references | 89% (can't link changes to requirements) |
The fix is a combination of tooling and team process. Git hooks enforce the standard without requiring willpower:
# .husky/commit-msg
commitlint --edit $1
# commitlint.config.js rules:
# - Type required: feat|fix|docs|style|refactor|perf|test|chore
# - Scope required: component/module (auth, api, ui, db)
# - Subject: imperative mood, under 50 chars, no trailing period
# - Body: wrap at 72 chars, explain the "why"
# - Footer: issue references, breaking change notes
The pre-commit hook validates the message format and runs linting. The commit-msg hook suggests improvements for messages that technically pass but could be clearer. The pre-push hook blocks pushes with non-conventional commits unless explicitly overridden. None of these slow down a developer who's already writing good messages -- they only catch the "fix stuff" commits before they enter the repo.
With conventional commits enforced locally, the CI/CD pipeline can now do things that were impossible before:
# .github/workflows/commit-quality.yml
name: Commit Quality Check
on: [pull_request]
jobs:
validate-commits:
runs-on: ubuntu-latest
steps:
- name: Check Commit Messages
run: commitlint --from ${{ github.event.pull_request.base.sha }}
- name: Analyze Change Impact
run: git-commit-pro analyze --pr ${{ github.event.number }}
- name: Generate Preview Changelog
run: conventional-changelog --preset angular --unreleased-only
Automated quality gates: PRs with non-conventional commits get blocked at the CI level. PRs are auto-labeled based on commit types (feat = "enhancement", fix = "bug", docs = "documentation"), which means the project board updates itself.
Release automation: Semantic versioning happens automatically. feat commits bump the minor version, fix commits bump the patch version, feat! (breaking change) bumps the major version. Changelogs generate themselves from commit messages. Release notes pull from commit bodies and link to the relevant issues and PRs.
No more manually maintaining a CHANGELOG.md. No more arguing about version numbers. No more release notes that say "various bug fixes and improvements."
Tooling enforcement without team buy-in creates resentment. Dani rolls out the change in phases:
Week 1: Share the audit results with the team. The numbers do the convincing -- 22 hours/week lost, $47,000 incident, 6.7-hour review times. No one argues with the data.
Week 2: Install git hooks and provide a conventional commits cheat sheet. The agent generates example messages from actual recent PRs so engineers see what their own changes would look like with proper messages.
Week 3: Enable CI enforcement. By now most engineers are already writing conventional commits because the hooks have been training them for a week.
Week 4: Turn on automated changelogs and release notes. The team sees the payoff -- release day goes from a 2-hour manual process to a single merge.
Progress tracking keeps the momentum going:
| Metric | Before | After 4 Weeks |
|---|---|---|
| Conventional commit adoption | 23% | 91% |
| Average PR review time | 6.7 hours | 2.8 hours |
| Time to identify problematic commits | 45 minutes | 12 minutes |
| Developer satisfaction (git workflow) | 5.2/10 | 8.4/10 |
Dani's company isn't an outlier. A 40-person SaaS company inherited a codebase with 14,000+ commits, 90% of which were incomprehensible. Production incidents routinely took hours to diagnose because git blame pointed to commits like "updates" and "misc fixes." Code reviews stalled because reviewers had no context. The team was evaluating $18,000/year change management tools to solve the problem.
On Monday, they ran git-commit-pro's audit against their recent history. Seeing concrete examples of what good messages would look like for their actual changes -- not hypothetical ones -- made the case better than any presentation could.
By Tuesday, conventional commit hooks were catching bad messages before they entered the repo. CI/CD integration auto-generated changelogs and labeled PRs by change type. The code-reviewer skill started analyzing changes before commits, catching issues that previously surfaced hours into review cycles.
By Wednesday, reviewers could understand changes from the commit message alone. PRs that previously needed 3 rounds of "what does this do?" clarification were getting approved in a single pass.
Two months later: review velocity improved 73%. Production debugging time dropped 80% because git log and git blame actually told useful stories. The $18,000 change management tool was never purchased. And the thing engineers mention most in retros isn't the time savings -- it's that git stopped being a source of daily frustration and became something that actually helps them work.