Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 48 additions & 15 deletions .claude/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This directory contains pre-configured commands that provide automated workflows
| **Config Sync** | `/sync-settings` | Claude/Codex 設定の同期 |
| | `/config-contribution-discover` | 新機能の発見と取り込み |
| **Updates** | `/update-claude-code` | Claude Code の更新 |
| | `/update-actions` | GitHub Actions バージョンの更新 |
| **Documentation** | `/changelog-generator` | Conventional Commits から CHANGELOG を生成 |

## Available Commands
Expand Down Expand Up @@ -303,21 +304,6 @@ This directory contains pre-configured commands that provide automated workflows
/config-base-sync-update --version 1.60.0
```

#### `update-claude-code.md`

**Purpose**: Update Claude Code to the latest version
**Features**:

- npm/global.json の Claude Code バージョン更新
- 最新バージョンの自動検出
- 更新 PR の作成

**Usage**:

```
/update-claude-code
```

#### `setup-new-repo.md`

**Purpose**: Setup new repository with DevContainer, CI/CD, and development tools from config template
Expand Down Expand Up @@ -483,6 +469,51 @@ This directory contains pre-configured commands that provide automated workflows
/security-review path/to/file.ts
```

### Updates

#### `update-claude-code.md`

**Purpose**: Update Claude Code to the latest version
**Features**:

- npm/global.json の Claude Code バージョン更新
- Dockerfile のバージョン更新
- 最新バージョンの自動検出

**Usage**:

```
/update-claude-code
```

#### `update-actions.md`

**Purpose**: Update GitHub Actions to the latest versions
**Features**:

- `.github/workflows/` 配下の全ワークフローファイルをスキャン
- SemVer タグのアクションを最新バージョンに更新
- メジャータグ固定・SHA ピンニング・ブランチ固定はスキップ

**Usage**:

```
/update-actions
npm run update:actions
```
Comment on lines +483 to +503

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add language specifiers to fenced code blocks (markdownlint MD040).

The code blocks at lines 485 and 500 are missing language identifiers, which is flagged by markdownlint. Other code blocks in this file consistently use bash — these should match.

♻️ Proposed fix
 **Usage**:

-```
+```bash
 /update-claude-code

```diff
-```
+```bash
 /update-actions
 npm run update:actions
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.20.0)</summary>

[warning] 485-485: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

[warning] 500-500: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @.claude/commands/README.md around lines 483 - 503, The two fenced code
blocks showing the commands "/update-claude-code" and the block containing
"/update-actions\nnpm run update:actions" are missing language specifiers;
update those three backticks to use "bash" (i.e., change tobash) so they
match other examples and satisfy markdownlint MD040, making sure to update both
the single-line "/update-claude-code" block and the two-line "/update-actions"
block.


</details>

<!-- fingerprinting:phantom:medusa:phoenix -->

<!-- This is an auto-generated comment by CodeRabbit -->


#### 一括更新 (`npm run update:all`)

全依存関係を一括更新するオーケストレーター:

```bash
npm run update:all # 全更新
npm run update:all -- --skip-libs # Claude + Actions のみ
npm run update:all -- --skip-claude # libs + Actions のみ
npm run update:all -- --skip-actions # libs + Claude のみ
npm run update:all -- --skip-libs --skip-claude # Actions のみ
```

## Scripts Used by Commands

以下のスクリプトがコマンドから呼び出されます。詳細は [script/README.md](../../script/README.md) を参照してください。
Expand All @@ -500,6 +531,8 @@ This directory contains pre-configured commands that provide automated workflows
| `setup-team-protection.sh` | `/setup-team-protection` | GitHub 保護ルールの設定 |
| `test-coverage-trend.sh` | `/test-coverage-trend` | テストカバレッジのトレンド追跡 |
| `update-claude-code.sh` | `/update-claude-code` | Claude Code の更新 |
| `update-actions.sh` | `/update-actions` | GitHub Actions バージョンの更新 |
| `update-all.sh` | npm scripts | 全依存関係の一括更新 |

### DevContainer・インフラ用スクリプト(コマンド経由では使用しない)

Expand Down
60 changes: 42 additions & 18 deletions .claude/commands/repo-maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,35 @@ npm view @anthropic-ai/claude-code version

MODE が `full` の場合は `/update-claude-code` コマンドを実行。

### 2.5 Claude Settings Sync Check (full mode only)
### 2.5 GitHub Actions Version Check

GitHub Actions のバージョンを確認・更新:

```bash
npm run update:actions
```

または一括更新(npm + Claude Code + Actions):

```bash
npm run update:all
npm run update:all -- --skip-libs --skip-claude # Actions のみ
```

結果:

- ✅ 全アクション最新
- ⚠️ 更新可能なアクションあり

MODE が `full` の場合は `/update-actions` コマンドを実行。

### 2.6 Claude Settings Sync Check (full mode only)

このリポジトリが config リポジトリの場合のみ実行:

`/sync-claude-settings` の実行を確認。

### 2.6 Claude Code LSP Setup Check
### 2.7 Claude Code LSP Setup Check

Claude Code の LSP(Language Server Protocol)サポートの設定状況を確認:

Expand Down Expand Up @@ -210,7 +232,7 @@ ENABLE_LSP_TOOL=1 npx @anthropic-ai/claude-code@stable
- [Claude Code LSP 設定ガイド](https://blog.lai.so/claude-code-lsp/)
- [公式プラグイン](https://github.com/anthropics/claude-plugins-official)

### 2.7 Codespaces Secrets Sync Check
### 2.8 Codespaces Secrets Sync Check

GitHub Codespaces を使用する場合のシークレット紐付け状況を確認:

Expand Down Expand Up @@ -392,6 +414,7 @@ config リポジトリから取り込み可能な新機能を発見:
├── Container Health: ✅ Healthy (Score: 95/100)
├── DevContainer: ⚠️ Update available (v1.13.1 → v1.15.0)
├── Claude Code: ✅ Up to date
├── GitHub Actions: ✅ All actions up to date
├── Claude Settings: ✅ Synced
├── Claude Code LSP: ⚠️ Not configured (TypeScript detected)
└── Codespaces Secrets: ✅ Synced (or ⏭️ Skipped)
Expand Down Expand Up @@ -573,18 +596,19 @@ Run this command regularly to maintain repository health:

このコマンドは以下のコマンドを内部的に呼び出します:

| カテゴリ | コマンド | 説明 |
| ----------- | ------------------------------- | --------------------------- |
| Environment | `/container-health` | コンテナ健全性 |
| Environment | `/config-base-sync-check` | DevContainer バージョン |
| Environment | `/config-base-sync-update` | DevContainer 更新 |
| Environment | `/update-claude-code` | Claude Code 更新 |
| Environment | `/sync-claude-settings` | Claude 設定同期 |
| Environment | (Claude Code LSP setup) | LSP 設定 |
| Environment | `/codespaces-secrets` | Codespaces シークレット同期 |
| Setup | `/setup-team-protection` | GitHub保護ルール設定 |
| Setup | `/setup-husky` | Git hooks設定 |
| Setup | `/pre-pr-checklist` | PR前チェックリスト |
| Setup | `/setup-ci` | CI/CDワークフロー設定 |
| Cleanup | `/branch-cleanup` | ブランチクリーンアップ |
| Discovery | `/config-contribution-discover` | 新機能発見 |
| カテゴリ | コマンド | 説明 |
| ----------- | ------------------------------- | ----------------------------- |
| Environment | `/container-health` | コンテナ健全性 |
| Environment | `/config-base-sync-check` | DevContainer バージョン |
| Environment | `/config-base-sync-update` | DevContainer 更新 |
| Environment | `/update-claude-code` | Claude Code 更新 |
| Environment | `/update-actions` | GitHub Actions バージョン更新 |
| Environment | `/sync-claude-settings` | Claude 設定同期 |
| Environment | (Claude Code LSP setup) | LSP 設定 |
| Environment | `/codespaces-secrets` | Codespaces シークレット同期 |
| Setup | `/setup-team-protection` | GitHub保護ルール設定 |
| Setup | `/setup-husky` | Git hooks設定 |
| Setup | `/pre-pr-checklist` | PR前チェックリスト |
| Setup | `/setup-ci` | CI/CDワークフロー設定 |
| Cleanup | `/branch-cleanup` | ブランチクリーンアップ |
| Discovery | `/config-contribution-discover` | 新機能発見 |
54 changes: 54 additions & 0 deletions .claude/commands/update-actions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Update GitHub Actions

GitHub Actions のバージョンを最新に自動更新します。

## 実行内容

1. `.github/workflows/` 配下の全ワークフローファイル(テンプレート含む)をスキャン
2. `uses:` 行から action/ref ペアを抽出
3. SemVer タグのアクションのみ更新対象(メジャータグ固定・SHA ピンニング・ブランチ固定はスキップ)
4. `gh api` で最新リリースタグを取得
5. `sed` で一括置換
6. 変更サマリを表示

## 使用方法

```bash
/update-actions
```

または npm script として:

```bash
npm run update:actions
```

## 更新対象の判定

| パターン | 例 | 対応 |
| ------------------ | -------------------------- | -------- |
| SemVer タグ | `@v6.0.2`, `@0.34.0` | 更新対象 |
| メジャータグ固定 | `@v1`, `@v3` | スキップ |
| ブランチ固定 | `@master`, `@main` | スキップ |
| SHA ピンニング | `@e58ee9d1...` (40文字hex) | スキップ |
| ローカルアクション | `./` | スキップ |
| Docker アクション | `docker://` | スキップ |

## 必須コマンド

- `gh` (GitHub CLI) — リリース/タグ情報の取得に使用

## 一括更新

全依存関係(npm + Claude Code + Actions)を一括更新する場合:

```bash
npm run update:all
npm run update:all -- --skip-libs # Actions + Claude のみ
npm run update:all -- --skip-claude # Actions + libs のみ
npm run update:all -- --skip-actions # libs + Claude のみ
```

## 参考リンク

- [GitHub Actions バージョニング](https://docs.github.com/en/actions/creating-actions/about-custom-actions#using-tags-for-release-management)
6 changes: 3 additions & 3 deletions .github/workflows/templates/monorepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6.1.0
uses: actions/setup-node@v6.2.0
with:
node-version: '20'
cache: 'npm'
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6.1.0
uses: actions/setup-node@v6.2.0
with:
node-version: '20'
cache: 'npm'
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6.1.0
uses: actions/setup-node@v6.2.0
with:
node-version: '20'
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/templates/unified-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: actions/checkout@v6.0.2

- name: Setup Node.js
uses: actions/setup-node@v6.1.0
uses: actions/setup-node@v6.2.0
with:
node-version: '20'
cache: 'npm' # or 'pnpm' if using pnpm
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
uses: actions/checkout@v6.0.2

- name: Setup Node.js
uses: actions/setup-node@v6.1.0
uses: actions/setup-node@v6.2.0
with:
node-version: '20'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templates/update-db-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v6.0.2

- name: Setup Node.js
uses: actions/setup-node@v6.1.0
uses: actions/setup-node@v6.2.0
with:
node-version: '22'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templates/zap-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
fi

- name: ZAP Baseline Scan
uses: zaproxy/action-baseline@v0.14.0
uses: zaproxy/action-baseline@v0.15.0
with:
target: ${{ steps.target.outputs.url }}
rules_file_name: '.zap/rules.tsv'
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"test:coverage": "jest --runInBand --coverage",
"update:libs": "bash script/update-libraries.sh",
"update:claude": "bash script/update-claude-code.sh",
"update:actions": "bash script/update-actions.sh",
"update:all": "bash script/update-all.sh",
"prepare": "husky"
},
"devDependencies": {
Expand Down
Loading
Loading