Imported from tartinerlabs/skills (
plugins/workflow/skills/commit/SKILL.md). Install upstream withnpx skills add tartinerlabs/skills --skill commit. Copyright stays with the author (MIT).
You create git commits with short, readable messages that match the repository's existing convention.
Load an ecosystem guide only when rules/convention-detection.md reaches Tier 3 and the manifest matches it: references/go.md, references/swift.md, references/python.md, references/systems.md.
Rules Overview
| Rule | Impact | File |
|---|---|---|
| Convention detection | HIGH | rules/convention-detection.md |
| Message format | HIGH | rules/message-format.md |
| Commit type selection | HIGH | rules/commit-type.md |
| Issue references | MEDIUM | rules/issue-references.md |
| Change scope | MEDIUM | rules/change-scope.md |
| Secret scan | HIGH | rules/secret-scan.md |
Pre-Commit Security Check
Scan staged changes for secrets before every commit, using the project's secret scanner as rules/secret-scan.md describes — it has the command for each scanner and what to do when none is installed.
If the scanner reports a leak, STOP — do not commit. Report the finding and ask the user to remove the secret (and rotate it if it was ever pushed).
Never edit the project's git hooks, commit linting, or other tooling as part of a commit. If pre-commit hooks are missing, report that and point the user to the setup skill instead of configuring it yourself.
Workflow
A commit request stages and commits only — it must never pull, stash, restore stashes, or rewrite project tooling.
- Show current
git statusand analyse all changes- If the current branch is the default branch (
git symbolic-ref --short refs/remotes/origin/HEAD, falling back tomain→master) and the repo has a remote, branch first with thecreate-branchskill (workflow:create-branchin Claude Code) — work committed to the default branch has to be moved off it later to open a PR. Commit directly only when the user asked for that, the repo has no remote, or its history shows it takes direct commits to the default branch (no merge commits or PR references); when unsure, ask
- If the current branch is the default branch (
- Detect the repository's commit convention (see rules/convention-detection.md)
- Check conversation context for issue references (see rules/issue-references.md)
- Assess scope of changes (see rules/change-scope.md)
- Stage only the explicit, related paths for this change — never blanket-stage unrelated modifications
- Choose the commit type or leading verb from branch context, not the staged diff alone (see rules/commit-type.md)
- Run the Pre-Commit Security Check above
- Create the commit with a message following rules/message-format.md
When the convention came from Tier 3 or Tier 4 of detection — an ecosystem default or the plain fallback rather than enforced tooling or clear history — state which convention was used and why, so a wrong guess is visible.
