@savvy-web/commitlint
v0.9.1
Published
Dynamic, intelligent commitlint configuration with auto-detection of DCO, workspace scopes, and versioning strategies.
Maintainers
Readme
@savvy-web/commitlint
A commitlint config factory that reads your repo and builds the right rules — DCO requirements, workspace scopes, and versioning strategy included. No per-project configuration needed.
Features
- Auto-detection - Reads DCO files, workspace packages and versioning strategy from the repo; no manual wiring required
- Zero config - Ships with working defaults
- Type-safe - Full TypeScript support with Zod schema validation
- Extended types - Includes
ai,releaseandtddcommit types beyond conventional commits - Interactive prompts - Built-in commitizen adapter with emoji support
- CLI tooling - Set up and validate configurations with
savvy-commit
Install
npm install -D @savvy-web/commitlint @commitlint/cli @commitlint/config-conventional huskyQuick start
// commitlint.config.ts
import { CommitlintConfig } from "@savvy-web/commitlint";
export default CommitlintConfig.silk();Or use the static configuration without auto-detection:
// commitlint.config.ts
export { default } from "@savvy-web/commitlint/static";Set up your project with the CLI:
npx savvy-commit initClaude Code plugin
This package ships a companion Claude Code plugin that keeps AI agents on the right side of your commit conventions:
# Add the Savvy Web plugin marketplace (one-time setup)
/plugin marketplace add savvy-web/systems
# Install the commitlint plugin for this project
/plugin install commitlint@savvy-web-systems --scope projectOnce installed, the plugin:
- Injects context at session start with your project's commit conventions, current branch and inferred ticket id, a GPG/SSH signing diagnostic, and a cached list of open issues from
gh. - Auto-allows safe Bash and curated MCP operations so the agent does not prompt for read-only commands, common workflow tools, or vetted GitHub / GitKraken operations. Destructive commands (
rm,curl,git push --force, package installers,gh repo delete,gh secret, etc.) are never auto-allowed. - Validates commit messages before they run by intercepting
git commitandgh pr create|edit, denying messages that contain markdown headers or code fences, or that conflict with your signing config (--no-gpg-signwhilecommit.gpgsign=true). - Advises on commit quality for plan/design path leakage, soft-wrapped bullets, overly long bodies, and missing
Closes/Fixes/Resolvestrailers when the branch encodes a ticket id. - Replays commitlint after each commit and surfaces signing-status or Closes-trailer issues so the agent can offer an
--amendfix. - Reminds the agent about commit quality when a user prompt mentions committing, shipping, opening a PR, amending, or squashing.
Documentation
For configuration options, API reference and usage details, see docs/.
- Configuration guide - All configuration options
- Auto-detection - How automatic detection works
- CLI reference - Command-line interface usage
- Commit types - Available types and their usage
