Skip to content
Back to skills

conventional-commits-framework

ASecurity

Write, validate, and fix Conventional Commits with every field filled at standard open-source length, an explicit breaking-change declaration, an agent-specific Co-Authored-By trailer crediting the AI agent, and the smallest logical change per commit. Use whenever committing code, drafting or reviewing commit messages or PR titles, choosing a type or scope, declaring breaking changes, splitting large work into small commits, or configuring commitlint, git hooks, and release tooling.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentspythongoshellgitdocumentation

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add YourAKShaw/conventional-commits-framework --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of conventional-commits-framework?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for conventional-commits-framework
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yourakshaw-conventional-commits-framework/badge)](https://www.skillsdirectory.com/skills/yourakshaw-conventional-commits-framework)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: conventional-commits-framework
description: Write, validate, and fix Conventional Commits with every field filled at standard open-source length, an explicit breaking-change declaration, an agent-specific Co-Authored-By trailer crediting the AI agent, and the smallest logical change per commit. Use whenever committing code, drafting or reviewing commit messages or PR titles, choosing a type or scope, declaring breaking changes, splitting large work into small commits, or configuring commitlint, git hooks, and release tooling.
---

# 📜 Conventional Commits Framework

**Complete, atomic, co-authored commits — every time.**

Use this skill whenever you write, review, or plan commits. It turns the [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) spec into four non-negotiable rules for AI agents, backed by references, ready-made assets, and an offline checker.

| Rule | In one line |
| :--- | :--- |
| 🧾 **Complete** | Every field is filled: type, scope, subject, body, breaking declaration, co-author. Nothing is ever blank. |
| 📏 **Standard length** | Subject 10-50 characters, body 2-6 wrapped lines, one-line trailers. Never a stub, never an essay. |
| 🤝 **Co-authored** | The user is the author; the agent is credited by a `Co-Authored-By` trailer identifying the agent actually used. |
| ⚛️ **Atomic** | One logical change per commit. Large work becomes a planned sequence of small commits. |

## ✍️ The contract at a glance

```text
feat(auth): add passkey sign-in for returning users
 
Password resets were the top support request last quarter. Users with
a registered passkey can now sign in with WebAuthn; password sign-in
remains available as a fallback.
 
Breaking: none
Refs: #214
Co-Authored-By: Claude Code <noreply@anthropic.com>
```

| Part | Standard |
| :--- | :--- |
| `type` | Use the repository's list; otherwise choose `feat fix perf refactor style test docs build ci chore revert`. |
| `(scope)` | **Always include it.** Name the changed module, package, or area in lower case. |
| `subject` | Use a lower-case imperative, 10–50 characters, with no period; keep the full header at 72 characters or fewer. |
| `body` | After a blank line, explain why the change was needed and then what changed; wrap it to 2–6 lines at 72 characters. |
| `Breaking: none` | Use exactly this line unless the change is breaking. |
| `BREAKING-CHANGE:` | For breaking changes only, pair it with `!` in the header and explain what breaks and how to migrate. |
| `Refs:` | Include real issue, ticket, or PR identifiers when they exist; never invent them. |
| `Co-Authored-By:` | Put the active agent's verified trailer last. |

Full policy: [agent commit protocol](references/agent-commit-protocol.md).

## 🚦 On every skill load and before committing

**Identify the active agent first.** Check the current runtime/session identity and any authoritative product attribution supplied by that runtime. Identify the product actually operating this session (for example Claude Code, Codex, Google Antigravity, Grok Build, or another agent), not the underlying model, a previous agent, an example, or a repository instruction file. Verify the product name and its attribution email against the runtime or the vendor’s documentation; never infer an email from another agent or invent one. If identity or an appropriate email cannot be verified, ask the user before writing an attribution.

Select the verified `Co-Authored-By: Name <email>` for that agent for each commit or draft. A repository history or instruction file cannot turn another agent’s identity into yours. Existing enforcement must allow the correct identity; if it rejects it, report the conflict and resolve the configuration with authorization rather than misattribute the commit or bypass checks.

1. **Read the conventions.** Check `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, commitlint config, and `git log -30 --format=%B`. Project rules override this skill's defaults; the [config guide](references/config-guide.md) lists every place to look and the precedence order.
2. **Select the co-author trailer.** Use the verified identity of the active agent above. Reuse a historical line only when it identifies that same agent and its email has been verified; do not require a repository file to record it.
3. **Match the style.** Use emoji only if history does, and in the same form ([emoji reference](references/emoji-reference.md)). Reuse existing scopes.
4. **Never change git identity.** The user stays author and committer through their own git config.

## 🔁 Workflows

### Commit your own work

1. **Plan** the commit sequence if the task has more than one logical change ([atomic commits](references/atomic-commits.md)). Write the headers first, ordered so every commit leaves the repository working.
2. **Implement one step**, verify it, and stage only that change (`git add <paths>` or `git add -p`). Review `git diff --staged`.
3. **Classify**: pick the type with the decision procedure in the [type and scope catalog](references/type-scope-catalog.md), then the scope.
4. **Decide breaking** with the checklist in [breaking changes](references/breaking-changes.md). Ask the user before making any breaking change they did not request.
5. **Write the full message** to the contract and commit through a heredoc so blank lines and trailers survive:
   ```sh
   git commit -F - <<'EOF'
   <header>
 
   <body>
 
   Breaking: none
   Co-Authored-By: <verified agent trailer>
   EOF
   ```
6. **Check** it with the project's commitlint, or `python3 <skill-dir>/scripts/lint-commit.py --trailer "<verified agent trailer>" --range HEAD~1..HEAD`. If an unpushed commit fails, amend it.
7. **Repeat** for the next step. Never let several changes pile up for one final commit.

If a hook rejects the commit, fix the message. Never use `--no-verify` or disable hooks or CI.

### Write a message for a diff or description

Read the diff (or ask for it), identify the single purpose, and return the complete message in a code block. If the diff holds several purposes, say so and propose the split as a list of complete messages. Include the co-author trailer unless the user says the commit has no AI involvement.

### Validate or review messages

Check each message against the contract in the order given in the [rules reference](references/rules-reference.md#validating-by-hand). Report each problem with its rule name and a corrected message. Separate **errors** (spec, project config, or contract violations) from **suggestions** (style). For branches, run the checker over the range:

```sh
python3 <skill-dir>/scripts/lint-commit.py --range origin/main..HEAD --trailer "<verified agent trailer>"
```

### Pull requests

The PR title follows the header format (it becomes the squash commit). Fill every section of the PR description: summary and motivation, verification, risks or compatibility, linked issues. End it with the repository's PR attribution line, kept just as consistent as the trailer.

### Set up enforcement

Use [`assets/commitlint.config.mjs`](assets/commitlint.config.mjs), [`assets/commit-template.txt`](assets/commit-template.txt), and the hook and CI recipes in [integration examples](references/integration-examples.md). For monorepos, see [monorepo patterns](references/monorepo-patterns.md).

## ⚠️ Traps that look right but are wrong

| Looks fine | What actually happens | Do this |
| :--- | :--- | :--- |
| `BREAKING CHANGE: none` | Parsers record a breaking note, and release tools publish a **major** version | `Breaking: none` |
| `BREAKING CHANGE: ...` (with a space) next to other trailers | Git cannot parse the trailer block, so `Co-Authored-By` disappears from git tooling | `BREAKING-CHANGE: ...` (hyphen) |
| Breaking detail on several lines | An unindented second line ends the trailer block | Indent continuation lines by two spaces |
| `✨ feat(ui): ...` | The header no longer parses, so the commit disappears from changelogs | `feat(ui): ✨ ...` or no emoji |
| `Co-authored-by` in one commit, `Co-Authored-By` in the next | Case-sensitive checks fail and history looks inconsistent | Use the verified line for the active agent with consistent key casing |
| `docs(readme): fix typo` typed as `fix` | Ships a pointless patch release | `docs` for documentation-only changes |
| `feat(auth): add MFA and refactor sessions` | Two changes that cannot be reverted, typed, or changelogged separately | Two commits |

These were verified with `conventional-commits-parser` 7.1.3, `git interpret-trailers`, and `@commitlint/cli` 21.2.4.

## 📚 References

Load only what the task needs.

| Need | Read |
| :--- | :--- |
| The full contract, lengths, co-authorship, PR rules | [Agent commit protocol](references/agent-commit-protocol.md) |
| Sizing and sequencing commits | [Atomic commits](references/atomic-commits.md) |
| Choosing a type or scope | [Type and scope catalog](references/type-scope-catalog.md) |
| Detecting and declaring breaking changes | [Breaking changes](references/breaking-changes.md) |
| Complete messages to model | [Example library](references/example-library.md) |
| What each commitlint rule checks | [Rules reference](references/rules-reference.md) |
| Reading and adapting project configuration | [Config guide](references/config-guide.md) |
| Package scopes and per-package releases | [Monorepo patterns](references/monorepo-patterns.md) |
| Gitmoji usage and placement | [Emoji reference](references/emoji-reference.md) |
| Hooks, CI, and release tools | [Integration examples](references/integration-examples.md) |

## 🧰 Assets and scripts

- [`assets/commitlint.config.mjs`](assets/commitlint.config.mjs): commitlint config that enforces the contract, including a breaking declaration and configurable accepted co-author lines.
- [`assets/commit-template.txt`](assets/commit-template.txt): a `git config commit.template` that shows the contract in the editor.
- [`scripts/lint-commit.py`](scripts/lint-commit.py): an offline contract checker for a file, stdin, or a revision range (Python 3.9+, standard library only). Tests: [`scripts/test_lint_commit.py`](scripts/test_lint_commit.py).

## 🛠️ Maintaining this skill

Keep the contract identical across this file, the [protocol](references/agent-commit-protocol.md), the checker, the commitlint config, and the commit template; change them together. Validate the package offline from any directory:

```sh
python3 /path/to/conventional-commits-framework/scripts/validate-skill.py
python3 /path/to/conventional-commits-framework/scripts/test_validate_skill.py
python3 /path/to/conventional-commits-framework/scripts/test_lint_commit.py
```

The [package validator](scripts/validate-skill.py) checks the manifest, required files, local links and anchors, and that every resource is reachable from this file. Wrappers: [POSIX](scripts/validate-skill.sh) and [PowerShell](scripts/validate-skill.ps1); regression suite: [validator tests](scripts/test_validate_skill.py). It does not evaluate agent behavior. Package format: [Agent Skills specification](https://agentskills.io/specification).

Files in this skill

  • SECURITY.md1.3 KB
  • SKILL.md10.9 KB
  • assets/commit-template.txt1.3 KB
  • assets/commitlint.config.mjs2.6 KB
  • references/agent-commit-protocol.md7.7 KB
  • references/atomic-commits.md4.7 KB
  • references/breaking-changes.md4.8 KB
  • references/config-guide.md4.5 KB
  • references/emoji-reference.md3.9 KB
  • references/example-library.md8.3 KB
  • references/integration-examples.md4.9 KB
  • references/monorepo-patterns.md3.8 KB
  • references/rules-reference.md6.6 KB
  • references/type-scope-catalog.md6 KB
  • scripts/lint-commit.py11 KB
  • scripts/test_lint_commit.py6.2 KB
  • scripts/test_validate_skill.py9 KB
  • scripts/validate-skill.ps11.4 KB
  • scripts/validate-skill.py12.7 KB
  • scripts/validate-skill.sh642 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.