Logo de Commit Message

Commit Message

Comunidade
appleboy
commit-message

Generate a conventional commit message by analyzing staged git changes. Use when the user wants to create, write, or generate a git commit message from their current staged diff. Trigger on phrases like "commit", "commit message", "commit msg", "寫 commit", "提交訊息", "generate commit", or when the user has just finished making code changes and wants to commit them. Also trigger when the user runs /commit-message.

Visão geral

Publicado porappleboy
Repositórioskills
Nome da habilidadecommit-message
Estrelas
23
Forks
8
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por appleboy no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Commit Message no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/appleboy/skills/tree/main/plugins/commit-message/skills/commit-message
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/appleboy/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/commit-message/skills/commit-message .claude/skills/commit-message
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Commit Message em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Commit Message automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Commit Message não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Generate Commit Message

Generate a conventional commit message from staged git changes following a structured prompt pipeline.

Steps

1. Stage changes and get the diff

Only stage files that were modified as part of the current session's work. Do not blindly run git add -A or git add . — pick specific files relevant to the task. If unsure which files to stage, show the user git status and let them decide.

Then get both an overview and the full diff:

bash
git diff --staged --stat
git diff --staged

If the diff is empty after this, inform the user that there are no staged changes and stop.

If the diff is very large (e.g., more than 2000 lines), focus on the --stat output and the most important hunks. For files where changes are too extensive, note that those diffs were omitted and base the summary on the stat overview and available context.

If the staged changes span many unrelated modules or more than 10 files across different concerns, suggest splitting into multiple focused commits before proceeding.

2. Check existing commit style

Run a quick scan of recent commits to match the repo's conventions:

bash
git log --oneline -20

If the repo already follows a consistent style (e.g., specific scope naming, prefix preferences, or language), adapt the generated message to match. The conventions in this skill are defaults — defer to the repo's existing patterns when they differ.

3. Analyze the diff

Produce a bullet-point summary of the changes. Follow these rules:

  • A line starting with + means it was added, - means deleted. Lines with neither are context.
  • Write every summary comment as a bullet point starting with -.
  • Do not include file names as part of the comment.
  • Do not use [ or ] characters in the summary.
  • Do not include comments copied from the code.
  • Write only the most important comments. When in doubt, write fewer comments.
  • Readability is top priority.

Example summary comments for reference (do not copy verbatim):

- Increase the number of returned recordings from 10 to 100
- Correct a typo in the GitHub Action name
- Relocate the octokit initialization to a separate file
- Implement an OpenAI API endpoint for completions

4. Generate the commit title

From the summary, write a single-line commit title:

  • Use imperative tense following the kernel git commit style guide.
  • Write a high-level title that captures a single specific theme.
  • Do not repeat the file summaries or list individual changes.
  • Keep the title concise — aim for under 50 characters (the full header including prefix and scope should stay under 72 characters).
  • Lowercase the first character.
  • Remove any trailing period.

5. Determine the prefix and scope

Prefix — choose exactly one label based on the summary:

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • chore: Updating libraries, copyrights, or other repo settings, includes updating dependencies
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, GitHub Actions)
  • docs: Non-code changes, such as fixing typos or adding new documentation
  • feat: Introduces a new feature to the codebase
  • fix: Patches a bug in the codebase
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • style: Changes that do not affect the meaning of the code (white-space, formatting, etc.)
  • test: Adding missing tests or correcting existing tests

Breaking changes — if the diff removes or renames a public API, changes a function signature in a breaking way, or makes any other backward-incompatible change, append ! after the prefix (or after the scope if present). For example: feat!: or feat(api)!:. Additionally, include a BREAKING CHANGE: line in the commit body describing what changed and how to migrate.

Scope — identify the module or package scope from the changed files:

  • Look at the file paths in the diff to determine which module, package, or component is affected.
  • If all changes are within a single module/package/directory, use that as the scope (e.g., model, git, prompt, cmd, provider).
  • Use the most specific common directory or package name. For example, changes only in provider/openai/ should use openai, not provider.
  • If changes span multiple modules, pick the one most central to the change's purpose.
  • Keep the scope short — a single lowercase word.
  • Scope is recommended but optional — if no clear scope can be determined (e.g., changes touch many unrelated areas), omit it and use the format <prefix>: <title> instead.

6. Create the commit

Format the commit message as:

<prefix>(<scope>): <title>

<summary>

Or without scope:

<prefix>: <title>

<summary>

If there is a breaking change, include the footer:

<prefix>(<scope>)!: <title>

<summary>

BREAKING CHANGE: <description of what broke and migration path>

Use a HEREDOC to pass the multi-line message to git commit:

bash
git commit -m "$(cat <<'EOF'
<prefix>(<scope>): <title>

<summary>
EOF
)"

Run git commit directly — do not ask for confirmation.

7. Handle additional user requests

If the user's request includes extra actions beyond committing (e.g., "commit and push", "commit 然後推上去", "commit and create PR"), execute those after the commit succeeds. Common patterns:

  • push: run git push after commit
  • push and PR: push, then create a pull request
  • tag: create a git tag after commit

Only perform actions the user explicitly requested.

Perguntas frequentes

O que a habilidade de IA Commit Message faz?

Generate a conventional commit message by analyzing staged git changes. Use when the user wants to create, write, or generate a git commit message from their current staged diff. Trigger on phrases like "commit", "commit message", "commit msg", "寫 commit", "提交訊息", "generate commit", or when the user has just finished making code changes and wants to commit them. Also trigger when the user runs /commit-message.

Por que usar Commit Message no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Commit Message é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Commit Message no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/appleboy/skills/tree/main/plugins/commit-message/skills/commit-message. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Commit Message?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Commit Message?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Commit Message com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Commit Message é gratuita?

A habilidade é publicada no GitHub por appleboy. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇