commit-code

Drafts commit messages and creates git commits for working tree changes.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/jakestrouse00/opencode-toolkit --skill commit-code-jakestrouse00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-code
Source: https://github.com/jakestrouse00/opencode-toolkit/tree/main/skills/commit-code
Command: npx skills add https://github.com/jakestrouse00/opencode-toolkit --skill commit-code-jakestrouse00

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing good commit messages and staging the right files is repetitive and error-prone, especially when a working tree mixes unrelated edits or contains nested standalone git repos. This Skill inspects the working tree, drafts a convention-matching commit message, stages the intended files, and creates the commit in one step. ## Core Features & Use Cases - Draft-and-commit in one step: Inspects git status, diffs, and recent history, then stages files and commits with a message matching the repo's existing style. - Two modes: Default mode commits only the most significant change per repo; --all mode groups every uncommitted change by relatedness and creates one commit per group. - Nested repo support: Detects subdirectories with their own .git and runs the full flow per repo using scoped git -C commands, never mixing files across repos. - Safety guards: Scans diffs for secrets and unintended artifacts before staging, and never pushes, amends, rebases, or rewrites history. - Use Case: After a coding session leaves edits across a host repo and a nested bot repo, ask to commit everything; the Skill produces separate, well-formed commits in each repo with messages following each repo's conventions. ## Quick Start Ask the AI to commit the current changes, for example by saying "commit code" or "commit code --all" to group and commit every uncommitted change separately.

Frequently Asked Questions about commit-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit changes with an AI-generated commit message?

Ask to "commit code" or "commit this" and the Skill inspects git status, diffs, and recent history, drafts a message matching the repo's conventions, stages the intended files, and creates the commit. It never pushes, so you push manually when ready.

How do I split mixed uncommitted changes into separate commits?

Pass the --all flag, for example "commit code --all". The Skill groups every uncommitted file by relatedness, shows you the grouping for approval, then stages and commits each group separately with its own message.

Can git commits span nested repositories with their own .git?

No, one commit never spans two repos because nested standalone repos have independent HEADs and histories. The Skill detects nested repos, runs the flow per repo using git -C scoped commands, and creates separate commits in each repo with pending changes.

Does the commit skill push or amend commits?

No, it never pushes, amends, rebases, force-pushes, or rewrites history in any repo. Commits are strictly local; it also refuses --no-verify, --allow-empty, and interactive flags unless you explicitly request them.

What happens if a diff contains secrets or API keys?

The Skill scans every diff for secrets before staging and stops if one is found, telling you the exact repo, file, and line. In --all mode it skips only the affected group and can continue with the rest after you confirm.