一键导入
git-commit
Create meaningful git commits with well-structured messages - analyzes changes, generates descriptive subject and body, follows conventional commits
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create meaningful git commits with well-structured messages - analyzes changes, generates descriptive subject and body, follows conventional commits
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Given a TheRock nightly build (URL or run-id), return the rocm-systems pin_sha used in that build
Check whether a given rocm-systems commit is included in a specific TheRock nightly build
Find the first TheRock nightly build that includes a given rocm-systems commit
Reviews Pull Requests or local diffs with an 8-agent fan-out covering static analysis, dead code, code smells + quality (naming, complexity, single-responsibility, magic numbers), language rules (C++/Python/CMake), architecture, simplification, performance (hot-path classification, allocations, locks, I/O), and undefined behaviour (signed overflow, lifetime, strict aliasing, data races, sanitizer coverage; C/C++/unsafe-Rust only). Use when the user asks to "review this PR", "review the diff", "audit this branch", "/pr-review", or when staging changes before push.
Walk through a PR review interactively, one finding at a time. Generate review via pr-review, then for each issue present analysis + proposed inline comment, let user accept/edit/skip, accumulate into a PENDING GitHub review, submit at end.
Use when user wants to list, analyze, review, or summarize GitHub PR comments on a pull request number or URL
| name | git-commit |
| description | Create meaningful git commits with well-structured messages - analyzes changes, generates descriptive subject and body, follows conventional commits |
Use this skill when committing changes to create meaningful, well-structured commit messages.
**A good commit message explains WHY, not just WHAT.**Before committing:
┌─────────────────────────────────────────────────────────────────┐
│ User asks to commit changes │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 1: Analyze │
│ - Review staged files │
│ - Understand changes │
│ - Identify type │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 2: Categorize │
│ - Group related files │
│ - Check for mixed │
│ concerns │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 3: Draft │
│ - Write subject line │
│ - Write body │
│ - Add footer │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 4: Review │
│ - Present to user │
│ - Get approval │
│ - Commit │
└───────────────────────┘
# See what's staged
git status --short
# See staged diff
git diff --cached
# See staged file names
git diff --cached --name-only
# Get stats
git diff --cached --stat
For each changed file, determine:
| Type | Description | Example |
|---|---|---|
feat | New feature | Adding user authentication |
fix | Bug fix | Fixing null pointer crash |
refactor | Code restructure (no behavior change) | Extracting method |
perf | Performance improvement | Caching query results |
docs | Documentation only | Updating README |
test | Adding/fixing tests | Adding unit tests |
build | Build system changes | CMake configuration |
ci | CI/CD changes | GitHub Actions workflow |
chore | Maintenance tasks | Updating dependencies |
style | Code style (formatting, no logic change) | Fixing indentation |
Signs of mixed concerns:
Ask user if mixed:
{
"questions": [{
"question": "Changes include both a bug fix and a new feature. Split into separate commits?",
"header": "Mixed changes",
"options": [
{"label": "Split commits", "description": "Create separate commits for each concern (recommended)"},
{"label": "Single commit", "description": "Commit everything together"},
{"label": "Show me", "description": "Show the different concerns first"}
],
"multiSelect": false
}]
}
<type>(<scope>): <subject>
<body>
<footer>
| Rule | Good | Bad |
|---|---|---|
| Imperative mood | "Add validation" | "Added validation" |
| No period at end | "Fix memory leak" | "Fix memory leak." |
| Max 50 characters | "Add user auth" | "Add user authentication with OAuth2 support and session management" |
| Capitalize first letter | "Fix crash" | "fix crash" |
| Be specific | "Fix null check in parser" | "Fix bug" |
feat(auth): add OAuth2 login support
fix(parser): handle null input gracefully
refactor(api): extract validation logic
docs(readme): add installation instructions
test(auth): add login failure tests
Scope is optional but helpful - identifies the module/component affected.
The body explains WHY the change was made:
The previous implementation crashed when users provided empty input
because the parser assumed non-null strings. This fix adds explicit
null checks before processing.
This was discovered in production logs showing ~50 crashes/day
from the /api/parse endpoint.
Body rules:
Used for:
Fixes #123, Closes #456BREAKING CHANGE: API signature changedShow the proposed commit message:
**Proposed commit message:**
---
feat(gpu): add temperature monitoring for MI300 GPUs
Add support for reading GPU temperature sensors on MI300 hardware.
The existing implementation only supported MI200 series.
Key changes:
- Add MI300-specific temperature sensor IDs
- Update device detection to recognize MI300 variants
- Add fallback for unsupported sensor types
This enables rocm-smi to display temperature for the latest hardware.
Fixes #234
---
**Files to be committed:**
- src/gpu/temperature.cpp (modified)
- src/gpu/device_info.cpp (modified)
- include/gpu/sensors.hpp (modified)
- tests/temperature_test.cpp (added)
{
"questions": [{
"question": "Commit with this message?",
"header": "Commit",
"options": [
{"label": "Commit", "description": "Create commit with this message"},
{"label": "Edit message", "description": "I want to modify the message"},
{"label": "Cancel", "description": "Don't commit yet"}
],
"multiSelect": false
}]
}
git commit -m "$(cat <<'EOF'
feat(gpu): add temperature monitoring for MI300 GPUs
Add support for reading GPU temperature sensors on MI300 hardware.
The existing implementation only supported MI200 series.
Key changes:
- Add MI300-specific temperature sensor IDs
- Update device detection to recognize MI300 variants
- Add fallback for unsupported sensor types
This enables rocm-smi to display temperature for the latest hardware.
Fixes #234
EOF
)"
feat(<scope>): <what was added>
<Why this feature is needed>
<Key implementation details if complex>
<Issue reference if applicable>
Example:
feat(api): add batch processing endpoint
Users frequently need to process multiple items at once.
The current API requires individual requests, causing
unnecessary latency for bulk operations.
- Add POST /api/batch endpoint
- Support up to 100 items per request
- Return partial results on individual failures
Closes #567
fix(<scope>): <what was fixed>
<What was the bug / symptoms>
<Root cause explanation>
<How it was fixed>
<Issue reference>
Example:
fix(parser): handle empty input without crashing
The application crashed when users submitted empty forms.
Stack trace showed null pointer dereference in validate().
Root cause: Input validation assumed non-empty strings
and called .length() without null check.
Added explicit null/empty checks before processing.
Fixes #789
refactor(<scope>): <what was restructured>
<Why refactoring was needed>
<What changed structurally>
<Behavior should be unchanged>
Example:
refactor(auth): extract token validation to separate class
Token validation logic was duplicated across 4 endpoints
and becoming difficult to maintain.
- Extract TokenValidator class
- Move all validation logic to single location
- Update endpoints to use new validator
No behavior changes. All existing tests pass.
perf(<scope>): <what was optimized>
<Previous performance characteristics>
<New performance characteristics>
<How the improvement was achieved>
Example:
perf(query): add caching for user lookup
User lookup was hitting database on every request,
causing ~200ms latency per API call.
Added Redis cache with 5-minute TTL:
- Cache hit: ~2ms
- Cache miss: ~200ms (unchanged)
Reduces average response time by 60% based on
typical access patterns (80% cache hit rate).
| Bad | Good |
|---|---|
| "fixed bug" | "fix(auth): prevent session timeout on active users" |
| "updates" | "refactor(api): simplify error handling logic" |
| "WIP" | "feat(ui): add loading spinner (partial)" |
| "asdfasdf" | (Don't commit with meaningless messages) |
| "Fixed the thing John mentioned" | "fix(export): handle special characters in filenames" |
| After Commit | Consider |
|---|---|
| Multiple commits ready | git-prepare-pull-request to create PR |
| Need to group commits | git rebase -i to squash/reorder |
| Wrong commit | git commit --amend (only if not pushed) |
Add /commit as a quick command in radisha-skills:
/commit → git-commit