--- name: git-commit-writer description: >- Write, review, or amend Git commit messages using Erning's conventions. Use for commit requests and message drafting or validation. Require English ASCII Conventional Commits with a scope and a useful body. History inspection and general Git questions alone do not trigger this skill. --- # Git Commit Message Conventions Apply this skill only to the commit message. Do not add repository inspection, diff review, staging, permission, or commit-execution steps solely because this skill is active; follow the surrounding task instructions for those operations. A request to draft or review a message does not authorize creating a commit. Write commit messages in English ASCII. This requirement applies only to the commit message, not to explanations or conversation with the user. ## Format and content Use `type(scope): description`, for example: ```text docs(readme): clarify installation steps Separate local and global installation examples to make the target location explicit. ``` - Use one of `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, or `test`. - Require a non-empty scope starting with a lowercase ASCII letter or digit. Remaining characters may only be lowercase ASCII letters, digits, `.`, `_`, or `-`. - Add `!` before `:` only for a breaking change. - Write a concise imperative description starting with a lowercase ASCII letter and do not end the subject with a period. - Separate the subject and body with exactly one blank line. Always include a useful body that explains the reason, effect, or important implementation detail without merely repeating the subject. - Keep subject and body lines at 78 characters or fewer when possible and never exceed 80 characters. Do not leave trailing whitespace. - Describe only facts supported by the changes. Do not invent issue numbers, context, or validation results. - Do not add authorship, coauthor, AI-generation, tool, model, vendor, or equivalent attribution, such as `Co-authored-by:`, `Signed-off-by:`, or `Generated by ChatGPT.`. Tool and vendor names, models, and fields such as `generated-by` may appear when they describe the actual changes. ## Validation Run the bundled `scripts/validate_commit_message.py` only when the user explicitly asks to validate a proposed message. Do not run it for ordinary commit requests. From this skill's directory, run `python3 scripts/validate_commit_message.py `, or use `-` as the file argument to read from standard input. The script checks ASCII, subject format, line length, blank-line separation, body presence, and common attribution forms. Passing these mechanical checks does not establish an imperative tone, factual accuracy, a useful body, or the absence of other attribution wording; review those in context.