Agent skill

conventional-committer

Commit changes to the skills-akaihola Git repository, generating a commit message that matches the existing history style. Use when the user says "commit", "commit staged changes", "commit everything", "commit my changes", or "save these edits as a commit" — in this repository. Inspects recent history, stages changes if requested, and runs git commit automatically.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/akaihola/skills-akaihola/tree/main/conventional-committer

SKILL.md

Conventional Committer

Overview

This skill creates Git commits for this repository.

It:

  • Inspects recent commit history and current changes.
  • Generates a commit message consistent with the existing history.
  • Stages the appropriate changes when needed.
  • Runs git commit with the generated message.

The default behavior of this skill is to produce a commit in the repository, not merely draft a message.

When to Use This Skill

Use this skill whenever you are asked to create a commit in this repository, for example when the user says things like:

  • “Commit staged changes”
  • “Commit everything”
  • “Commit all changes”
  • “Commit my changes”
  • “Save these edits as a commit”
  • “Create a commit for these changes”

In particular:

  • Use this skill even if the user does not mention “staged changes”.
  • Use this skill even if the user does not mention “Conventional Commit” or any specific commit style.
  • Default to using this skill for any request whose primary intent is “make a commit”.

Interpret user intent as follows:

  • If there are any staged changes and the user has not explicitly asked to include additional unstaged changes, commit only what is already staged and do not stage anything else.
  • If the user explicitly says they want to include unstaged changes (for example, “commit everything”, “commit all changes”, “commit my changes”, “stage and commit all changes”), treat that as a request to:
    • Stage all relevant changes, then
    • Commit them.
  • If there are no staged changes and the user asks to commit changes in general (for example, “commit changes”, “save these edits as a commit”), stage the intended changes first and then commit them.

If there are no changes to commit after doing this, report that no commit was created.

Git Context Helper Script

This skill relies on a helper script stored in:

  • scripts/git_context_chunks.py (relative to skill directory)

The helper script:

Purpose Command / Invocation Output / Notes
Run from skill directory python3 scripts/git_context_chunks.py Uses git --no-pager and GIT_PAGER=cat to avoid interactive pagers.
Recent commits section git log -n5 --format="commit %h%n%B%n--------------" Produces == Recent commits (last 5) == followed by 5 recent commits.
Staged changes section git --no-pager diff --cached Produces == Staged changes ... == followed by the full staged diff.
Chunking and splitting (internal) ≤ 16384 chars per chunk; splits at diff --git boundaries or newlines.
Chunk metadata & navigation (internal) Wraps chunks with markers; prints next command to stderr when needed.

Treat these markers and “next chunk” lines as metadata; they must not appear in the final commit message.

Running the Helper Script

Run all commands from the conventional-committer skill directory (conventional-committer/ in this repository).

First Chunk

Obtain the first chunk of Git context:

  • python3 scripts/git_context_chunks.py

The script:

  • Outputs chunk 1/N to standard output.
  • If N > 1, prints a “Next chunk command” to standard error.

Subsequent Chunks

When more chunks are required:

  1. Read the “Next chunk command” emitted to standard error, e.g.:

    • python3 scripts/git_context_chunks.py --chunk-index 1
  2. Execute that command to retrieve the next chunk.

  3. Repeat until the current chunk index equals N - 1 (the last chunk).

Together, the ordered chunks reconstruct the 5 most recent commits and the full staged diff without truncation.

Using the Skill to Commit Changes

This section specifies the expected agent behavior when applying the skill.

High-Level Workflow

  1. Interpret the user’s intent about what should be committed.
  2. Stage the appropriate changes (if needed).
  3. Verify that there is something to commit.
  4. Collect Git context using the helper script.
  5. Load the resulting chunk(s) into working context in order.
  6. From this context, synthesize a commit message that:
    • Summarizes the committed changes.
    • Follows the project’s existing commit style as inferred from recent commits.
  7. Run git commit with the synthesized message to actually create the commit.
  8. Report the outcome (e.g., commit hash and subject line) back to the caller.

Detailed Procedure

  1. Determine what should be committed.

    Interpret user intent and the current index state:

    • First check whether there are staged changes.
    • If there are staged changes and the user has not explicitly asked to include additional unstaged changes, do not modify the index; commit exactly what is already staged.
    • If the user explicitly says they want to include unstaged changes (for example, “commit everything”, “commit all changes”, “commit my changes”, “stage and commit all changes”), stage all intended changes before proceeding (for example, using git add -A or an equivalent command appropriate for this repository and workflow).
    • If there are no staged changes and the user asks to commit changes in general (for example, “commit changes”, “save these edits as a commit”), stage the intended changes before proceeding.
  2. Verify there is something to commit.

    • If, after staging as above, there are no staged changes (for example, git diff --cached is empty), report that there are no changes to commit and stop.
    • Otherwise, proceed.
  3. Run the helper script for chunk 0:

  • python3 scripts/git_context_chunks.py
  1. Capture the output for use as context:

    • Treat everything between:
      • [conventional-committer] chunk 1/N
      • [conventional-committer] end of chunk 1/N
    • As the primary data payload for that chunk.
    • Treat the header and footer lines as metadata to track chunk ordering; they should not be included in the commit message itself.
  2. If more chunks exist:

    • Execute the “Next chunk command” provided by the script to obtain chunk 2, then 3, and so on, until all chunks are collected.
    • Maintain strict chunk order (1, 2, 3, …, N) when building internal understanding of the diff and history.
  3. From the collected chunks:

    • Read the recent commits and the staged diff.
    • Infer the repository’s commit style from the recent commits. When the history uses a structured style (such as a type: subject or type(scope): subject pattern), mirror that style in the new commit.
    • Propose a single commit message with:
      • A concise subject line in the imperative mood.
      • An optional body explaining what changed and why, grouped logically.
      • Optional footers (e.g., for breaking changes or references to issues) when appropriate.
  4. Validate and apply the commit:

    • Validate that the generated message:
      • Matches the tone and structure of recent commits.
      • Accurately reflects the staged diff.
      • Uses line wrapping and blank-line separation consistent with existing history.
    • Then run git commit with this message from the repository root. For example:
      • When only a subject is needed:
        git commit --no-edit -m "<subject line>" is acceptable if no separate body is needed.
        Otherwise:
        git commit -m "<subject line>"
      • When a body is present:
        git commit -m "<subject line>" -m "<body ...>"
    • After a successful commit, you may obtain and report the new commit’s hash and subject line (for example, using git --no-pager log -1 --oneline).

The expected outcome of this procedure is a new commit in the repository that accurately represents the requested changes.

Recommended Orchestration Pattern

For any system that can execute commands in this repository:

  1. Whenever a user asks to commit changes (e.g., “commit staged changes”, “commit everything”, “save these edits as a commit”), route the request through this skill.
  2. Allow the skill to:
    • Prefer committing already-staged changes when any exist, only staging additional changes when the user has explicitly asked to include them (for example, “commit everything” or “stage and commit all changes”).
    • Run the helper script to collect Git context chunks in order: chunk 1/N, chunk 2/N, …, chunk N/N.
    • Synthesize an appropriate commit message based on history and the staged diff.
    • Run git commit with that message.
  3. After the commit, surface back to the user:
    • The exact commit message that was used (subject line and optional body).
    • A short confirmation of the created commit (for example, the commit hash and subject line).

Orchestrators should treat this skill as the standard path for creating commits in this repository.

Notes and Limitations

  • The helper script assumes a standard Git repository and must be run from inside that repository.
  • The 16384-character limit is enforced per chunk, not globally; a very large diff may result in many chunks.
  • When a single file’s diff is larger than 16384 characters, the script splits that file’s diff across multiple chunks at newline boundaries where possible.
  • The script always disables Git’s pager, ensuring it does not block on interactive output.
  • This skill assumes the runtime has permission to modify the repository (stage changes and create commits).

Expand your agent's capabilities with these related and highly-rated skills.

akaihola/skills-akaihola

youtube-to-markdown

Convert a YouTube video into clean, readable Markdown using its free auto-generated captions (no paid API needed). Use when the user asks to "convert YouTube video to markdown", "get transcript from YouTube URL", "summarise this video", or wants to turn YouTube subtitles/captions into readable text. Prefer this over youtube-transcription when the video already has auto-generated subtitles — it's free and faster. Accepts YouTube URLs.

1 0
Explore
akaihola/skills-akaihola

brave-search

Search the web using Brave Search API. Use when the user asks to "search the web", "look up current information", "find news about", "research a topic online", "check prices online", or needs up-to-date facts that may not be in the model's training data. Requires BRAVE_SEARCH_API_KEY. Supports structured web results (pages, FAQs, news, videos) and an optional AI summarizer.

1 0
Explore
akaihola/skills-akaihola

verkkokauppa

Search products on the Verkkokauppa.com Finnish webshop. This skill uses the Verkkokauppa search API directly, requiring no browser. Use when the user asks to "search Verkkokauppa", "find products on verkkokauppa.com", "verkkokauppa product search", "check Verkkokauppa prices", or mentions searching the Verkkokauppa store.

1 0
Explore
akaihola/skills-akaihola

clasohlson

Search products on the Clas Ohlson Finland webshop (clasohlson.com/fi/). This skill uses the Voyado Elevate (Apptus eSales) search API directly, requiring no browser. Use when the user asks to "search Clas Ohlson", "find products on clasohlson.com", "clas ohlson product search", "check Clas Ohlson prices", or mentions searching the Finnish Clas Ohlson store.

1 0
Explore
akaihola/skills-akaihola

bauhaus

Search products on the Bauhaus webshop (bauhaus.fi). This skill uses the Algolia search API with automatic key refresh. Use when the user asks to "search Bauhaus", "find products on bauhaus.fi", "bauhaus product search", "check Bauhaus prices", or mentions searching the Bauhaus store.

1 0
Explore
akaihola/skills-akaihola

library

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results