agentleFS
dafaalzdafaalz/agent-skills/skills/conventional-commit/SKILL.md

conventional-commit

Skill2 starsChanged 51 days agoMITView on GitHub

Use when creating atomic git commits adhering to the Conventional Commits specification, staging selective hunks, or writing commit messages. Don't use for merge commits (use pull-request) or branch cleanup (run `git branch -d` directly or use the repository's branch cleanup tooling).

  • Reads credentials
  • Deletes or force-pushes
  • Commits and pushes

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use shipping-and-launch, doubt-driven-development and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LLl0k0laDSkill

    shipping-and-launch

    Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.

    Also in 3 projects that use this

  • seikaikyoSkill

    doubt-driven-development

    對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。

    Also in 3 projects that use this

  • LLl0k0laDSkill

    api-and-interface-design

    Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

    Also in 3 projects that use this

  • HK-hubSkill

    code-simplification

    Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

    Also in 3 projects that use this

  • guaderramaSkill

    spec-driven-development

    Generate comprehensive specifications for software projects using spec-driven development methodology. Leverages Bright Data MCP tools to research documentation, analyze competitor implementations, gather real-world examples, and enrich specs with architectural insights. Use when user requests specifications, technical plans, project specs, or architecture documentation.

    Also in 3 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 3 projects that use this

  • +1 more from LLl0k0laD

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 16 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Commit the working tree as atomic commits following the Conventional Commits 1.0.0 specification with concise imperative subjects.

    line 9
  2. Distinctive:

    Do not add a co-author trailer unless explicitly requested or mandated by repository policy.

    line 13
  3. Distinctive:

    Never use git commit -a. Stage files deliberately so unrelated edits cannot leak into history.

    line 14
  4. Distinctive:

    Never run git add . or git add -A blindly.

    line 15
  5. Distinctive:

    Never commit without reading the diff.

    line 16
  6. Distinctive:

    Create new commits for additional changes.

    line 18
  7. Distinctive:

    Write-Target Boundary. Manipulate git staging area and create commits only.

    line 22
  8. Very specific:

    Commit mode (default). Run Steps 1 through 6 in full.

    line 28
  9. Distinctive:

    Commit creation, revert creation, and re-application of the fix must each round-trip cleanly without history corruption.

    line 36
  10. Distinctive:

    Run status and diff inspections to evaluate the tree:

    line 42
  11. Distinctive:

    Ensure one logical change per commit so each commit remains independently revertable.

    line 63
  12. Distinctive:

    Test additions for separate features are mixed together.

    line 70
  13. Distinctive:

    Do not split when changes form a single atomic unit, such as a bug fix accompanied by its regression test.

    line 72
  14. Distinctive:

    When a single file contains mixed concerns, stage individual hunks interactively:

    line 84
  15. Very specific:

    Use s to split hunks into the smallest possible units.

    line 90
  16. Very specific:

    Commit using the drafted .agents/state/conventional-commit/commit-msg.txt:

    line 125
  17. Distinctive:

    If co-author trailers were not requested, ensure no accidental trailers were committed:

    line 148
  18. Distinctive:

    Commit operations manipulate git history and staging state only.

    line 169
  19. Distinctive:

    Run this check before completing any commit task:

    line 173

“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “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

Conventional commit

Commit the working tree as atomic commits following the Conventional Commits 1.0.0 specification with concise imperative subjects.

Invariants

  1. Do not add a co-author trailer unless explicitly requested or mandated by repository policy. Never fabricate an identity.
  2. Never use git commit -a. Stage files deliberately so unrelated edits cannot leak into history.
  3. Never run git add . or git add -A blindly. Inspect the working tree diff first.
  4. Never commit without reading the diff. The commit message must describe actual changes on disk.
  5. Consult references/commit-types.md for standard commit types. Never invent custom types or fake scopes.
  6. Create new commits for additional changes; never amend, rebase, or force-push commits created in previous sessions.
  7. Consult references/resolving-conflicts.md to resolve merge or rebase conflicts before staging.
<HARD-GATE> Write-Target Boundary. Manipulate git staging area and create commits only. Never modify working tree files, alter configuration files, run `git commit -a`, `git add -A`, `git add .` without inspecting diff first, or execute `git reset --hard`, `git rebase -i`, or `git push --force`. Refuse any commit whose staged diff contains a file path matching `(^|/)\.env(\.|$)|\.pem$|credentials\.json$|(^|/)dist/|(^|/)build/`. </HARD-GATE>

Modes

Select the commit mode before Step 1:

  • Commit mode (default). Run Steps 1 through 6 in full. Write the target commit message to .agents/state/conventional-commit/commit-msg.txt before committing.
  • Dry-run mode. Run Steps 1 through 4 only. Emit .agents/state/conventional-commit/dry-run-plan.md with one record per planned commit: commit_index, type, scope, subject, body, footer, paths. Skip Steps 5 and 6.

Reversibility

A commit is a reversible state mutation via git revert. Every invocation that produces a commit must be reversible without history rewrite:

  • To reverse a commit's content change, run git revert <sha> and use the resulting revert commit message (default: Revert "<original subject>").
  • To correct a commit message without changing history semantics, do not amend. Instead, create a follow-up commit of type docs with a body explaining the correction, or ask the user before amending.
  • Commit creation, revert creation, and re-application of the fix must each round-trip cleanly without history corruption.

Workflow

Step 1. Inspect before staging

Run status and diff inspections to evaluate the tree:

git status --short --branch
git diff --stat
git diff --cached --stat

For large diffs, read changes file by file:

git diff -- <path>
git diff --cached -- <path>

Identify any credential files (.env, *.pem, credentials.json) or build output (dist/, build/). If secrets are present, unstage them immediately using git restore --staged <path> and alert the user.

Completion criterion. The diff and status are inspected, secrets and build artifacts are unstaged, and the change boundary is identified.

Step 2. Decide commit count

Ensure one logical change per commit so each commit remains independently revertable.

Split the changes when:

  • The working tree spans multiple commit types, such as feat alongside fix.
  • Changes touch unrelated subsystems that belong in separate reviews.
  • A mechanical formatting sweep is mixed with behavioral code. Always split these, because reviewers cannot spot logic changes inside wide formatting diffs.
  • Dependency manifest updates are mixed with code consuming the dependency.
  • Test additions for separate features are mixed together.

Do not split when changes form a single atomic unit, such as a bug fix accompanied by its regression test.

Completion criterion. A planned commit count where each planned commit contains exactly one logical, revertable change.

Step 3. Stage one logical change

Stage specific files cleanly:

git add <path1> <path2>

When a single file contains mixed concerns, stage individual hunks interactively:

git add -p <path>

Use s to split hunks into the smallest possible units. Verify staged contents before writing the commit message:

git diff --cached --stat
git diff --cached

Completion criterion. Only the specific files or hunks for the target logical change appear in git diff --cached.

Step 4. Choose format mode and compose message

Determine whether the project or user prefers oneline or multiline commits:

Format options

  1. Oneline mode (Single-line). Syntax follows <type>[optional scope]: <description>. Use when the subject line alone conveys complete intent. Sample: feat(ui): add custom-select blade component.
  2. Multiline mode. Syntax follows <type>[optional scope][!]: <description>, followed by optional body and optional footers (BREAKING CHANGE:, Closes: #123).

Message component rules

  • Type. Pick one standard type documented in references/commit-types.md (feat, fix, refactor, perf, test, build, ci, docs, style, chore, revert).
  • Scope. Add a scope only when changes are isolated to a single bounded module, package, or directory. Use lowercase kebab-case naming. Omit the scope for repository-wide changes.
  • Breaking change marker. Add ! immediately before the colon when upgrading requires consumers to modify their code. Always pair ! with a BREAKING CHANGE: footer detailing the migration.
  • Description. Use imperative present tense (add instead of added, fix instead of fixes). Start with lowercase, omit trailing periods, and keep the line under 72 characters.
  • Body. Optional. Wrap at 72 characters. Explain motivation and constraints rather than restating the diff.
  • Footers. Optional. Include issue references (Closes: #123) or migration guides (BREAKING CHANGE: payload key renamed to data).
  • Co-author trailer. Optional. Include only when requested. Format: Co-authored-by: Name <email@example.com>.

In Commit mode, write the drafted message to .agents/state/conventional-commit/commit-msg.txt. In Dry-run mode, write planned commit entries to .agents/state/conventional-commit/dry-run-plan.md and stop.

Completion criterion. In Commit mode, .agents/state/conventional-commit/commit-msg.txt exists on disk with a valid Conventional Commits message under 72 chars for the subject. In Dry-run mode, .agents/state/conventional-commit/dry-run-plan.md exists with all 7 fields populated per commit and git status untouched.

Step 5. Commit

Commit using the drafted .agents/state/conventional-commit/commit-msg.txt:

git commit --file=.agents/state/conventional-commit/commit-msg.txt

Completion criterion. A newly minted git commit recorded in HEAD with the exact drafted message.

Step 6. Repeat and verify

Loop back to Step 1 until the working tree is clean. Validate the resulting git history:

git status --short
git log --oneline -5

Verify subjects mechanically:

git log --format='%s' -5 | grep -vE '^[a-z]+(\([a-z0-9-]+\))?!?: .+$' && echo 'INVALID SUBJECTS' || echo 'all subjects valid'

If co-author trailers were not requested, ensure no accidental trailers were committed:

git log --format='%B' -5 | grep -iE 'co-authored-by|generated with' && echo 'UNWANTED TRAILER' || echo 'clean'

Completion criterion. Working tree status is completely clean and the subject verification command returns all subjects valid.

Common mistakes

IDTitlePattern descriptionWhy it failsConcrete fix
CC-1Blind staginggit add . or git add -A without inspecting statusBundles unrelated edits, generated files, or secretsRun git status --short and git diff first; stage specific paths or use git add -p
CC-2Vague subjectSubject like fix: bug fixChangelog reader cannot determine the changeDescribe the repaired behavior: fix(cart): clear discounts on logout
CC-3Scope on broad sweepApplying a scope to a repository-wide changeMisrepresents blast radius and routes reviewers to wrong filesOmit scope on global changes
CC-4Breaking marker without footerAdding ! without BREAKING CHANGE: footerConsumers see ! but no migration guideAlways pair ! with a BREAKING CHANGE: footer
CC-5Fabricated co-authorInventing a co-author identityPermanent false attribution in git logOmit the trailer unless a real identity is provided
CC-6Mixed concernsMerging formatting and logic in one commitReviewers cannot spot logic changes inside wide formatting diffsSplit into a style: or refactor: commit first

Boundary isolation

Commit operations manipulate git history and staging state only. Never modify source code, alter configuration files, or run destructive git reset or checkout commands during commit creation.

Quick audit checklist

Run this check before completing any commit task:

CheckPassing condition
Unstaged secretsZero credential files (.env, *.pem) or build artifacts in staged diff
AtomicityEach commit contains exactly one logical, revertable change
Message syntaxImperative subject, lowercase, under 72 chars, valid standard type
Breaking changeEvery ! paired with a BREAKING CHANGE: footer
Clean treeWorking tree status clean and subject verification command passes

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.