commit
Commit Skill
This skill guides the process of committing code changes to the repository, ensuring consistency, quality, and adherence to project standards.
Workflow
1. Verify Staged Changes
Before committing, always verify exactly what is staged.
- Use
git statusandgit diff --staged(orget_changed_files) to review the changes. - Ensure only relevant changes are staged.
2. Quality Assurance
Adhere to the project mandates (e.g. AGENTS.md):
- No Compilation Warnings: Run build checks (e.g.
cargo check,npm run lint) to ensure the code compiles without warnings. - Tests Pass: Ensure all relevant tests pass.
3. Crafting the Commit Message
Follow these standards for all commit messages:
- Default Summary Line: Use the format
scope: summary.- Scope: Mandatory. Use the crate name or module name (e.g.,
api,core). - Summary: A concise, imperative summary of the change (e.g., "Refactor service handlers").
- Scope: Mandatory. Use the crate name or module name (e.g.,
- Body (Optional but Recommended): A bulleted list of specific changes or a brief explanation of why the changes were made.
3a. Optional Project-Specific Conventions
If the project defines .skills/conventions.json, follow that configuration instead of assuming the default format.
- Use
commit_formatwhen it is present. - Common placeholders are
{ID},{scope}, and{summary}. - If the configured format requires an ID, resolve it from:
- the current branch using
branch_extract_pattern, - the active execution slice ID, or
- direct user input.
- the current branch using
- Do not assume Jira, Azure DevOps, or any issue tracker unless the project config explicitly opts in.
Example project config:
{
"issue_sliceer": "jira",
"branch_extract_pattern": "^([A-Z][A-Z0-9]*-[0-9]+)-(.+)$",
"commit_format": "{ID}: {summary}"
}
4. Executing the Commit
Use a message file and git commit -F when preparing a multi-line message.
cat > /tmp/commit-msg.txt <<'EOF'
module: Summary line
- Detailed bullet point 1
- Detailed bullet point 2 with `code_snippet`
EOF
git commit -F /tmp/commit-msg.txt
rm -f /tmp/commit-msg.txt
Fallback only when needed:
git commit -m 'module: Summary line' -m '- Detail bullet point'
Examples
Example 1: Refactoring a Service
Request: "Commit the changes where I refactored the module." Action:
- Check staged changes.
- Run build verification.
- Commit with crate or module scope.
Example 2: Configured Ticket-Based Workflow
If .skills/conventions.json defines commit_format as {ID}: {summary} and the branch is BSP-3313-buffer-fix, use a title like:
BSP-3313: Fix uds buffer bounds handling
More from sirius-cc-wu/sirius-skills
dioxus-ui-ux
Dioxus UI/UX design intelligence. Specialized guidelines for Dioxus Components, plus 50 styles, 21 palettes, 50 font pairings. Stacks: dioxus, daisyui, shadcn, html-tailwind. Actions: plan, build, create, design, implement, review, fix, improve, optimize. Projects: web app, dashboard, admin panel, SaaS, mobile app. Elements: button, modal, navbar, card, form, chart.
16dioxus-stitch
Transforms Stitch designs into clean, modular Dioxus code using daisyUI. Handles RSX conversion, type-safe props, and data decoupling for Rust projects.
8dioxus-ui-skill
Dioxus UI/UX design intelligence. Specialized guidelines for Dioxus Components, plus 50 styles, 21 palettes, 50 font pairings. Stacks: dioxus, shadcn, html-tailwind. Actions: plan, build, create, design, implement, review, fix, improve, optimize. Projects: web app, dashboard, admin panel, SaaS, mobile app. Elements: button, modal, navbar, card, form, chart.
4slice
Validates approved, committed execution-ready work, bootstraps a slice-scoped execution slice, and hands off to guide-execution.
2ui-flow
Captures optional UI and UX flows, screen-level requirements, and interaction notes before implementation.
2propose
Creates and manages speculative repo-native proposals only, then hands accepted proposals back to guide-planning for canonical planning.
2