agentleFS
rust-worksrust-works/omni-dev/.claude/skills/commit-twiddle/SKILL.md

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.

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
  1. Very specific:

    If $ARGUMENTS is provided, use it as the commit hash or range.

    line 12
  2. Distinctive:

    Type and scope: must match the actual changes — read the diff if uncertain

    line 33
  3. Very specific:

    Scope: must be one of the values defined in .omni-dev/scopes.yaml

    line 34
  4. Distinctive:

    Subject line: must be lowercase, imperative mood, no trailing period, ≤80 chars total

    line 35
  5. Very specific:

    Write the amendments file to <ai.scratch>/amendments-<random-8-hex>.yaml:

    line 39
  6. Distinctive:

    Create the directory if the write fails:

    line 52
  7. Very specific:

    Use the exact 40-character SHA from the commits[].hash field.

    line 68
  8. Distinctive:

    If the message is already correct, do nothing and say so.

    line 70
  9. Very specific:

    If omni-dev is not installed: https://crates.io/crates/omni-dev (requires ≥ v0.3.0)

    line 80

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 $ARGUMENTS

The 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 message
  • commits[].analysis.detected_type and detected_scope — what omni-dev detected
  • commits[].analysis.diff_file — read this file to understand what actually changed
  • ai.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-By footers — 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>.yaml

Constraints

  • 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[].hash field. 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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.