{"id":25949731,"url":"https://github.com/theorib/git-commit-message-ai-prompt","last_synced_at":"2026-05-11T14:32:31.407Z","repository":{"id":278555139,"uuid":"935989467","full_name":"theorib/git-commit-message-ai-prompt","owner":"theorib","description":"An AI-assisted git Conventional Commit message prompt. Based on the Conventional Commits 1.0.0 Specification. Currently using the AI Commit VS Code plugin.","archived":false,"fork":false,"pushed_at":"2025-10-21T22:44:24.000Z","size":81,"stargazers_count":21,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-04T02:50:24.451Z","etag":null,"topics":["ai","artificial-intelligence","commit","commit-conventions","conventional-commits","gemini","gemini-api","git","github","vscode","vscode-settings"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=Sitoi.ai-commit","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theorib.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-20T10:55:04.000Z","updated_at":"2025-11-16T14:11:08.000Z","dependencies_parsed_at":"2026-02-09T21:04:55.559Z","dependency_job_id":null,"html_url":"https://github.com/theorib/git-commit-message-ai-prompt","commit_stats":null,"previous_names":["theorib/ai-commit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theorib/git-commit-message-ai-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theorib%2Fgit-commit-message-ai-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theorib%2Fgit-commit-message-ai-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theorib%2Fgit-commit-message-ai-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theorib%2Fgit-commit-message-ai-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theorib","download_url":"https://codeload.github.com/theorib/git-commit-message-ai-prompt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theorib%2Fgit-commit-message-ai-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32898982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","commit","commit-conventions","conventional-commits","gemini","gemini-api","git","github","vscode","vscode-settings"],"created_at":"2025-03-04T12:28:51.724Z","updated_at":"2026-05-11T14:32:31.366Z","avatar_url":"https://github.com/theorib.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-assisted git _Conventional Commit_ message prompt\n\n## Table of Contents\n\n- [AI-assisted git _Conventional Commit_ message prompt](#ai-assisted-git-conventional-commit-message-prompt)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [Purpose](#purpose)\n  - [Prompt Features:](#prompt-features)\n  - [Choosing the best AI API to use with AI Commit](#choosing-the-best-ai-api-to-use-with-ai-commit)\n    - [The need for a large AI context window](#the-need-for-a-large-ai-context-window)\n  - [Setup](#setup)\n  - [Usage](#usage)\n  - [Current Status](#current-status)\n\n## Introduction\n\nThis repository tracks the development of a **custom AI prompt** for use with the [AI Commit VS Code extension](https://marketplace.visualstudio.com/items?itemName=Sitoi.ai-commit). The prompt's purpose is to generate **better [git](https://git-scm.com) commit messages** based on the [_Conventional Commits_ 1.0.0 Specification](https://www.conventionalcommits.org/en/v1.0.0/).\n\nThis project's current iteration is loosely based on the extension's original prompt message [Git Commit Message Guide](https://github.com/Sitoi/ai-commit/blob/main/prompt/with_gitmoji.md) and further refined to my needs and taste.\n\n## Purpose\n\nThe purpose of this prompt is to generate thorough, consistent and precise [git](https://git-scm.com) commit messages based on the [_Conventional Commits_ 1.0.0 Specification](https://www.conventionalcommits.org/en/v1.0.0/). This prompt achieves this by giving AI precise instructions on composing a commit message based on the current commit's [git diff](https://git-scm.com/docs/git-diff).\n\nThe detailed prompt instructions are in the [prompt document](./prompts/conventional-commit-with-gitmoji-ai-prompt.md) of this repository.\n\n## Prompt Features:\n\nAI-assisted git _Conventional Commits_ prompt features:\n\n- Follows [_Conventional Commits_ 1.0.0 Specification](https://www.conventionalcommits.org/en/v1.0.0/).\n- Supports [Gitmoji](https://github.com/carloscuesta/gitmoji).\n- Messages are written in English.\n- Outputs ONLY the commit message.\n- Messages need to use [one of the defined types](./prompts/conventional-commit-with-gitmoji-ai-prompt.md#more-information-about-types).\n- The output must be formatted according to the [Output Format](./prompts/conventional-commit-with-gitmoji-ai-prompt.md#output-format) section.\n\n## Choosing the best AI API to use with AI Commit\n\nI chose [Gemini](https://ai.google.dev) as the AI API provider for git commit messages for a few reasons:\n\n- It has [one of the largest context windows](https://artificialanalysis.ai/leaderboards/models) out of all of the currently available APIs out there (more on this below) and the biggest context window out of all the APIs supported by [AI Commit](https://marketplace.visualstudio.com/items?itemName=Sitoi.ai-commit).\n- The cost related to using Gemini API for this purpose is negligible. I currently spend less than 0.10 USD per month using it nearly every day, multiple times a day indiscriminately.\n- Gemini's latest AI models are quite competent in understanding and providing good commit messages based on [git diffs](https://git-scm.com/docs/git-diff).\n\n### The need for a large AI context window\n\nA large context window is essential for generating git commit messages since the [git diffs](https://git-scm.com/docs/git-diff) used by this extension combined with the provided instructions can easily exceed most other AI API's maximum context window, even with very common and relatively simple commits such as a dependency update.\n\nYou may choose to use any other supported APIs such as ChatGPT, Azure or DeepSeek APIs but you are likely to have issues with context window size.\n\n## Setup\n\n1. Generate a [Gemini API](https://ai.google.dev) key and add it to the `Ai-commit: GEMINI_API_KEY` setting. If you need help with this, there are quite a few online tutorials such as [How to Obtain a Gemini API Key](https://dev.to/explinks/how-to-obtain-a-gemini-api-key-step-by-step-guide-4m97).\n\n2. Install the [AI Commit](https://marketplace.visualstudio.com/items?itemName=Sitoi.ai-commit) VS Code extension.\n3. Open your VS Code settings (`cmd + ,` on a mac) and type `@ext:sitoi.ai-commit` on the search box.\n4. Edit AI Commit's extension settings:\n   1. On the `Ai-commit: AI_COMMIT_SYSTEM_PROMPT`, paste all the contents of the `ai-git-commit-message-prompt.md` file.\n   2. For the `Ai-commit: AI_PROVIDER` field select `gemini`.\n   3. For the `Ai-commit: GEMINI_MODEL` type `gemini-flash-lite-latest`, or whatever other Gemini model you may want to use.\n   4. Tweak `Ai-commit: GEMINI_TEMPERATURE` to taste. I'm currently using `0.1`.\n\n## Usage\n\nUse the extension to create your AI generate git commit messages:\n\n1. Make changes to a file in your git repository and **stage the changes**.\n2. Navigate to VS Code's **Source Control Tab**.\n3. From there, you can **press** the little **AI commit button** on top of the `Changes` sub-tab or search for `AI Commit` in VS Code's Command Palette (`command + p` on a Mac). Once you click the button or execute the command, the AI Commit **extension will populate** the tab's **commit message input field** with the AI-generated commit message you can then **review it**, tweak it and eventually **hit commit**.\n\nOptionally, and this is a very powerful feature, before calling the AI Commit extension in step 3, you can provide it with **extra context**, specific to your current commit.\n\nTo do this, simply **type the extra information into the commit message input field** (in VS Code's Source Control Tab) before pressing the commit button (or executing the `AI Commit` command).\n\nThis can tremendously improve the quality of the commit messages you get from Gemini. I especially recommend this feature if the first commit message you got was not to your satisfaction.\n\nEven a tiny bit of context is normally enough to steer Gemini in the right direction. AI Commit will then pass what you typed together with the instructions provided by you in the Setup step 4.1 to the Gemini API returning a better commit message.\n\n## Current Status\n\nAs of the 21st of April 2025, I have been using the [AI Commit](https://marketplace.visualstudio.com/items?itemName=Sitoi.ai-commit) VS Code extension for a few months. I'm currently using it with the [Gemini API's](https://ai.google.dev) `gemini-flash-lite-latest` for a good balance between context window size, speed, cost and ability to create good commit messages based on [git diffs](https://git-scm.com/docs/git-diff).\n\nIt has proven to be a very useful addition to my tool kit. It helps me speed up my rate of commits while maintaining precision, thoroughness and consistency. It is by no means perfect and it's a work in progress. I will continue to refine it as I go. I recommend always checking the output before committing as hallucinations are not uncommon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheorib%2Fgit-commit-message-ai-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheorib%2Fgit-commit-message-ai-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheorib%2Fgit-commit-message-ai-prompt/lists"}