commit-twiddle
Skill2 starsChanged 39 days agoBSD-3-ClauseView on GitHub
Validates and corrects commit messages against project guidelines after a commit is created. Invoke automatically after every git commit to ensure messages conform to .omni-dev/commit-guidelines.md.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- changelogSkill
- format-tableSkill
- releaseSkill
- update-adr-inventorySkill
- update-snapshotsSkill
- version-bumpSkill
- changelogSkill
- commit-twiddleSkill
- format-tableSkill
- releaseSkill
- update-adr-inventorySkill
- update-snapshotsSkill
- version-bumpSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
If $ARGUMENTS is provided, use it as the commit hash or range.
- Distinctive: line 33
Type and scope: must match the actual changes — read the diff if uncertain
- Very specific: line 34
Scope: must be one of the values defined in .omni-dev/scopes.yaml
- Distinctive: line 35
Subject line: must be lowercase, imperative mood, no trailing period, ≤80 chars total
- Very specific: line 39
Write the amendments file to <ai.scratch>/amendments-<random-8-hex>.yaml:
- Distinctive: line 52
Create the directory if the write fails:
- Very specific: line 68
Use the exact 40-character SHA from the commits[].hash field.
- Distinctive: line 70
If the message is already correct, do nothing and say so.
- Very specific: line 80
If omni-dev is not installed: https://crates.io/crates/omni-dev (requires ≥ v0.3.0)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit Twiddle
Validate and correct commit messages to conform to .omni-dev/commit-guidelines.md.
If $ARGUMENTS is provided, use it as the commit hash or range. Otherwise default to HEAD.
Step 1 — Analyse
omni-dev git commit message view $ARGUMENTSThe output is self-describing. Read the explanation.fields section to understand all
available fields, then extract the values needed for Step 2.
Key fields to look at:
commits[].original_message— the current messagecommits[].analysis.detected_typeanddetected_scope— what omni-dev detectedcommits[].analysis.diff_file— read this file to understand what actually changedai.scratch— base path for temporary files
Step 2 — Craft corrected messages
For each commit, write a corrected message that conforms to the guidelines. Constraints:
- Type and scope must match the actual changes — read the diff if uncertain
- Scope must be one of the values defined in
.omni-dev/scopes.yaml - Subject line must be lowercase, imperative mood, no trailing period, ≤80 chars total
- No
Co-Authored-Byfooters — do not add AI attribution lines - Body required for changes >50 lines or architectural changes; wrap at 72 cols
Write the amendments file to <ai.scratch>/amendments-<random-8-hex>.yaml:
amendments:
- commit: "<exactly 40 lowercase hex chars>" # full SHA, not abbreviated
message: |
<type>(<scope>): <subject>
<optional body wrapped at 72 cols>
<optional footers — no Co-Authored-By>Create the directory if the write fails:
mkdir -p <ai.scratch>Step 3 — Apply
omni-dev git commit message amend <ai.scratch>/amendments-<random-8-hex>.yamlConstraints
- The target commit must be at the branch tip with no merge commit above it. If a merge commit is present the amend will fail — work on the branch before merging.
- Use the exact 40-character SHA from the
commits[].hashfield. An abbreviated hash silently skips the amendment or errors. - If the message is already correct, do nothing and say so.
Enforcement
.github/workflows/commit-lint.yml runs omni-dev git commit message lint --strict on every
push/PR to main (non-required check), so a message this skill leaves non-conforming will still
be caught in CI.
Troubleshooting
If omni-dev is not installed: https://crates.io/crates/omni-dev (requires ≥ v0.3.0)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

