Communitygithub.com

lguidolin/conventional-commits-and-releases(Conventional Commit…

コミットメッセージの作成、PR のタイトル・説明文の記述、自動バージョン管理・チェンジログ設定の際に使用します。キーワード — conventional commits, release-please, semver, feat/fix/chore, breaking change, changelog。

conventional-commits-and-releases(Conventional Commit… とは?

このスキルは、コミットメッセージを機械可読なインターフェースとして扱い、自動バージョン管理とチェンジログ生成を正確に行うためのものです。従来の散文的なコミットメッセージでは、型の誤りが原因で公開バージョンやリリースが壊れるリスクがあります。`<type>(<scope>): <description>` という定型フォーマットに従い、`feat`・`fix`・`docs` などの型を適切に選択することで、セマンティックバージョニングに基づいた正しいバージョンアップ(minor/patch/major)を実現します。また、スカッシュマージを採用している場合、PR タイトルそのものが最終的なコミットとなるため、CI でのバリデーション(amannn アクション)が必須です。AI による attribution(`Co-authored-by` や `Generated with [Claude…]` フッター)を禁止する「No AI Attribution」ジョブも備えており、人間による Attribution ラインには影響しません。このスキールは、Claude Code や Cursor など、Conventional Commits を認識・解釈できるツールで活用でき、特にリリース自動化パイプライン(release-please など)と連携するチームに有効です。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lguidolin/agent-skills/tree/main/skills/conventional-commits-and-releases

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Conventional Commits とリリース管理

概要

コミットメッセージは 機械可読なインターフェース であり、単なる散文ではありません。自動バージョン管理とチェンジログ生成はこれを解析します。不正な形式のメッセージは、誤った公開バージョンや壊れたリリースを引き起こします。小さな規律(適切に整形された1つのメッセージ)が、大きな正確性(正確なチェンジログ、正しいバージョンアップ)を無償で生み出します。

形式

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

型効果 / 用途
feat新機能 — minor バンプ
fixバグ修正 — patch バンプ
docsドキュメントのみ
choreメンテナンス、依存関係、設定
refactor動作を変えないコード変更
testテストのみ
ci / buildパイプライン / ビルドシステムの変更
  • 命令形: 「add X」であって、「added X」や「adds X」ではない。
  • 破壊的変更: feat!: またはフッターに BREAKING CHANGE: — major バンプをトリガー。
  • Scope(スコープ) は任意だが推奨: feat(auth):、fix(db):。

重要な詳細

  • 型とバージョンの関係:feat と fix を間違えると、誤ったバージョンがリリースされる。 型は意図的に選ぶ。「add」=新機能、「update」=既存機能の強化、「fix」=バグ。
  • スカッシュマージ:PR タイトルが、実際に出荷されるコミットになる。 それ自体が有効な Conventional Commit でなければ、リリースが間違ってしまう。
  • 人間が作成した文章。 AI・アシスタントの帰属表示、Co-authored-by トレーラー、生成元フッターは禁止。コミットは人間が書いたように読めるべき。

よくある言い訳

言い訳現実
「メッセージは本当は重要じゃない」チェンジログとバージョン番号を決定する。機械的に重要です。
「この機能には chore で十分だろう」chore ではバージョンが上がらない。ユーザーはリリースでその機能を受け取れない。正しい型を使うこと。
「後で PR タイトルを直すよ」スカッシュマージでは、マージ時にタイトルが確定する。マージ前に修正すること。
「Co-authored-by トレーラーは問題ない」プロジェクトルールで AI の帰属表示を禁止している。例外はない。

レッドフラグ — 即 STOP

  • 型プレフィックスのないコミットメッセージ
  • ユーザー向けの動作を追加・修正する変更に chore / docs を使う
  • 有効な Conventional Commit になっていないスカッシュマージの PR タイトル
  • AI の帰属表示や Co-authored-by 行

強制ルール:

  • PR タイトル — CI で検証、ブロッキング(amannn/action-semantic-pull-request を使用)。 スカッシュマージではタイトルが出荷されるコミットになるため、これが最も重要なゲート。
  • AI 帰属表示 — Claude/Anthropic を指定する Co-authored-by トレーラーや Generated with [Claude…] フッターを、ブランチコミットと PR 本文(本文はスカッシュコミットの本文になる)の両方で拒否する「No AI Attribution」ジョブ(ブロッキング)。 人間による Co-authored-by トレーラーには影響しない。
  • ブランチコミットの本文 — あえて lint 非対象。スカッシュマージでは破棄されるため、チェンジログに到達することはない。マージコミットに移行する場合は、commitlint を追加すること。

既知のギャップ: コミットがエージェントアカウントによって 作成 された場合、GitHub はスカッシュ時に Co-authored-by トレーラーを自動生成する — これは PR チェックが実行された後である。上記のゲートではこれを検出できない。エージェントの ID でコミットしてはならない。

完全な根拠: 「エンジニアリング憲法」第 III 条(engineering-constitution/references/engineering-constitution.md に同梱)。

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

lguidolin/change-hygiene-and-code-craft

Use when writing or refactoring code, structuring a commit or PR, or deciding whether to abstract duplication. Symptoms — mixing reorg with logic changes, a PR doing several things at once, a file growing large, the second copy of similar code, or unsure whether to DRY something up.

lguidolin/cloud-delivery-aks

Use when deploying to Kubernetes or Azure Kubernetes Service (AKS), configuring cloud secrets, setting up progressive rollout/canary, per-PR ephemeral environments, or k8s health probes. Keywords — Kubernetes, AKS, Key Vault, Argo Rollouts, Flagger, canary, blue-green, liveness, readiness, PodDisruptionBudget, HPA, rollback, GHCR.

lguidolin/commit-history-rewrite

Use when an existing repository has messy commit history that needs to conform to conventional commits before adopting release-please, or when intermediate WIP/fixup/merge commits need to be cleaned up.

lguidolin/defense-in-depth-security

Use when handling untrusted input, secrets, authentication/authorization, or dependencies — or threat-modeling a new surface. Keywords — STRIDE, threat model, least privilege, secrets management, supply chain, dependency scanning, input validation, audit log, defense in depth.

lguidolin/designing-before-building

Use when starting a feature, fixing a non-trivial bug, or about to write implementation code — before any code exists. Symptoms you need this: "this is simple, I'll just code it", reaching for the editor before a design is approved, or an idea that hasn't been turned into a spec and plan.

lguidolin/engineering-constitution

Use when starting work in a project that follows the engineering constitution, orienting to its rules, or deciding which engineering practice applies to a task — spec writing, commits, testing, security, deploys, database, or UI work.

lguidolin/graphql-contract-testing

Use when writing a GraphQL query/mutation that the UI and a test will share, or building route/schema contract or smoke tests. Symptoms — copying a query into a test, a test asserting on query text, schema change that didn't break the UI build, or RLS/permission drift. Keywords — graphql-codegen, typed document, contract test, route smoke test.

lguidolin/init-repo-CI

Use when setting up a new repository with conventional commits, release-please, and CI automation, or when retrofitting an existing repository that lacks automated versioning and PR validation workflows.

lguidolin/interface-craft-and-accessibility

Use when building or styling UI — components, layouts, forms, design tokens — or making accessibility decisions. Keywords — a11y, WCAG, keyboard navigation, focus state, contrast, design system, minimalist UI, component reuse, ARIA, semantic HTML.

lguidolin/merge-gates-and-automation

Use when setting up or changing CI, pre-push hooks, or a task runner, or deciding what must pass before merge. Symptoms — tempted to put authoritative checks only in a local hook, skip CI, bypass with --no-verify, or unsure what gates a merge vs. runs locally.

lguidolin/observability-and-slos

Use when adding logging, metrics, tracing, health checks, SLOs, or alerting — or when building a service surface that needs to be operable and debuggable. Keywords — structured logs, OpenTelemetry, correlation id, RED metrics, liveness, readiness, SLI, SLO, error budget, alerting.

lguidolin/performance-and-scale

Use when working on hot paths, list endpoints, pagination, data-access in loops, or public interfaces/schemas. Symptoms — unbounded queries, N+1 access, no latency budget, optimizing without measuring, or changing an interface many consumers depend on. Keywords — pagination, N+1, Hyrum's Law, performance budget, bundle size.

lguidolin/postgres-postgraphile-rls-and-sql

Use when writing PostgreSQL, PostGraphile config, Row-Level Security policies, SQL schema files, or working on the Browser→App→PostGraphile→Postgres data path. Keywords — RLS, SECURITY DEFINER, search_path, pgSettings, grants, roles, GraphQL depth limit, query cost, statement_timeout, SQL file organization.

lguidolin/recording-decisions

Use when a design or architecture decision has been made and needs to be captured — writing a decision record or ADR, updating a decision index, noting a deferred idea, or superseding a past decision. Keywords — ADR, decision record, rationale, rejected alternatives, dependency index.

lguidolin/resilience-and-deploy-safety

Use when planning a deploy, designing a rollback, or responding to an incident or writing a postmortem. Keywords — deploy safety, rollback, immutable artifact, progressive delivery, canary, blast radius, incident response, blameless postmortem, error budget.

lguidolin/ship-it

Use when the user wants to ship work — push, PR, archive decision records, merge, and clean up. Handles the full lifecycle from committing final changes through post-merge cleanup including converting specs/plans to compact decision records.

lguidolin/tests-as-a-control

Use when writing or modifying tests, when a test breaks during a refactor, or when testing permission/role rules. Symptoms — tempted to edit a test to make it pass, testing only the happy path, a deny-test that started passing, flaky tests, or unsure what to assert.

lguidolin/zero-downtime-migrations

Use when changing a database schema where data must survive the change — adding/removing/renaming columns, constraints, indexes, or backfilling. Symptoms — a destructive migration bundled with a code deploy, a NOT NULL column with a backfill, a table-locking UPDATE, or a rename. Keywords — expand/contract, parallel change, backfill, NOT VALID, CREATE INDEX CONCURRENTLY, graphile-migrate.

関連スキル