Commit Message Linter for Openclaw

A dependency-free Python tool to validate git commit messages against the Conventional Commits specification and custom project rules.

charlie-morrison
v1.0.1
May 1, 2026
0
750
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install commit-message-linter

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install commit-message-linter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Commit Message Linter?

The Commit Message Linter is a robust utility designed to maintain a clean and readable project history. By enforcing the Conventional Commits standard, it ensures that every contribution is categorized correctly, facilitating automated changelog generation and better team communication. This tool is a vital addition to the Openclaw Skills ecosystem for developers who prioritize repository health.

Built with pure Python and zero external dependencies, it offers high performance and easy portability across different environments. Whether you need to lint a single message, a range of historic commits, or integrate directly into your local git workflow, this skill provides the flexibility required for modern software development cycles.

Commit Message Linter Use Cases

  • Enforcing Conventional Commits standards across distributed engineering teams.
  • Automating commit message validation within CI/CD pipelines to prevent non-compliant code merges.
  • Implementing local git commit-msg hooks to provide immediate feedback to developers.
  • Auditing existing git history for quality and consistency before major releases.
  • Restricting commit types and scopes to specific project domains using custom whitelists.

How Commit Message Linter Works

  1. The linter receives input via direct message strings, file paths, stdin, or git revision ranges.
  2. It auto-discovers configuration files such as .commitlintrc.json to establish active validation rules.
  3. The engine parses the commit header to identify the type, scope, and description components.
  4. It runs a suite of checks including length limits, regex patterns, and vocabulary constraints for types and scopes.
  5. The tool generates a report in the specified format (text, JSON, or Markdown) and returns an exit code indicating success or failure.

Commit Message Linter Setup

To start using this tool within the Openclaw Skills framework, you can run it directly with Python. Generate a default configuration file first:

# Initialize the configuration
python3 scripts/lint_commits.py init

# Basic usage to lint the most recent commit
python3 scripts/lint_commits.py

To install as a git hook, add the following to .git/hooks/commit-msg:

#!/bin/sh
python3 scripts/lint_commits.py --file "$1" --strict

Commit Message Linter Data Schema & Taxonomy

The skill utilizes a JSON-based configuration schema to define linting strictness. The primary metadata taxonomy includes:

Attribute Description Default
header_max_length Maximum character count for the first line 72
require_conventional Boolean to enforce the standard format true
types Array of allowed commit types (feat, fix, etc.) Standard List
forbidden_patterns Array of regex strings to block specific content []
format Output encoding: text, json, or markdown text

Commit Message Linter Advanced Features

  • Multi-format output support for seamless integration with third-party monitoring tools and documentation generators.
  • Strict Mode handling that elevates warnings to errors, ensuring zero-tolerance for formatting inconsistencies.
  • Smart filtering that automatically ignores merge commits, reverts, and version tags to reduce false positives.
  • Range-based linting allowing for the validation of entire feature branches or PR diffs in a single command.
  • Regex-based mandatory patterns to enforce internal ticketing system references (e.g., JIRA IDs).

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*