Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

commit

FreeNo executable scriptsNot checked

Commit uncommitted changes with clear commit messages. Use when the user asks to commit changes, save work, or create a commit.

Recidivizby Recidiviz★ 48 GitHub stars

About this skill

Skill: Commit Changes

Overview

This skill commits uncommitted changes with clear, descriptive commit messages.

Instructions

Step 1: Analyze Uncommitted Changes

Run these commands to understand what needs to be committed:

git status
git diff HEAD --stat
git diff HEAD

Read any modified files if needed to understand the context of changes.

Step 2: Determine Target Branch

If on main:

Prompt the user to create a new branch. Suggest a name based on the changes.

Check if GitChildBranchHelpers is installed:

ls .git/child_branch_helper/ 2>/dev/null

If the directory exists, use cmk (child make branch):

cmk <username>/<short-description>

Otherwise, use regular git:

git checkout -b <username>/<short-description>

Branch naming convention: <username>/<kebab-case-description>

If not on main:

Ask the user if they want to commit to the current branch or create a new one. If the user explicitly says "commit to the current branch", skip this prompt.

Step 3: Stage Changes

Stage all relevant changes:

git add <files>

CRITICAL: Do NOT stage files that contain secrets (.env, credentials.json, etc.)

Step 4: Generate Commit Message

Create a commit message following this format:

  • Title: [STATE_CODE] Brief description or [Component] Brief description
  • Keep title under 72 characters
  • Use imperative mood ("Add feature" not "Added feature")

Examples:

  • [US_IX] Add CRC-like bed eligibility criteria
  • [BigQuery] Fix view dependency ordering
  • [Workflows] Update client record supervision level

Step 5: Create the Commit

git commit -m "$(cat <<'EOF'
<commit message>

🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"

Step 6: Report What Was Done

After committing, tell the user:

✓ Created commit on branch: <branch-name>

Commit: <commit-hash-short>
<commit message title>

Files committed:
  - <file1>
  - <file2>

If you need to make changes:
  - Undo commit (keep changes): git reset --soft HEAD~1
  - Amend commit message: git commit --amend -m "New message"
  - Rename branch: git branch -m <new-name>

Step 7: Push to Remote (Optional)

Ask the user if they want to push. If yes:

Check if branch has upstream:

git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null

If the branch already has an upstream (command succeeds):

git push

If the branch is new (command fails):

git push -u origin <branch-name>

Important Notes

  • NEVER commit secrets or sensitive files
  • NEVER force push to main/master
  • ALWAYS use HEREDOC for multi-line commit messages to preserve formatting
  • NEVER include Personally Identifiable Information (PII) in commit messages. Avoid names or other identifying details about individuals. Internal Recidiviz person_id values (the opaque, randomly generated numeric IDs, e.g. 457987459409735) are NOT PII for this purpose and may be referenced.
Full SKILL.md on GitHub

Install commit in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the commit skill do?

Commit uncommitted changes with clear commit messages. Use when the user asks to commit changes, save work, or create a commit.

How do I install the commit skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the commit skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare commit with