commit
Commit
Create one commit that matches the actual staged work.
Goals
- Produce a commit that reflects the code changes and session context.
- Follow the repo's commit conventions when they exist.
- Include both summary and rationale in the commit body.
Inputs
- Codex session history for intent and rationale.
git status,git diff, andgit diff --stagedfor the actual changes.- Repo-specific commit conventions if documented.
Steps
- Read session history to identify scope, intent, and rationale.
- Inspect the working tree and staged changes with
git status,git diff, andgit diff --staged. - Stage only the intended files. Prefer explicit paths or
git add -p. Do not sweep unrelated changes into the commit. - Sanity-check newly added files. If anything looks random or likely ignored (build artifacts, logs, temp files), stop and fix the index before committing.
- If staging is incomplete or includes unrelated files, fix the index or ask for confirmation.
- Choose a conventional type and optional scope that match the change, such
as
feat(scope): ...,fix(scope): ..., orrefactor(scope): .... - Write a subject line in imperative mood, 72 characters or fewer, with no trailing period.
- Write a body that includes:
- Summary of key changes.
- Rationale and trade-offs.
- Validation run, or an explicit note that validation was not run.
- Wrap body lines at 72 characters.
- Create the commit message with a here-doc or temp file and use
git commit -F <file>so newlines are literal. - Commit only when the message matches the staged changes. If the diff and message disagree, fix the index or revise the message first.
Output
- A single commit whose message reflects the staged work and session context.
Template
Type and scope are examples only. Adjust them to fit the repo and change.
<type>(<scope>): <short summary>
Summary:
- <what changed>
- <what changed>
Rationale:
- <why>
- <why>
Validation:
- <test or check>
More from khoi/skills
manipulate-xcodeproj
Manipulate Xcode projects and asset catalogs using XcodeProjectCLI (xcp) only. Use when editing .xcodeproj/.pbxproj files, adding/moving/renaming/deleting groups or files, changing target membership, reading or setting build settings, or managing xcassets assets.
33execplan
When writing complex features or significant refactors or user ask explicitly, use an ExecPlan from design to implementation.
7peekabo
Use when working with the Peekaboo CLI or MCP server to capture macOS screens, inspect UI elements, and automate GUI interactions (see/click/type/scroll/hotkey/window/menu/dock/space), or when troubleshooting Peekaboo permissions, snapshots, or focus issues.
6create-cli-tool
Craft or refactor a CLI interface and behavior using the CLI Guidelines. Use when defining a new CLI spec or reshaping an existing command surface arguments, flags, subcommands, help text, outputs, errors, exit codes, prompts, config/env precedence, and safe/dry-run behavior.
6