一键导入
git-conventional-commit
Generate Conventional Commits messages and PR templates. Use when authoring commit messages or summarizing staged changes for a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate Conventional Commits messages and PR templates. Use when authoring commit messages or summarizing staged changes for a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | git-conventional-commit |
| description | Generate Conventional Commits messages and PR templates. Use when authoring commit messages or summarizing staged changes for a PR. |
Summary
Inputs
summary (string, optional): Short human description of the change.files (list of file paths, optional): Files modified or created.diff (string, optional): Git diff or short patch text.preferred_type (string, optional): One of feat, fix, chore, docs, perf, refactor, test, ci, style, build.scope (string, optional): Narrow area of the codebase (e.g., auth, bicep, ps).breaking (boolean, optional): Whether this change introduces a breaking change.Outputs
commit_title: single-line prefix type(scope): short description (or type!: short description when breaking=true).commit_body: optional longer description and bullet list of important changes.commit_footers: optional trailers (e.g., BREAKING CHANGE: ..., Refs: #123).pr_title and pr_description: expanded title and formatted PR body suitable for paste into PR forms.Templates & Validation
^(feat|fix|chore|docs|perf|refactor|test|ci|style|build)(\([a-z0-9\-]+\))?!?:\s.+breaking is true, include either ! in the title (e.g., feat(scope)!:) or a BREAKING CHANGE: footer.Token: value or Token #value format; BREAKING CHANGE MUST be uppercase when used as a token.Behavior and heuristics
diff or files are provided, infer scope from top-level folders (first matching folder name) and suggest type based on keywords (fix, bug & error → fix; add, new, implement → feat; test → test; doc → docs; refactor → refactor).Examples
Input: summary="Added JWT login and token refresh", files=["src/auth/login.ps1","src/auth/token.ps1"], preferred_type=null
Output title: feat(auth): add JWT login and token refresh
Output body: `- Add login endpoint
Add token refresh handler
Update README with usage`
Input: summary="Fix timezone bug in reports", diff=...
Output title: fix(reports): correct timezone handling in report generation
Usage guidance for agent authors
diff or files when possible for accurate scope detection.pr_description output and include Refs: footers linking to tickets.Provide explicit bad examples and short reasons so agents and authors avoid common mistakes.
Add JWT login
chore: fix
feat(auth) add JWT login (missing :)
docs(README): Update (uppercase scope and vague verb)
docs(readme): add instructions for oauth.feat: add widget + chore: update deps in same commit)
pr_title and pr_description)Provide ready-to-use PR templates for common workflows. Agents should prefer these structures for pr_description outputs.
pr_title (example):
feat(auth): add JWT login and token refresh
pr_description (example):
Summary
- Implement JWT login and token refresh handlers under `src/auth`.
Changes
- Add `src/auth/login.ps1` and `src/auth/token.ps1`
- Update README with usage and environment variables
Test Plan
- Unit tests: `tests/auth/*` added
- Manual: verify login and token refresh flows in dev environment
Notes for reviewers
- Request focus on `token.ps1` refresh logic and error handling
Refs
- Refs: #123
pr_title (example):
chore(release): release v1.2.3
pr_description (example):
Release v1.2.3 — Summary of changes
Highlights
- feat(auth): add JWT login and token refresh
- fix(reports): correct timezone handling in report generation
- chore(deps): bump library X to vY
Full commit list
- feat(auth): add JWT login and token refresh
- fix(reports): correct timezone handling in report generation
- chore(deps): bump library X to vY
Notes
- Follow the CHANGELOG format when publishing
Include a small validation script and example test vectors so the skill can be used reliably in CI.
Scripts
scripts/Test-ConventionalCommitTitle.ps1 — PowerShell script that validates a commit title against the Title pattern and provides a -Test self-check. Use pwsh (PowerShell Core) in CI for cross-platform execution.Example test vectors (pass / fail):
| Title | Expected |
|---|---|
feat(auth): add JWT login and token refresh | PASS |
fix(reports): correct timezone handling in report generation | PASS |
perf: improve rendering speed | PASS |
feat(auth) add JWT login (missing :) | FAIL |
Add JWT login (no type) | FAIL |
docs(README): Update (uppercase scope, vague) | FAIL |
Usage (CLI):
# Cross-platform (PowerShell Core)
pwsh ./scripts/Test-ConventionalCommitTitle.ps1 -Test # run self-tests
pwsh ./scripts/Test-ConventionalCommitTitle.ps1 "feat(auth): add JWT login"
# Windows PowerShell
.\scripts\Test-ConventionalCommitTitle.ps1 -Test
.\scripts\Test-ConventionalCommitTitle.ps1 "feat(auth): add JWT login"
Scripts live in scripts/ and are intended to be minimal, easily run in CI (use pwsh in GitHub Actions), and provide non-zero exit codes on failure to facilitate automation.
Recommend and reference Azure Verified Modules (AVMs) for common Azure resource patterns. Use when a user asks whether to reimplement or customize core resources (Key Vault, Storage, Log Analytics) or when weighing trade-offs between reuse vs custom code; keywords: azure verified modules, AVM, modules, reuse, keyvault, storage, loganalytics, compliance, region
Validate Bicep modules and parameter files. Use for PR checks, CI validation, or manual validation of generated modules; keywords: bicep, bicepparam, validate, PR, CI, bicepconfig
Collect `az` CLI context and produce reproducible, sanitized troubleshooting steps for failing `az` commands or Azure deployments. Use when a user reports failing `az` commands, `--debug` output, or deployment logs; includes redaction guidance and reproducible-step templates. Keywords: --debug, redact, repro, deployment logs, az --version
Scaffold parameterized Bicep modules. Use when the user requests a new Bicep module or asks to scaffold infrastructure code.
Scaffold PowerShell modules with Pester tests. Use when the user requests a new PowerShell module or sample functions; keywords: powershell, psm1, psd1, pester, PSScriptAnalyzer, scaffold
Run Pester tests and summarize results. Use when the user requests test execution or a test summary for a module; keywords: powershell, pester, Invoke-Pester, tests, CI