Skip to content
Back to skills

Commit

ASecurity

Commit changes with an auto-generated message. Stages all uncommitted files and commits with a concise summary.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentsbashsqlgit

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add tyler-berggren/tb-claude-kit --skill commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tyler-berggren-commit/badge)](https://www.skillsdirectory.com/skills/tyler-berggren-commit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: commit
description: Commit changes with an auto-generated message. Stages all uncommitted files and commits with a concise summary.
argument-hint: "[only | sub <name>]"
---

# Commit Changes

Commits uncommitted files with an auto-generated commit message.

## Modifiers

- **`/commit`** — Default. Stages and commits **all** uncommitted files in the project.
- **`/commit only`** — Stages and commits only files modified during the **current session**.
- **`/commit sub <name>`** — Commits all changes, then pushes the named subtree to its deploy repo.

## Input

Optional argument: `$ARGUMENTS`

## Procedure

1. **Determine scope** based on modifier (default = all, "only" = session files, "sub" = all + subtree push)

2. **Run `git status`** to see what's uncommitted

3. **Regenerate SQLite sidecars** (if configured)

   Before staging, run the sidecar script if `sqlite_tracking` is configured in `.claude/kit.json`:

   ```bash
   bash ~/.claude-kit/scripts/sqlite-sidecar.sh
   ```

   The script is a no-op if no `sqlite_tracking` is configured in `.claude/kit.json`. See the
   script header for config format.

4. **Generate commit message** summarizing the changes

5. **Stage and commit**

   Read the optional author override first — it applies to all modes:
   ```bash
   AUTHOR=$(jq -r '.commit.author // empty' .claude/kit.json 2>/dev/null)
   ```

   Default (all uncommitted files):
   ```bash
   git add -A
   [ -n "$AUTHOR" ] && git commit --author="$AUTHOR" -m "<message>" || git commit -m "<message>"
   ```

   With "only" modifier (session files only):
   ```bash
   git add <file1> <file2> ...
   [ -n "$AUTHOR" ] && git commit --author="$AUTHOR" -m "<message>" || git commit -m "<message>"
   ```

6. **Subtree push** (only with `sub` modifier)

   After committing, push the named subtree to its deploy repo. Read the subtree config from
   `.claude/kit.json`:

   ```json
   {
     "subtrees": {
       "app": {
         "prefix": "app",
         "remote": "app",
         "branch": "main"
       }
     }
   }
   ```

   Resolve the subtree name from the argument:
   ```bash
   PREFIX=$(jq -r ".subtrees.\"$NAME\".prefix" .claude/kit.json)
   REMOTE=$(jq -r ".subtrees.\"$NAME\".remote" .claude/kit.json)
   BRANCH=$(jq -r ".subtrees.\"$NAME\".branch // \"main\"" .claude/kit.json)
   ```

   If the name is not found in `subtrees`, list available names and ask the user.

   Then push:
   ```bash
   git subtree push --prefix="$PREFIX" "$REMOTE" "$BRANCH"
   ```

   Report success and the remote URL.

## Author override

A project may pin the commit author in `.claude/kit.json`:

```json
{ "commit": { "author": "Jane Dev <jane@example.com>" } }
```

When the key is absent — or there is no `kit.json` at all — commits use the repo's git config as
normal. This is the common case; most projects should not set it.

> **`--author` sets the author only.** The *committer* still comes from git config, so an override
> produces a commit whose two identities differ. That is usually what's wanted. If both must
> match, set `GIT_AUTHOR_NAME`/`GIT_AUTHOR_EMAIL`/`GIT_COMMITTER_NAME`/`GIT_COMMITTER_EMAIL` in
> the environment instead — the flag cannot do it.

## Rules

- **No permission required** - Execute immediately without asking
- **Concise messages** - Summarize what changed, not every detail
- **Never be selective** - In default mode, commit everything without question. Do not skip log files, generated files, or any other files. `git add -A` means everything.
- **Never skip hooks** (`--no-verify`)

---

## Project overrides

If `.claude/kit.json` has a `rules."commit"` entry, read it and apply it as an additional
instruction for this skill. Absent file or key means no overrides — that is the normal case.

```bash
jq -r '.rules."commit" // empty' .claude/kit.json 2>/dev/null
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…