Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

commit-message

БесплатноБез исполняемых скриптовНе проверен

This skill should be used when the user asks to "create a commit", "generate commit message", "commit changes", "make a commit", mentions "conventional…

tektoncdот tektoncd★ 223 звезды на GitHub16 установок в других каталогах

Об этом скилле

Conventional Commit Message Creation

Create properly formatted conventional commit messages following project standards with Jira integration, line length validation, and required footers.

Purpose

Generate commit messages that:

  • Follow conventional commits format (type(scope): description)
  • Integrate Jira issue numbers automatically
  • Respect line length limits (50 for subject, 72 for body)
  • Include required footers (Signed-off-by, Assisted-by)
  • Pass gitlint validation

Quick Workflow

  1. Analyze changes: Run git status and git diff to understand modifications
  2. Detect Jira scope: Extract issue number from branch name or ask user
  3. Generate message: Create conventional commit message with proper formatting
  4. Add footers: Include Signed-off-by and Assisted-by trailers
  5. Confirm with user: Display message and wait for approval before committing

CRITICAL: Never commit without explicit user confirmation.

Conventional Commit Format

Structure

<type>(<scope>): <description>

[optional body]

Signed-off-by: <name> <email>
Assisted-by: <model-name> (via Claude Code)
```text

### Type Selection

Choose the appropriate commit type based on changes:

| Type | Description | Example |
| ------ | ------------- | --------- |
| `feat` | New features | `feat(webhook): add GitHub App support` |
| `fix` | Bug fixes | `fix(controller): resolve pipeline race condition` |
| `docs` | Documentation | `docs(README): update installation steps` |
| `refactor` | Code refactoring | `refactor(matcher): simplify regex logic` |
| `test` | Test changes | `test(webhook): add integration tests` |
| `chore` | Maintenance | `chore(deps): update go dependencies` |
| `build` | Build system | `build(Makefile): add vendor target` |
| `ci` | CI/CD changes | `ci(github): add golangci-lint action` |
| `perf` | Performance | `perf(cache): optimize lookup speed` |
| `style` | Code style | `style(format): run fumpt formatter` |
| `revert` | Revert commit | `revert: undo breaking API change` |

For complete type reference, see `references/commit-types.md`.

### Scope Rules

#### Priority 1: Extract from branch name

```bash
# Branch: SRVKP-123-add-webhook-support
# Scope: SRVKP-123
# Result: feat(SRVKP-123): add webhook support
```text

Detect Jira issue using regex pattern: `[A-Z]{2,}-[0-9]+`

#### Priority 2: Ask user for Jira issue

If branch is `main`, `master`, or doesn't contain Jira pattern:

1. Ask user for Jira issue number
2. Look up issue on issues.redhat.com if provided
3. Use component name as fallback (webhook, controller, etc.)

#### Priority 3: Component fallback

Use affected component as scope:

- `feat(webhook): ...`
- `fix(controller): ...`
- `docs(README): ...`

## Line Length Requirements

### Subject Line

- **Target**: 50 characters maximum
- **Hard limit**: 72 characters (gitlint enforced)
- **Format**: `type(scope): description` counts toward limit
- **Tips**: Use present tense, no period at end

```text
# Good (45 chars)
feat(SRVKP-123): add webhook controller

# Too long (78 chars) - will fail gitlint
feat(SRVKP-123): add comprehensive webhook controller with GitHub integration
```text

### Body

- **Wrap at 72 characters per line**
- **Blank line** required between subject and body
- **Content**: Explain why, not what (code shows what)
- **Format**: Wrap manually or use heredoc in git commit

```text
feat(SRVKP-123): add webhook controller

Configure webhook controller to handle GitHub events. This enables
real-time pipeline triggering when push events occur, replacing the
previous polling mechanism.

Signed-off-by: Developer Name <[email protected]>
Assisted-by: Claude-3.5-Sonnet (via Claude Code)
```text

## Required Footers

### Signed-off-by

**Always include**: `Signed-off-by: <name> <email>`

**Detection priority order**:

1. Environment variables: `$GIT_AUTHOR_NAME` and `$GIT_AUTHOR_EMAIL`
2. Git config: `git config user.name` and `git config user.email`
3. If neither configured, ask user to provide details

**Common in dev containers**: Environment variables are preferred method

```bash
# Check environment variables first
echo "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>"

# Fallback to git config
git config user.name
git config user.email
```text

For complete detection logic, see `references/footer-detection.md`.

### Assisted-by

**Always include**: `Assisted-by: <model-name> (via Claude Code)`

**Format examples**:

```text
Assisted-by: Claude-3.5-Sonnet (via Claude Code)
Assisted-by: Claude Opus 4.5 (via Claude Code)
Assisted-by: Claude Sonnet 4.5 (via Claude Code)
```text

Use the actual model name (Claude Sonnet 4.5, Claude Opus 4.5, etc.).

## User Confirmation Requirement

**CRITICAL RULE**: Always ask for user confirmation before executing `git commit`.

### Confirmation Workflow

1. **Generate** the commit message following all rules above
2. **Display** the complete message to the user with separator
3. **Ask**: "Should I commit with this message
Полный SKILL.md на GitHub

Установить commit-message в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/commit-types.mdreferences/footer-detection.mdreferences/gitlint-rules.mdreferences/jira-lookup.md

FAQ

Что делает скилл commit-message?

This skill should be used when the user asks to "create a commit", "generate commit message", "commit changes", "make a commit", mentions "conventional commits", references "Jira issue in commit", or discusses commit message formatting. Provides guided workflow for creating properly formatted commit messages with Jira integration, line length validation, and required footers.

Как установить скилл commit-message?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл commit-message запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить commit-message с