Skip to content
OpenSmartRoute
Skillv1.0.0

commitlint

Enforce conventional commit messages with commitlint. Use when a user asks to standardize commit messages, enforce commit conventions, set up commit linting in CI, or generate changelogs from commits.

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/commitlint/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill commitlint. Copyright stays with the author (Apache-2.0).

commitlint

Overview

commitlint checks commit messages against conventional commit format (type(scope): description). Pairs with husky for Git hooks and standard-version/changesets for automated changelogs.

Instructions

Step 1: Setup

npm install -D @commitlint/cli @commitlint/config-conventional husky
npx husky init
echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg

Step 2: Configure

// commitlint.config.js — Commit message rules
export default {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore']],
    'scope-case': [2, 'always', 'kebab-case'],
    'subject-max-length': [2, 'always', 72],
  },
}

Step 3: Valid Commits

git commit -m "feat(auth): add Google OAuth login"        # valid
git commit -m "fix(api): handle null response from /users" # valid
git commit -m "updated stuff"                              # rejected

Guidelines

  • Conventional commits enable automated changelog generation and semantic versioning.
  • Use with husky to enforce at commit time, not just in CI.
  • Types: feat (minor bump), fix (patch bump), BREAKING CHANGE (major bump).

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-commitlint/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-commitlint.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-commitlint",
  "kind": "skill",
  "name": "commitlint",
  "description": "Enforce conventional commit messages with commitlint. Use when a user asks to standardize commit messages, enforce commit conventions, set up commit linting in CI, or generate changelogs from commits.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "commitlint",
      "git",
      "conventional-commits",
      "ci",
      "changelog",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Enforce conventional commit messages with commitlint. Use when a user asks to standardize commit messages, enforce commit conventions, set up commit linting in CI, or generate changelogs from commits."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/commitlint/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/commitlint/SKILL.md",
      "key": "terminalskills/skills/skills/commitlint/SKILL.md"
    },
    "compatibility": "Any Git repository",
    "license": "Apache-2.0"
  },
  "instructions": "# commitlint\n\n## Overview\ncommitlint checks commit messages against conventional commit format (`type(scope): description`). Pairs with husky for Git hooks and standard-version/changesets for automated changelogs.\n\n## Instructions\n\n### Step 1: Setup\n```bash\nnpm install -D @commitlint/cli @commitlint/config-conventional husky\nnpx husky init\necho 'npx --no -- commitlint --edit \"$1\"' > .husky/commit-msg\n```\n\n### Step 2: Configure\n```javascript\n// commitlint.config.js — Commit message rules\nexport default {\n  extends: ['@commitlint/config-conventional'],\n  rules: {\n    'type-enum': [2, 'always', [",
  "cost": {
    "context_tokens": 316
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-commitlint/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.