Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

verified-commit

verified

Commit with verification steps (lint, type-check, tests) before creating commits. Supports quick and full verification modes.

View on GitHub

Marketplace

dev-tools-plugin

sizukutamago/dev-tools-plugin

Plugin

dev-tools-plugin

productivity

Repository

sizukutamago/dev-tools-plugin

skills/verified-commit/SKILL.md

Last Verified

February 5, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/sizukutamago/dev-tools-plugin/blob/main/skills/verified-commit/SKILL.md -a claude-code --skill verified-commit

Installation paths:

Claude
.claude/skills/verified-commit/
Powered by add-skill CLI

Instructions

# verified-commit

検証付きコミットワークフロー。コミット前に適切な検証を行い、品質を担保する。

## コンセプト

**2段階の検証モード**:
- **quick**: 軽量検証(lint + 型チェック)- デフォルト
- **full**: 完全検証(lint + 型チェック + テスト)- 重要な変更時

## ワークフロー

### Step 1: 変更ファイルの確認

```bash
# 変更状態の確認(-uallは使わない)
git status

# 変更差分の確認
git diff
git diff --staged
```

### Step 2: ファイル種別の判定

| ファイル種別 | 検証内容 |
|-------------|---------|
| `*.ts`, `*.tsx` | TypeScript型チェック + ESLint |
| `*.js`, `*.jsx` | ESLint |
| `*.sh` | shellcheck + bash -n |
| `*.py` | ruff / flake8 |
| `*.md` | markdownlint(あれば) |

### Step 3: 検証実行

#### quick モード(デフォルト)

```bash
# TypeScript プロジェクト
npx tsc --noEmit 2>&1 | head -20

# Lint
npx eslint --cache . 2>&1 | head -20

# または Biome
npx biome check . 2>&1 | head -20
```

#### full モード

```bash
# quick の内容に加えて...

# テスト実行(変更ファイルに関連するテストのみ)
npm test -- --changedSince=HEAD~1

# または全テスト
npm test
```

### Step 4: コミットメッセージ作成

#### 基本フォーマット

```
<type>: <summary>

[optional body]
```

**type の種類**:
| type | 用途 |
|------|------|
| `feat` | 新機能 |
| `fix` | バグ修正 |
| `refactor` | リファクタリング |
| `docs` | ドキュメント |
| `test` | テスト追加/修正 |
| `chore` | 雑務(依存関係更新等) |

#### 大量ファイル(10+)の場合

カテゴリ別にグループ化:

```
feat: ユーザー認証機能を追加

## Components
- src/components/LoginForm.tsx
- src/components/AuthProvider.tsx

## API
- src/api/auth.ts
- src/api/session.ts

## Tests
- tests/auth.test.ts
```

### Step 5: コミット実行

```bash
# ステージング(具体的なファイルを指定)
git add src/components/LoginForm.tsx src/api/auth.ts

# コミット
git commit -m "$(cat <<'EOF'
feat: ユーザー認証機能を追加

- LoginFormコンポーネント追加
- 認証APIクライアント実装
EOF
)"
```

## 検証フローチャート

```
変更ファイル確認
      │
      ▼
 ファイル種別判定
      │
      ├─ TypeScript → tsc --noEmit + eslint
      ├─ JavaScript → eslint
      ├─ Shell → shellcheck + bash -n
      └─ Python → ruff/flake8
      │
      ▼
 検証モード選択
      │
      ├─ quick(デフォルト)
      │     └─ lint + 型チェックのみ
      │
      └─ full(--full オプション)
            └─ lint + 型チェック + テスト
      │
      ▼
 検証結果
      │
      ├─ PASS → コミット作成
      │
      └─ FAIL → 修正してから再検証
```

## 使用例

### 基本的な

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2654 chars