feat: Add setup-ci command for comprehensive CI/CD setup - #292
Conversation
- Add /setup-ci command with project type auto-detection - Support Next.js, Node.js, Terraform, and Monorepo projects - Provide three CI levels: minimal, standard, comprehensive - Include gap analysis comparing current vs recommended configuration - Add workflow templates for quality gates, testing, security, and E2E 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR adds documentation for a new CI/CD setup workflow generator command to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.claude/commands/setup-ci.md (2)
33-33: Add language identifiers to all fenced code blocks for markdown compliance.Multiple code blocks lack language specifiers, which triggers markdown linting violations (MD040). While this doesn't impact functionality, adding language specifiers improves readability and tooling compatibility.
Examples of blocks needing language identifiers:
- Line 51:
```→```bash- Line 91:
```→```bashor```text- Line 131:
```→```yaml- Line 189:
```→```yaml- Line 208:
```→```yaml- Line 229:
```→```yaml- Line 248:
```→```yaml- Line 267:
```→```yaml- Line 287:
```→```yaml- Line 294:
```→```json- Line 386:
```→```yaml- Line 395:
```→```yamlAlso applies to: 51-51, 72-72, 91-91, 131-131, 161-161, 189-189, 208-208, 229-229, 248-248, 267-267, 287-287, 294-294, 386-386, 395-395
1-9: Consider consistent language usage throughout the documentation.The file mixes Japanese and English throughout, which may confuse users who read only one language. For example, line 9 opens with Japanese description, but the rest of Step 1–7 headers are in English.
Options:
- Provide parallel sections in Japanese and English with clear separation, or
- Keep the documentation primarily in English (or Japanese), with key section headers in both languages for clarity
Since this appears to be a command documentation file in an English-heavy repository (based on other .claude files), consider defaulting to English with Japanese comments only where necessary for context.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.claude/commands/README.md.claude/commands/setup-ci.md
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Applies to .github/workflows/ci.yml : Validate code quality in CI pipeline (.github/workflows/ci.yml) with linting, formatting, testing, and building
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Applies to .github/workflows/claude.yml : Trigger automatic AI assistance on claude mentions in issues, PRs, and comments using .github/workflows/claude.yml
📚 Learning: 2025-12-01T03:45:17.253Z
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Applies to .github/workflows/claude.yml : Trigger automatic AI assistance on claude mentions in issues, PRs, and comments using .github/workflows/claude.yml
Applied to files:
.claude/commands/setup-ci.md
📚 Learning: 2025-12-01T03:45:17.253Z
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Applies to .github/workflows/ci.yml : Validate code quality in CI pipeline (.github/workflows/ci.yml) with linting, formatting, testing, and building
Applied to files:
.claude/commands/setup-ci.md.claude/commands/README.md
📚 Learning: 2025-12-01T03:45:17.253Z
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Apply automated linting, formatting, security analysis, and license checking as static quality gates
Applied to files:
.claude/commands/README.md
📚 Learning: 2025-12-09T08:39:14.049Z
Learnt from: CR
Repo: keito4/config PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T08:39:14.049Z
Learning: Follow development quality standards defined in `CLAUDE.md` when using Claude Code for development assistance
Applied to files:
.claude/commands/README.md
🪛 markdownlint-cli2 (0.18.1)
.claude/commands/setup-ci.md
33-33: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
51-51: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
72-72: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
91-91: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
112-112: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
131-131: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
161-161: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
189-189: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
208-208: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
229-229: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
248-248: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
267-267: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
287-287: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
294-294: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
386-386: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
395-395: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: check-ci-status
🔇 Additional comments (2)
.claude/commands/README.md (1)
161-166: Excellent integration of setup-ci documentation.The companion entry in the README clearly documents the new command's purpose, features, usage examples, and feature levels. The structure is consistent with other commands in the file and accurately reflects the comprehensive setup-ci.md documentation.
.claude/commands/setup-ci.md (1)
283-311: No action needed on the Claude Code Review workflow configuration.The GitHub Action
anthropics/claude-code-actionis an official, published GitHub Action from Anthropic (MIT-licensed), and the model identifierclaude-sonnet-4-20250514is correct and current as of January 2026. The workflow configuration in the example is valid and ready for implementation.
| ### 検出ルール | ||
|
|
||
| | 条件 | タイプ | | ||
| | ----------------------------------------- | ---------- | | ||
| | `next.config.*` が存在 | nextjs | | ||
| | `pnpm-workspace.yaml` または `lerna.json` | monorepo | | ||
| | `*.tf` ファイルが存在 | terraform | | ||
| | `package.json` のみ存在 | nodejs | | ||
| | 上記以外 | 不明(確認 | |
There was a problem hiding this comment.
Fix incomplete text in project detection rules table.
Line 53 contains truncated Japanese text: 不明(確認 appears to be incomplete. This breaks the table formatting and clarity.
🔎 Proposed fix
| 上記以外 | 不明(確認 |
+| 上記以外 | 不明(要確認) |The closing parenthesis and character appear to be cut off. Assuming the intent is "Unknown (requires confirmation)" or similar, please complete the Japanese text appropriately.
Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
51-51: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/commands/setup-ci.md around lines 45 to 53, the project detection
rules table has a truncated Japanese entry "不明(確認" that breaks formatting;
replace that cell content with a complete phrase such as "不明(要確認)" (or "不明(確認要)"
if preferred) and ensure the table row ends with the closing pipe so the
Markdown table renders correctly.
PR Review: Setup CI Command概要
✅ 良い点
|
|
🎉 This PR is included in version 1.41.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
CIセットアップを支援する
/setup-ciコマンドを追加しました。Features
プロジェクトタイプ自動検出
next.config.*の存在で検出package.jsonのみ存在*.tfファイルの存在で検出pnpm-workspace.yamlまたはlerna.jsonで検出CIレベル
ギャップ分析
現在のCI設定と推奨設定を比較し、不足しているコンポーネントを可視化
分析対象リポジトリ
以下のリポジトリのCI設定を分析し、ベストプラクティスを抽出:
Usage
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.