スキル一覧に戻る
AmnadTaowsoam

commit-conventions

by AmnadTaowsoam

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: Commit Conventions description: Standardized commit message formats and conventions for clear, searchable, and automated-friendly version control history.

Commit Conventions

Overview

Commit conventions establish a standard format for commit messages, enabling automated changelog generation, semantic versioning, and clear project history.

Core Principle: "Commits are documentation. Make them readable, searchable, and meaningful."


1. Conventional Commits Standard

Format: <type>(<scope>): <subject>

feat(auth): add OAuth2 login support
fix(api): resolve race condition in user creation
docs(readme): update installation instructions

Commit Types

TypeDescriptionExample
featNew featurefeat(payments): add Stripe integration
fixBug fixfix(cart): prevent negative quantities
docsDocumentation onlydocs(api): add endpoint examples
styleCode style (formatting, no logic change)style: fix indentation
refactorCode restructuringrefactor(db): extract query builder
perfPerformance improvementperf(search): add index to user table
testAdd/update teststest(auth): add login flow tests
choreBuild/tooling changeschore: update dependencies
ciCI/CD changesci: add deployment workflow

2. Commit Message Structure

<type>(<scope>): <subject>

<body>

<footer>

Example

feat(user-profile): add avatar upload functionality

Users can now upload profile pictures up to 5MB.
Images are automatically resized and optimized.

Closes #123
BREAKING CHANGE: User API now requires multipart/form-data for profile updates

3. Commitlint Configuration

// commitlint.config.js
module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [
      2,
      'always',
      ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'chore', 'ci']
    ],
    'subject-case': [2, 'never', ['upper-case']],
    'subject-max-length': [2, 'always', 72],
    'body-max-line-length': [2, 'always', 100]
  }
};

4. Husky Integration

// package.json
{
  "scripts": {
    "prepare": "husky install"
  },
  "devDependencies": {
    "@commitlint/cli": "^17.0.0",
    "@commitlint/config-conventional": "^17.0.0",
    "husky": "^8.0.0"
  }
}
# .husky/commit-msg
#!/bin/sh
npx --no -- commitlint --edit $1

5. Semantic Versioning Integration

Commits drive version bumps:

  • feat: → Minor version (1.0.0 → 1.1.0)
  • fix: → Patch version (1.0.0 → 1.0.1)
  • BREAKING CHANGE: → Major version (1.0.0 → 2.0.0)

6. Automated Changelog Generation

# Using standard-version
npx standard-version

# Generates CHANGELOG.md
## [1.2.0] - 2024-01-15
### Features
- **auth**: add OAuth2 login support (#123)
- **payments**: integrate Stripe (#124)

### Bug Fixes
- **cart**: prevent negative quantities (#125)

7. Commit Message Best Practices

Good Commits

✅ feat(api): add user search endpoint
✅ fix(auth): resolve token expiration bug
✅ docs: update API documentation

Bad Commits

❌ update stuff
❌ fix bug
❌ WIP
❌ asdfasdf

8. Commit Conventions Checklist

  • Format Enforced: Commitlint configured and running?
  • Types Defined: Team agrees on commit types?
  • Scope Guidelines: Scopes documented?
  • Automated Checks: Pre-commit hook validates messages?
  • Changelog: Automated changelog generation set up?
  • Documentation: Convention documented for team?

  • 45-developer-experience/release-workflow
  • 45-developer-experience/lint-format-typecheck

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です