# Draft Clear Git Commit Messages

Writing useful commit messages from staged changes takes time and context switching. This skill collects Git status, statistics, and diff context so Claude, Codex, or Claude Code can draft a reviewable message.

## Install

```bash
npx skillstore add abereyes/abejitsu-commit-drafter
```

## Metadata

- - Status: approved
- - Slug: abejitsu-commit-drafter
- - Version: 1.0.0
- - Author: abereyes
- - GitHub username: AbeJitsu
- - License: MIT
- - Repository: https://github.com/AbeJitsu/Learn-Claude-Code/tree/main/skills/commit-drafter
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: medium
- - Risk factors: external\_commands
- - Quality score: 73
- - Public page: https://skillstore.pages.dev/skills/abejitsu-commit-drafter
- - Manifest: https://skillstore.pages.dev/api/skills/abejitsu-commit-drafter/manifest

## Capabilities

- Checks whether the current directory is a Git repository.
- Detects staged added, modified, deleted, and renamed files.
- Reads staged diff statistics for changed files.
- Includes the full staged diff for AI analysis.
- Outputs structured instructions for drafting a commit message.

## Use Cases

- Summarize staged work before commit: Generate a clear first draft from the exact files and diff content already staged.
- Standardize commit message structure: Ask for consistent summaries with What, Why, and How sections for team review.
- Review change intent before handoff: Use the generated context to explain staged changes before passing work to another contributor.

## Prompt Templates

### Draft a basic commit message

```
Draft a commit message for my staged changes. Keep the summary concise and include the main reason for the change.
```

### Use a structured format

```
Create a commit message from my staged changes with a summary line and What, Why, and How sections.
```

### Focus on user impact

```
Draft a commit message that explains the user-visible impact of my staged changes and separates implementation details from behavior.
```

### Prepare a polished maintainer message

```
Analyze my staged diff and draft a polished commit message. Mention risky areas, avoid overstating intent, and flag anything I should review before committing.
```

## Limitations

- Only staged changes are analyzed.
- Requires the Git command line tool and a local Git repository.
- Does not stage files, create commits, or push changes.
- Diff content may include sensitive data or prompt-like text.

## Best Practices

- Review the staged diff before asking for a draft.
- Check the generated message for accuracy before committing.
- Remove secrets or unrelated changes from the staging area first.

## Anti Patterns

- Do not use generated commit text without reviewing it.
- Do not stage unrelated changes and expect a focused message.
- Do not rely on this skill to detect security issues in the diff.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T04:12:29.767\+00:00
- - Summary: Static external-command findings are confirmed as intentional Git usage with fixed argument lists, not shell injection. The weak-cryptography findings are false positives on prose and AI instruction text. A medium risk remains because full staged diff content is placed into the model context, where malicious diff text could influence the drafted message.

## Stats

- - Views: 169
- - Downloads: 5
- - Favorites: 0
- - Popularity score: 0
