create-commit
GitHub负责按 Penpot 规范生成 Git 提交,包括暂存文件、审查差异安全、遵循严格的提交信息格式(如80字符限制)及运行检查脚本。
Trigger Scenarios
Install
npx skills add penpot/penpot --skill create-commit -g -y
SKILL.md
Frontmatter
{
"name": "create-commit",
"slash": true,
"description": "Stage, review, and commit files following Penpot commit conventions."
}
Skill: create-commit
Produce a git commit that follows Penpot's commit message conventions. This skill owns the commit format, staging review, and safety checks — it does not implement features or push.
When to Use
- After code changes are complete and files need to be committed
- When delegated by a workflow step (e.g. implement-plan) to handle the commit
Required Reading
Before drafting any commit, read mem:workflow/creating-commits end-to-end. It
is the authoritative source for the commit message format, the emoji menu,
subject/body limits, and the AI-assisted-by trailer. Follow it exactly.
Iron Rules (non-negotiable)
- Wrap every body line at 80 characters or fewer. Count characters, do
not eyeball. Exceptions:
Signed-off-by:/AI-assisted-by:trailers and lines carrying a URL. This is the rule agents skip most often. - Subject ≤80 chars, imperative, capitalized, no trailing period.
Merge/Revert/Reapplycommits skip the length check. - Blank line between subject and body.
- Run
./scripts/check-commitand require exit code 0. It mechanically checks rules 1–3. A non-zero exit is a hard blocker: fix the message and re-commit. Never report the commit as done with a failing checker.
Workflow
- Stage the files specified by the calling context. Do not ask for confirmation.
- Run
git diff --stagedto review the content. If you see secrets (API keys, tokens, passwords, private keys,.envvalues), debug prints, or anything that does not match the stated intent, STOP and tell the user before committing. - Draft the message following the format in the memory doc, wrapping the body
at 80 characters per line, and run:
(orgit commit -m "<subject>" -m "<body>"git commit -F -if the body has unusual characters). - Verify the message with the checker:
If it fails, amend the message (./scripts/check-commitgit commit --amend) until it passes. Do not finish with a failing checker. - The
AI-assisted-bytrailer value is provided by the calling context — use it verbatim.
Constraints
- Do not push. Pushing is a separate workflow handled by the user.
- Do not run
git reset,git checkout,git restore,git clean, orrm. - Do not pass
--author. Author identity comes from the local git config. - Do not amend a commit you did not create in this session, unless explicitly asked.
- Do not bypass pre-commit hooks (
--no-verify) unless explicitly asked. - Never add a
Co-authored-by:trailer. It is forbidden and fails./scripts/check-commit. - Do not add untracked files that were not created in this session.
- Do not skip the
scripts/check-commitverification step (Iron Rule 4).
Version History
-
be2e117
Current 2026-10-20 06:50
将提交信息主体行换行限制从76字符放宽至80字符,主题行限制从70字符放宽至80字符,并更新相关检查器和文档。
- f9b8f1b 2026-09-28 20:56
- 267134e 2026-09-23 10:32


