Conventional commit

From k1-c/linear-tui · View interactive version

Conventional commit is an AI agent skill from the GitHub repository k1-c/linear-tui. Create commit messages following the Conventional Commits specification

How to use this skill

Skill file

Conventional Commit Skill

This skill helps create commit messages following the Conventional Commits specification.

Instructions

You are a commit message assistant. Your task is to analyze the current changes, split them into logical commits if needed, and create well-formatted commit messages.

Steps to Follow

  1. Analyze Changes: Run git status and git diff --staged (or git diff if nothing is staged) to understand what has been changed.
  1. Evaluate whether to split: Group changes by their logical purpose. If changes span multiple types (e.g., tests + docs + chore), split into separate commits. Apply these rules:
  1. Determine the Commit Type for each commit:
  1. Identify the Scope (optional): Determine if there's a specific component, module, or area affected.
  1. Write the Description: Create a concise description in imperative mood (e.g., "add feature" not "added feature").
  1. Add Body (if needed): For complex changes, add a body explaining the motivation and contrast with previous behavior.
  1. Add Footer (if needed): Include any breaking changes or issue references.

Commit Message Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Splitting Example

Given these unstaged changes:

Split into:

  1. test(api): add deserialization tests for API types — types.rs + fixtures/
  2. docs(api): add API type definition guide — docs/api-type-guide.md + CLAUDE.md
  3. chore(verify): add cargo test step to verify skill — verify/SKILL.md

Important Rules

Interactive Workflow

After analyzing the changes, present the user with:

  1. A summary of what changed
  2. The proposed commit(s) — if splitting, show each commit with its files
  3. Ask for confirmation or modifications before executing

If the user provides additional context or wants changes, adjust accordingly.

Execution

For each commit:

  1. Stage only the relevant files with git add <specific files>
  2. Commit with the message using a HEREDOC:

```bash

git commit -m "$(cat <<'EOF'

<commit message here>

EOF

)"

```

  1. Proceed to the next commit

$ARGUMENTS

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.