agentleFS
JonDotsoyJonDotsoy/skills/commit-message/SKILL.md

commit-message

Skill0 starsChanged 10 months agoMITView on GitHub

Genera un mensaje de commit en formato Conventional Commits leyendo el diff staged y los últimos commits del repositorio.

62 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pr-description, changelog and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    pr-description

    Draft Nacelle PR titles, pull request descriptions, commit titles, commit descriptions, and squash commit messages. Use when asked for PR or commit wording, a branch summary, or a PR description that can be used in a commit. Omit validation sections from commit bodies and remove filler.

    Also in 9 projects that use this

  • HashiCorpSkill

    changelog

    Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 7 projects that use this

  • GoogleSkill

    grilling

    Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

    Also in 3 projects that use this

  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

  • +2 more from google

The file

Files
SKILL.md

Commit Message Generator

Genera un mensaje de commit siguiendo el estándar Conventional Commits para los cambios actualmente en el staging area.

Workflow

1. Obtener el diff staged

git --no-pager diff --staged

Si no hay nada staged, detenerse y avisar al usuario: "No hay cambios en el staging area. Agrega archivos con git add primero."

2. Obtener contexto de commits recientes

git --no-pager log --format="%s%n%b" -10

Esto entrega los últimos 10 mensajes (subject + body) para inferir el estilo y vocabulario usados en el proyecto.

3. Analizar el diff

Antes de escribir el mensaje, responder internamente:

  • ¿Qué cambió? — Archivos modificados, funciones añadidas/eliminadas, comportamiento nuevo.
  • ¿Por qué cambió? — Qué problema resuelve o qué capacidad agrega (esto va en el body).
  • ¿Cuál es el scope? — Subsistema, carpeta o componente más representativo del cambio (ej. extraer-metadata, consola, api, db, scripts). Si el cambio es transversal, omitir el scope.
  • ¿Cuál es el type? — Ver tabla de tipos a continuación.

4. Elegir el type

TypeCuándo usarlo
featNueva funcionalidad visible al usuario o al sistema
fixCorrección de un bug
refactorCambio interno que no altera comportamiento ni agrega features
testAgrega o corrige tests
docsSolo documentación (README, CLAUDE.md, comentarios)
choreTareas de mantenimiento: dependencias, configuración, CI
styleFormato, espaciado, nombres — sin cambio de lógica
perfOptimización de rendimiento
buildSistema de build, scripts de empaquetado
ciPipelines de CI/CD
revertRevierte un commit previo

Elegir el type más específico que aplique. Si el diff mezcla varios types, dividirlo en commits separados es preferible — mencionarlo al usuario si aplica.

5. Redactar el mensaje

Formato obligatorio:

<type>(<scope>): <subject>

<body>

Reglas del subject (primera línea):

  • Imperativo en inglés o español, según el idioma de los commits recientes del proyecto.
  • Minúsculas, sin punto final.
  • Máximo 72 caracteres incluyendo type(scope): .
  • Describe qué hace el cambio, no cómo.

Reglas del body (opcional pero recomendado cuando el cambio no es trivial):

  • Separado del subject por una línea en blanco.
  • Explica el por qué del cambio: contexto, problema que resuelve, decisión tomada.
  • Líneas de máximo 72 caracteres.
  • Puede usar viñetas (-) para enumerar puntos.
  • Omitir si el subject ya es autoexplicativo.

6. Validar el mensaje generado

Antes de presentarlo al usuario, pasar el mensaje por el script de validación:

bash scripts/validate-commit-message.sh "<mensaje generado>"

Si el script falla (exit 1), corregir el mensaje hasta que pase todas las reglas. Solo presentar el mensaje al usuario cuando la validación sea exitosa.

7. Presentar el resultado

Mostrar el mensaje en un bloque de código para que el usuario pueda copiarlo fácilmente:

<type>(<scope>): <subject>

<body>

Si hay algo ambiguo en el diff (mezcla de concerns, scope no claro), mencionarlo brevemente después del bloque. No preguntar antes de generar — generar primero, comentar después.

Ejemplos

feat(extraer-metadata): add last_payment_folio field to PDF parser

Kastor started including the folio number in boletas issued from 2025-07.
Added extraction logic in parsear_metadata() and updated schema.json.
fix(consola): show correct billing period when month is January

Date arithmetic was rolling back to December of the previous year
due to a zero-index month offset.
chore: update wrangler to 3.78.0
refactor(api): extract apartment upsert into repository layer

Moves D1 write logic out of the route handler to follow the
API → Router → Service → Repository pattern defined in docs/dev/api.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.