本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)48k · #5712

semantic-versioning

できること

このツールは、ソフトウェアのバージョン管理を整理して行えるように助けます。セマンティック・バージョニングと呼ばれる標準的な方式に従って、バージョン番号を自動で更新し、変更内容の記録を作成します。

使う場面

  • ✓新機能をリリースするとき。
  • ✓バグを修正したとき。
  • ✓以前の機能に影響するおそれのある変更を加えたとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/semantic-versioning/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/semantic-versioning/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“最新の変更をもとに、プロジェクトの次のバージョンを生成してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、コードに残されたコメント(「コミット」と呼ばれます)を分析して、変更の種類を判断します。その結果に応じて、メジャー、マイナー、パッチのどのバージョン番号を上げるかを決め、変更履歴のファイルを更新します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Semantic Versioning

Automate version management and changelog generation following SemVer principles.

Prerequisites

  • Git repository with commit history
  • Node.js (for most tools)
  • Conventional commits (recommended)

Semantic Versioning Basics

Version Format

MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]

Examples:
1.0.0
2.1.3
1.0.0-alpha.1
1.0.0-beta.2+build.123

Version Components

Component When to Increment
MAJOR Breaking changes (incompatible API changes)
MINOR New features (backward compatible)
PATCH Bug fixes (backward compatible)
PRERELEASE Pre-release versions (alpha, beta, rc)
BUILD Build metadata (ignored in precedence)

Version Precedence

1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta
< 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11
< 1.0.0-rc.1 < 1.0.0 < 2.0.0

Conventional Commits to Version

Commit Type → Version Bump:
  feat:     → MINOR
  fix:      → PATCH
  docs:     → PATCH (or no release)
  style:    → PATCH (or no release)
  refactor: → PATCH
  perf:     → PATCH
  test:     → No release
  chore:    → No release
  
  BREAKING CHANGE: → MAJOR
  feat!:   → MAJOR
  fix!:    → MAJOR

semantic-release

Installation

npm install --save-dev semantic-release \
  @semantic-release/changelog \
  @semantic-release/git

Configuration

// .releaserc.json
{
  "branches": ["main"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/changelog", {
      "changelogFile": "CHANGELOG.md"
    }],
    ["@semantic-release/npm", {
      "npmPublish": true
    }],
    ["@semantic-release/git", {
      "assets": ["CHANGELOG.md", "package.json", "package-lock.json"],
      "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
    }],
    "@semantic-release/github"
  ]
}

Advanced Configuration

// release.config.js
module.exports = {
  branches: [
    'main',
    { name: 'beta', prerelease: true },
    { name: 'alpha', prerelease: true }
  ],
  plugins: [
    ['@semantic-release/commit-analyzer', {
      preset: 'angular',
      releaseRules: [
        { type: 'docs', release: 'patch' },
        { type: 'refactor', release: 'patch' },
        { type: 'style', release: 'patch' },
        { type: 'perf', release: 'patch' },
        { breaking: true, release: 'major' }
      ]
    }],
    ['@semantic-release/release-notes-generator', {
      preset: 'angular',
      writerOpts: {
        commitsSort: ['subject', 'scope']
      }
    }],
    '@semantic-release/changelog',
    '@semantic-release/npm',
    '@semantic-release/git',
    '@semantic-release/github'
  ]
};

GitHub Actions Integration

# .github/workflows/release.yml
name: Release

on:
  push:
    branches: [main]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          persist-credentials: false

      - uses: actions/setup-node@v4
        with:
          node-version: '20'

      - run: npm ci

      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release

standard-version

Installation

npm install --save-dev standard-version

Configuration

// .versionrc.json
{
  "types": [
    { "type": "feat", "section": "Features" },
    { "type": "fix", "section": "Bug Fixes" },
    { "type": "docs", "section": "Documentation" },
    { "type": "style", "section": "Styling" },
    { "type": "refactor", "section": "Code Refactoring" },
    { "type": "perf", "section": "Performance" },
    { "type": "test", "section": "Tests" },
    { "type": "chore", "section": "Maintenance" }
  ],
  "skip": {
    "bump": false,
    "changelog": false,
    "commit": false,
    "tag": false
  },
  "commitUrlFormat": "https://github.com/owner/repo/commit/{{hash}}",
  "compareUrlFormat": "https://github.com/owner/repo/compare/{{previousTag}}...{{currentTag}}"
}

Usage

# First release
npx standard-version --first-release

# Regular release (auto-detect version bump)
npx standard-version

# Specific version bump
npx standard-version --release-as minor
npx standard-version --release-as 1.1.0

# Pre-release
npx standard-version --prerelease alpha

…
よくある質問

「セマンティック・バージョニング」とは何ですか?

ソフトウェアのバージョン番号を付けるための標準的な方式です。番号はMAJOR.MINOR.PATCHの3つの部分からなります。MAJORは互換性を損なう変更、MINORは新機能の追加、PATCHはバグ修正に使われます。

「コンベンショナルコミット」を使う必要がありますか?

使うことをおすすめします。「feat:」(新機能)や「fix:」(修正)などの決まった形式でコミットメッセージを書くと、ツールが変更内容をより正確に理解し、適切なバージョンを生成しやすくなります。

このスキルではどのツールを使いますか?

「semantic-release」や「standard-version」などのツールを使うことがあります。変更履歴を生成するための他のツールと組み合わせて使われる場合もあります。

詳細

作者による元の説明

Automate versioning and changelog generation using semantic versioning principles.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5712
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル