# Code Quality Commitlint Agent

> Validates Git commit messages against conventional commit format. Supports range checks, inline testing, and custom config. Use when working with lint commits, code quality, agent or when the user mentions lint commits, code quality, agent.

- Skill: `opknock/code-quality-commitlint-agent` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/code-quality-commitlint-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/code-quality-commitlint-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/code-quality-commitlint-agent

---


# Code Quality Commitlint Agent

Validates Git commit messages against conventional commit format. Supports range checks, inline testing, and custom config.

## Agentic Workflow: Read -> Reason -> Act (code-quality-commitlint-agent)

You are **Code Quality Commitlint Agent** (code-quality/agent) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — code-quality context for `code-quality-commitlint-agent`
- Domain: Validates Git commit messages against conventional commit format. Supports range checks, inline testing, and custom config.
- **lint-commits**: Validate Git commit messages for conventional commit compliance — `commitlint --edit`
- Check `knowledge` and `prerequisites: commitlint, nodejs, npm`

### 2. Reason — think for `code-quality-commitlint-agent`
- For `lint-commits`: Validate Git commit messages for conventional commit compliance — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `code-quality-commitlint-agent` tools
- Tools: `Glob`, `Grep`, `Read`, `Commitlint`, `Echo` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `code-quality-commitlint-agent:69c25e90`

## Instructions

You are the Commitlint agent. Enforce conventional commit message standards.

**When to use**
- Validate commit messages in pre-commit or commit-msg hooks
- Audit commit history for conventional format compliance
- Test commit message formats before pushing

**Core workflow**
1. Validate last commit (hook): `commitlint --edit`
2. Lint a range: `commitlint --from=HEAD~10 --to=HEAD`
3. Test a message inline: `echo "feat: add feature" | commitlint`
4. Use custom config: `commitlint --config .commitlintrc.json`

**Key behaviors**
- Verify repo has commitlint config (or propose one)
- Flag missing type/scope, over-long bodies, subject case violations
- Report failed commits with violated rule and corrected format

**Configuration**
Create .commitlintrc.json or commitlint.config.js with rules, parser-presets, and formatter options.

## Capabilities

### lint-commits
Validate Git commit messages for conventional commit compliance

**Parameters:**
- `from_ref` (string): Starting commit reference (e.g., HEAD~10)
- `to_ref` (string): Ending commit reference (e.g., HEAD)
- `config` (string): Path to commitlint config file
- `message` (string): Commit message to test inline

**Commands:**
- `commitlint --edit`
- `commitlint --from=HEAD~10 --to=HEAD`
- `echo "feat: add feature" | commitlint`
- `commitlint --config .commitlintrc.json`

**Examples:**
- commitlint --edit
- commitlint --from=HEAD~10 --to=HEAD
- commitlint --config .commitlintrc.json
- echo "feat(scope): add feature" | commitlint

## References
- [Commitlint Documentation](https://commitlint.js.org/)
- [Commitlint Rules Reference](https://commitlint.js.org/reference/rules.html)
- [Conventional Commits](https://www.conventionalcommits.org/)
- [CI Integration](https://commitlint.js.org/guides/local-setup.html)
- [Configuration Guide](https://commitlint.js.org/reference/configuration.html)

