@335g/pi-autocommit
Automatically commit code changes, eliminating the need for manual commit writing.
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: @335g/pi-autocommit. It is used for: Automatically commit code changes, eliminating the need for manual commit writing. Full Skill content: https://321skill.com/skills/335g-pi-autocommit/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the pain point for developers of frequently having to manually commit code and write commit messages during the coding process. In practical development, after each file modification by an AI coding assistant, developers often need to manually execute git add and git commit, which not only interrupts their workflow but also makes it easy to miss intermediate states. This Skill automatically creates lightweight checkpoint commits after each file change, and at the end of the agent loop, the LLM reorganizes these checkpoints into logical commits that comply with the Conventional Commits specification.
Usage is straightforward: simply install the extension via pi install @335g/pi-autocommit, after which it will automatically take effect without any additional configuration. Each time the AI coding agent executes a file modification tool (such as write, edit, or bash), if there are changes in the workspace, it will automatically run git add -A and create a checkpoint commit. When the entire agent loop concludes, it performs a soft reset on these checkpoints, leveraging the LLM to analyze change diffs and conversation context to generate multiple, logically clear Conventional Commits. You can also adjust settings like language (English/Japanese), enable status, and reorganization delay via the configuration file .pi/pi-autocommit.json.
It is particularly well-suited for users of AI coding assistants who require frequent code iteration, especially developers using pi-coding-agent. Whether for full-stack, backend, or frontend development, during extended coding sessions, this Skill ensures every intermediate state is safely preserved while maintaining a clean and readable final commit history. It is especially practical for projects requiring team collaboration and adherence to the Conventional Commits specification.
It is recommended to adopt this tool uniformly in team project development to ensure all commits comply with the standard. Note that it is primarily designed for the pi-coding-agent environment and may not be compatible with other AI coding assistants (like Cursor or Trae). Additionally, when the LLM is unavailable, it falls back to heuristic-based commit merging, though the commit quality may be lower than the LLM-assisted version. Automatic committing is enabled by default; if you wish to enable it only for specific sessions, you can control this via configuration.
Key Features
Unlike tools such as `git-auto-commit`, it employs a checkpoint-then-reorganize strategy: first, it creates lightweight checkpoints for each file change to ensure intermediate states are not lost; then, at the end of the agent loop, the LLM reorganizes these checkpoints into multiple logical commits that comply with Conventional Commits, rather than simply merging them into a single commit.
Limitations
Only supports the `pi-coding-agent` environment and cannot be used directly with other AI coding assistants (e.g., Cursor, Trae); relies on the LLM for reorganization—when the LLM is unavailable, it falls back to heuristic merging, which may result in lower commit quality.
FAQ
How do I disable the auto-commit feature?
Create a `.pi/pi-autocommit.json` file in the project root directory and set `"enable": false` to disable it.
How do I set the commit language to Chinese?
Chinese is not supported. Only English ('en') and Japanese ('ja') are supported. Set `"lang": "ja"` in the configuration file.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/335g-pi-autocommit/raw/index.md to read the original Skill definition (Markdown format) for @335g/pi-autocommit, and install it according to the instructions.
Raw Markdown URL for AI: /skills/335g-pi-autocommit/raw/index.md