Logo von Commit Message

Commit Message

Community
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.

Übersicht

Herausgeberappleboy
Repositoryskills
Skill-Namecommit-message
Sterne
23
Forks
8
Mitgelieferte Dateien
Nur Anweisungen
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von appleboy auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Commit Message in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/appleboy/skills/tree/main/plugins/commit-message/skills/commit-message
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

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
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Commit Message in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Commit Message automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Commit Message nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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.

Häufig gestellte Fragen

Was macht der KI-Skill 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.

Warum Commit Message in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Commit Message besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Commit Message in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/appleboy/skills/tree/main/plugins/commit-message/skills/commit-message ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Commit Message nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Commit Message verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Commit Message damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Commit Message kostenlos?

Der Skill wird von appleboy auf GitHub veröffentlicht. Die Lizenzbedingungen finden Sie im Repository. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇