Skip to content
Skills Library
Programming · Automation

commit-only

/commit-only

Commit staged changes with an AI-generated message. No cost metrics. Use when the user asks to commit without cost tracking.

Licence
MIT
Last repository change
11.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 11.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Commit staged changes with an AI-generated message. No cost metrics. Use when the user asks to commit without cost tracking.

Original author description

Commit staged changes with an AI-generated message. No cost metrics. Use when the user asks to commit without cost tracking.

How it works

  1. Rules
  2. Checklist
  3. 0. Pre-flight check
  4. 1. Detect or Generate Commit Message
  5. 2. Get User Approval
  6. 3. Create Commit
  7. 4. Display Summary
Original SKILL.md headings · 80 lines, 325 words
SKILL.md preview
---
name: commit-only
description: Commit staged changes with an AI-generated message. No cost metrics. Use when the user asks to commit without cost tracking.
effort: low
allowed-tools:
  - AskUserQuestion
  - Bash(git *)
  - Read
  - Grep

---

Create a git commit with Claude attribution.

Activate only when user invokes `/commit-only` or asks to commit (e.g. "commit", "commit my changes", "just commit", "commit without costs").

## Rules

- **DELEGATE_TO**: Read the referenced file with the Read tool, then execute its instructions exactly. Never improvise or guess commands.
- **Narration**: Only narrate steps marked STEP_DESCRIPTION. Execute all others silently — do NOT output or summarize intermediate values.

---

## Checklist

```
- [ ] 0. Pre-flight check
- [ ] 1. Detect or generate commit message
- [ ] 2. Get user approval
- [ ] 3. Create commit
- [ ] 4. Display summary
```

## 0. Pre-flight check

Halt if git commands already ran in this turn.

## 1. Detect or Generate Commit Message

Check conversation for an existing `Proposed commit message:` block (e.g. from `/preview-commit-message`).

**If found:** Extract COMMIT_SUBJECT and COMMIT_BODY from the ━━━-delimited block. Skip to Step 2.

**If not found:**

DELEGATE_TO: `${CLAUDE_PLUGIN_ROOT}/references/stage_and_analyze.md`

DELEGATE_TO: `${CLAUDE_PLUGIN_ROOT}/references/message_guidelines.md`

Store COMMIT_SUBJECT and COMMIT_BODY. Produce no output yet — the message is displayed in Step 2 via the AskUserQuestion `question` field.

## 2. Get User Approval

Obtain user approval via **AskUserQuestion** before proceeding. The commit message MUST be embedded in the question field (see reference) — this overrides the Narration silent rule.

DELEGATE_TO: `${CLAUDE_PLUGIN_ROOT}/references/message_approval.md`

- "use_full" or "use_subject_only" → Step 3
- "request_revisions" → return to Step 1

## 3. Create Commit

**STEP_DESCRIPTION**: "Creating git commit"

Verify APPROVAL_STATUS is "use_full" or "use_subject_only". If not, exit.

The final `-m` adds the Claude attribution trailer as its own paragraph so git parses it as a trailer.

**If COMMIT_BODY is non-empty:**
```bash
git commit -m "{{COMMIT_SUBJECT}}" -m "{{COMMIT_BODY}}" -m "Co-Authored-By: Claude Code <noreply@anthropic.com>"
```

**If COMMIT_BODY is empty:**
```bash
git commit -m "{{COMMIT_SUBJECT}}" -m "Co-Authored-By: Claude Code <noreply@anthropic.com>"
```

```bash
git rev-parse --short HEAD  # store as COMMIT_SHA
```

If git commit fails, display the error and exit.

## 4. Display Summary

```
✅ Committed: {COMMIT_SHA}
   {COMMIT_SUBJECT}
```
Files in this package (2)
  • README.md 1 KB
  • SKILL.md 3 KB

Versions

The database has no other skills named commit-only.

Database snapshot: 13.11.2026 · package version 09eb5eb329dd (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100commit-all
    Commit all current changes at once with a generated message. Use through /commit-all when the user gives no commit message of their own.
  • 100git-commit
    Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.
  • 100git-commit
    Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.
  • 100commit
    Create a git commit with an auto-generated conventional message from staged changes. Use for 'commit', 'save my work', or 'make a commit'. Does not push or open PRs; use `create-pr` for PR-only flow and `ship` for verify+push+merge.
  • 100commit
    Analyze staged changes and write a conventional commit message. Use when staged changes are ready to commit or a message needs wording.
  • 100commit-staged
    This skill should be used when user asks to "commit these changes", "write commit message", "stage and commit", "create a commit", "commit staged files", or explicitly invokes "commit-staged".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.