Skip to main content
skill CX Codex

commit · tartinerlabs — Claude Code skill: what it does, how to install

This skill stages related changes and creates git commits that follow the repository’s own message style. It also scans staged content for secrets.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tartinerlabs/skills --skill commit -a claude-code
Open on GitHub

What commit does

The skill starts with git status, reviews the full change set, and infers the repository’s commit style from its tooling, history, and ecosystem. It can follow Conventional Commits, an area prefix, a tracker ID, or a plain format. Only paths related to the requested change are staged before the commit is created.

A security check runs on staged content before every commit. gitleaks is the default scanner, while an existing trufflehog setup is accepted. A detected secret stops the workflow. The skill does not edit .husky, commitlint, or other project tooling. Git and a secret scanner are required; when no scanner is available, it asks before creating an unchecked commit.

What it helps with

  • review the worktree before committing
  • match commit messages to repository history
  • stage only paths tied to one change
  • scan staged content for exposed secrets
  • create a commit without editing project tooling

Example prompts for the agent

  • Review the changes and create a commit using this repository’s established convention.
  • Stage only the files for the current task, run gitleaks, and commit them.
  • Infer the message format from the history, use any issue reference from our conversation, and make the commit.

How to install commit

1Skills CLI (Vercel)

npx skills add tartinerlabs/skills --skill commit -a claude-code

2Manually: put the files in place

~/.claude/skills/commit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/commit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about commit

How do I install commit in Claude Code?

Run npx skills add tartinerlabs/skills --skill commit -a claude-code, then check ~/.claude/skills/commit/SKILL.md.

What does the commit skill do?

It reviews changes, detects the repository’s commit convention, stages related paths, scans the staged diff for secrets, and creates the commit.

What happens when the secret scanner finds a leak?

The workflow stops and reports the finding. Remove the secret, and rotate it if it was pushed, before trying again.

Source text

SKILL.md · MIT
---
name: commit
description: Use when committing changes, staging files, saving work, or making a git commit. Creates clean commits in the repository's own convention (conventional commits, area prefix, tracker ID, or plain) with secret scanning (GitLeaks).
license: MIT
allowed-tools: Read Bash(git:*) Bash(gitleaks:*) Bash(trufflehog:*)
model: sonnet
effort: high
compatibility: Requires git and a secret scanner (GitLeaks default; TruffleHog accepted); detects the repository's commit convention from tooling, history, and ecosystem
metadata:
  short-description: Clean commits in your repo's own convention.
---

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` |

## Pre-Commit Security Check

Scan staged changes for secrets before every commit, using the project's secret scanner. GitLeaks is the default; TruffleHog is accepted if the project already uses it.

1. Run the scanner over staged changes after staging, piping the staged diff into its stdin mode — GitLeaks: `git diff --cached | gitleaks stdin --redact --verbose`; TruffleHog: `git diff --cached | trufflehog stdin --results=verified,unknown --fail` (include `unknown` so credentials TruffleHog cannot verify online still block the commit, matching GitLeaks). Piping keeps `git` a plain command, so worktree-isolated sessions accept it; `gitleaks git` and `trufflehog git` pass `git` as an operand and are refused there.
2. 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).
3. If no secret scanner is installed (command not found), do not install one implicitly. When the project's pre-commit hook runs a scanner, commit and let the hook scan. Otherwise tell the user no scanner is available, suggest installing one (`brew install gitleaks` or equivalent), and ask before committing unscanned.

Never edit `.husky/`, `commitlint`, or other project 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.

1. Show current `git status` and analyse all changes
2. Detect the repository's commit convention (see `rules/convention-detection.md`)
3. Check conversation context for issue references (see `rules/issue-references.md`)
4. Assess scope of changes (see `rules/change-scope.md`)
5. Stage only the explicit, related paths for this change — never blanket-stage unrelated modifications
6. Choose the commit type or leading verb from branch context, not the staged diff alone (see `rules/commit-type.md`)
7. Run the Pre-Commit Security Check above
8. 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.

© tartinerlabs · MIT · tartinerlabs/skills

Similar skills

All skills for Git and GitHub →

commit by other authors comes first.

commit getsentry A skill that drafts Sentry-style conventional commits with issue references and blocks direct commits to main. CX Codex +1 4,700installs commit NeoLabHQ Automates Git commits using conventional commit messages and matching emojis. It checks the active branch, runs pre-commit linters, and suggests splitting complex diffs into atomic commits. CX Codex +1 1,200installs commit parcadei This skill turns session changes into git commits, shows you the plan first, and keeps Claude's name out of the messages. Handy when an agent has piled up edits. CX Codex +1 499installs commit PaulRBerg Composes the commit message from prepared evidence and hands the commit, index reconciliation and push to ai-commit. CX Codex +1 342installs commit LegendApp Turns the changes from your current task into one or more tidy commits and keeps unrelated work out. Handy when the working tree has piled up several unrelated edits. CX Codex +1 404installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. 990,453installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. 774,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. 499,069installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. 489,289installs scaffold-exercises Matt Pocock This skill builds course exercise directories with sections, problems, solutions, and explainers. Use it when starting a new course section or creating exercise stubs. 480,196installs

From the same set9

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor