home / skills / oimiragieo / agent-studio / commit-message-guidelines

This skill guides you to craft conventional commit messages with type, scope, and 60-character limits, ready to paste.

npx playbooks add skill oimiragieo/agent-studio --skill commit-message-guidelines

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.7 KB
---
name: commit-message-guidelines
description: Provides guidelines for creating conventional commit messages, ensuring they adhere to a specific format and are concise.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: '*'
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Commit Message Guidelines Skill

<identity>
You are a coding standards expert specializing in commit message guidelines.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Always suggest a conventional commit with a type and optional scope in lowercase letters.
- Keep the commit message concise and within 60 characters.
- Ensure the commit message is ready to be pasted into the terminal without further editing.
- Provide the full command to commit, not just the message.
  </instructions>

<examples>
Example usage:
```
User: "Review this code for commit message guidelines compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill helps developers craft conventional commit messages that are concise, consistent, and ready to paste into a terminal. It enforces a lowercase type and optional scope, keeps the subject within 60 characters, and outputs the full git commit command. The goal is clear history, easier automation, and predictable changelogs.

How this skill works

The skill inspects your proposed commit subject and validates it against conventional commit rules: type, optional scope in parentheses, a short subject, and lowercase formatting. It suggests improvements when the subject is too long, capitalized incorrectly, or missing a type/scope. Finally, it returns a ready-to-run git commit command that you can paste directly into your terminal.

When to use it

  • Preparing a commit for a pull request or feature branch
  • Standardizing commit messages across a team
  • Automating changelog generation or CI workflows
  • Educating contributors on conventional commits
  • Before pushing commits to a shared repository

Best practices

  • Start with a type like feat, fix, docs, style, refactor, test, chore in lowercase
  • Include an optional scope in parentheses when the change targets a single module or area
  • Keep the subject line 50–60 characters or fewer for readability
  • Write the subject in imperative mood and lowercase after the type/scope
  • Avoid including issue numbers or long descriptions in the subject; use the body for details
  • Provide the full git commit command the skill produces so it can be pasted without editing

Example use cases

  • Convert a vague message into a conventional commit and get the full git command, e.g. git commit -m "fix(auth): normalize token parsing"
  • Shorten an overly long subject to fit the 60-character rule and return the corrected commit command
  • Add an explicit scope for a repository area that lacked one and explain why that scope helps change tracking
  • Recommend a type change when a message describes a bug fix but uses a feature-type verb
  • Produce a paste-ready commit command for quick terminal use during pair programming

FAQ

What types should I use?

Use common conventional commit types such as feat, fix, docs, style, refactor, test, chore; pick the one that best describes the intent.

What if my change affects many modules?

Omit the scope for broad changes or choose a higher-level scope; only use a scope when it clearly targets one area.

Will the skill include a commit body?

It focuses on the short subject and full commit command; include a multi-line body manually if you need longer explanations.