feat: Add Setup category to repo-maintenance command - #291
Conversation
- Add Setup category with setup-team-protection, setup-husky, pre-pr-checklist - Remove Security and Quality categories from repo-maintenance - Update step numbers and summary report format - Update README.md with new category description 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdded documentation for a new repository maintenance command to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 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: 4
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.claude/commands/README.md.claude/commands/repo-maintenance.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
.claude/commands/README.md
21-21: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
.claude/commands/repo-maintenance.md
38-38: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
46-46: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
240-240: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
370-370: 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 (5)
.claude/commands/repo-maintenance.md (4)
7-436: Well-structured maintenance workflow documentation.The documentation clearly outlines the 4-category workflow (Environment → Setup → Cleanup → Discovery) with comprehensive step-by-step execution flow, mode descriptions, and related commands. The Setup category correctly includes the three new commands from the PR objectives:
/setup-team-protection,/setup-husky, and/pre-pr-checklist. The document aligns well with the PR's goal of reorganizing the repo-maintenance command structure.
88-90: Add language identifier "bash" to code blocks.Lines 88-90 and 109-111 contain bash command examples that should be marked with the bash language identifier.
🔎 Proposed fixes
1. `.devcontainer/devcontainer.json` から現在のバージョンを取得 2. GitHub API から最新バージョンを取得 3. バージョンを比較 - ```bash + ```bash gh api repos/keito4/config/releases/latest --jq '.tag_name' - ``` 結果: - ✅ 最新バージョン使用中 - ⚠️ 更新可能: v{current} → v{latest} ### 2.3 DevContainer Update (full mode only) MODE が `full` かつ更新がある場合: `/config-base-sync-update` コマンドを実行するか確認してから実行。 **Note**: このステップは対話的確認を行う。自動実行の場合は `--yes` フラグで確認をスキップ。 ### 2.4 Claude Code Update Check npm/global.json の Claude Code バージョンを確認: - ```bash + ```bash npm view @anthropic-ai/claude-code version - ```Also applies to: 109-111
⛔ Skipped due to learnings
Learnt from: CR Repo: keito4/config PR: 0 File: CLAUDE.md:0-0 Timestamp: 2025-12-01T03:45:17.253Z Learning: Publish DevContainer images to ghcr.io/keito4/config-base with semantic versioning
313-325: Specify language for git commit message code block.Line 313-325 contains a bash here-doc for a git commit message that needs a language identifier.
🔎 Proposed fix
### 7.3 Commit Changes - ```bash + ```bash git add -A git commit -m "chore: repository maintenance $(date +%Y-%m-%d) ## Changes - [List of changes from each category]⛔ Skipped due to learnings
Learnt from: CR Repo: keito4/config PR: 0 File: CLAUDE.md:0-0 Timestamp: 2025-12-01T03:45:17.253Z Learning: Applies to {.codex/**,.devcontainer/codex*,package*.json,npm/global.json} : Use Conventional Commits format with release-triggering types (feat/fix/perf/revert/docs) for commits touching .codex/**, .devcontainer/codex*, package*.json, or npm/global.jsonLearnt from: CR Repo: keito4/config PR: 0 File: .cursor/rules/commit.cursorrules:0-0 Timestamp: 2025-06-25T06:37:26.200Z Learning: The body of the commit message should be wrapped at 72 characters and should prioritize describing what was done over why it was done.Learnt from: CR Repo: keito4/config PR: 0 File: .cursor/rules/commit.cursorrules:0-0 Timestamp: 2025-06-25T06:37:26.200Z Learning: Commit messages must follow the Conventional Commits format: <type>(<scope>): <subject>, where type can be feat, fix, docs, refactor, etc.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
212-215: Add "bash" language identifier to git command block.Line 212-215 shows git commands that should be marked as bash.
🔎 Proposed fix
Git リポジトリのクリーンアップ: - ```bash + ```bash git gc --auto git prune - ```Likely an incorrect or invalid review comment.
.claude/commands/README.md (1)
7-36: Maintenance section seamlessly integrated.The new Maintenance section is well-positioned and properly documents the repo-maintenance command with clear Purpose, Features, Usage examples, and Modes. It effectively introduces the new 4-category workflow to users without disrupting the existing README structure. The section aligns with the comprehensive documentation in repo-maintenance.md.
| ``` | ||
| /repo-maintenance # Full maintenance | ||
| /repo-maintenance --mode quick # Quick check (no updates) | ||
| /repo-maintenance --mode check-only # Read-only checks | ||
| /repo-maintenance --skip security # Skip specific category | ||
| /repo-maintenance --create-pr # Create PR for changes | ||
| ``` |
There was a problem hiding this comment.
Add "bash" language identifier to usage code block.
Line 21 begins a code block showing shell usage examples that should be marked as bash.
🔎 Proposed fix
**Usage**:
- ```
+ ```bash
/repo-maintenance # Full maintenance
/repo-maintenance --mode quick # Quick check (no updates)
/repo-maintenance --mode check-only # Read-only checks
/repo-maintenance --skip security # Skip specific category
/repo-maintenance --create-pr # Create PR for changes
- ```Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
21-21: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/commands/README.md around lines 21 to 27 the usage example code fence
is missing a language tag; update the opening triple-backtick fence to ```bash
so the block is syntax-highlighted as bash (leave the block content and closing
``` unchanged).
| ``` | ||
| MODE=full | ||
| SKIP_CATEGORIES=[] | ||
| CREATE_PR=false | ||
| ``` |
There was a problem hiding this comment.
Add language identifiers to fenced code blocks.
Per markdown linting standards, fenced code blocks should specify a language. These blocks appear to show example output/configuration (lines 38-42) and example output (lines 46-57).
🔎 Proposed fix for code block language specification
デフォルト設定:
- ```
+ ```bash
MODE=full
SKIP_CATEGORIES=[]
CREATE_PR=false
- ```
初期化メッセージを表示:
- ```
+ ```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Repository MaintenanceAlso applies to: 46-57
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
38-38: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/commands/repo-maintenance.md around lines 38-42 and 46-57, fenced
code blocks lack language identifiers; update the first config/example block to
use a language hint (e.g., ```bash) and update the output/example blocks to an
appropriate language tag (e.g., ```text or ```console) so markdown linters
recognize the language for syntax highlighting and linting.
| ``` | ||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
| 📋 Maintenance Summary Report | ||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| ## Environment (1/4) | ||
| ├── Container Health: ✅ Healthy (Score: 95/100) | ||
| ├── DevContainer: ⚠️ Update available (v1.13.1 → v1.15.0) | ||
| ├── Claude Code: ✅ Up to date | ||
| └── Claude Settings: ✅ Synced | ||
|
|
||
| ## Setup (2/4) | ||
| ├── Team Protection: ✅ Branch protection enabled | ||
| ├── Husky: ✅ Git hooks configured | ||
| └── Pre-PR Checklist: ✅ CI workflow exists | ||
|
|
||
| ## Cleanup (3/4) | ||
| ├── Branches: 🗑️ 8 merged branches can be deleted | ||
| └── Git GC: ✅ Repository optimized | ||
|
|
||
| ## Discovery (4/4) | ||
| └── New Features: 🆕 2 new commands available | ||
|
|
||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| ## Overall Health Score: 82/100 | ||
|
|
||
| ## Action Items (Priority Order) | ||
|
|
||
| ### 🔴 Immediate (Setup) | ||
| 1. Configure branch protection rules | ||
| Run: /setup-team-protection | ||
| 2. Setup Git hooks (Husky) | ||
| Run: /setup-husky | ||
|
|
||
| ### 🟡 Soon (Updates) | ||
| 3. Update DevContainer to v1.15.0 | ||
| Run: /config-base-sync-update | ||
|
|
||
| ### 🟢 Recommended (Maintenance) | ||
| 4. Delete 8 merged branches | ||
| Run: /branch-cleanup | ||
| 5. Review 2 new config features | ||
| Run: /config-contribution-discover | ||
|
|
||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
| ``` |
There was a problem hiding this comment.
Specify language for summary report code block.
Line 240 begins a fenced code block showing example output. Mark it with appropriate language identifier (or leave blank if it's meant as plain text output).
🔎 Proposed fix
全ステップの結果をまとめたレポートを生成:
- ```
+ ```text
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Maintenance Summary Report📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| 📋 Maintenance Summary Report | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| ## Environment (1/4) | |
| ├── Container Health: ✅ Healthy (Score: 95/100) | |
| ├── DevContainer: ⚠️ Update available (v1.13.1 → v1.15.0) | |
| ├── Claude Code: ✅ Up to date | |
| └── Claude Settings: ✅ Synced | |
| ## Setup (2/4) | |
| ├── Team Protection: ✅ Branch protection enabled | |
| ├── Husky: ✅ Git hooks configured | |
| └── Pre-PR Checklist: ✅ CI workflow exists | |
| ## Cleanup (3/4) | |
| ├── Branches: 🗑️ 8 merged branches can be deleted | |
| └── Git GC: ✅ Repository optimized | |
| ## Discovery (4/4) | |
| └── New Features: 🆕 2 new commands available | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| ## Overall Health Score: 82/100 | |
| ## Action Items (Priority Order) | |
| ### 🔴 Immediate (Setup) | |
| 1. Configure branch protection rules | |
| Run: /setup-team-protection | |
| 2. Setup Git hooks (Husky) | |
| Run: /setup-husky | |
| ### 🟡 Soon (Updates) | |
| 3. Update DevContainer to v1.15.0 | |
| Run: /config-base-sync-update | |
| ### 🟢 Recommended (Maintenance) | |
| 4. Delete 8 merged branches | |
| Run: /branch-cleanup | |
| 5. Review 2 new config features | |
| Run: /config-contribution-discover | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
240-240: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/commands/repo-maintenance.md around lines 240 to 286, the fenced code
block starting at line 240 lacks a language identifier; add an appropriate
language tag (e.g., text) after the opening triple backticks to ensure correct
rendering (or explicitly leave it as ```text if it's plain output), updating the
opening fence only and keeping the block content unchanged.
| ``` | ||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
| ✅ Repository Maintenance Complete | ||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| Mode: {MODE} | ||
| Duration: {elapsed_time} | ||
| Health Score: {score}/100 | ||
|
|
||
| Categories Processed: | ||
| ✅ Environment: {status} | ||
| ✅ Setup: {status} | ||
| ✅ Cleanup: {status} | ||
| ✅ Discovery: {status} | ||
|
|
||
| {if PR created} | ||
| PR Created: {PR_URL} | ||
| {endif} | ||
|
|
||
| Next Steps: | ||
| 1. Review the summary report above | ||
| 2. Address action items by priority | ||
| 3. {if PR created} Review and merge the PR {endif} | ||
|
|
||
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| Run this command regularly to maintain repository health: | ||
| /repo-maintenance --mode quick # Quick daily check | ||
| /repo-maintenance --mode full # Weekly full maintenance | ||
| ``` |
There was a problem hiding this comment.
Specify language for final report code block.
Line 370 begins a fenced code block showing example output that should have a language identifier.
🔎 Proposed fix
## Step 8: Final Report
- ```
+ ```text
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Repository Maintenance Complete📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| ✅ Repository Maintenance Complete | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| Mode: {MODE} | |
| Duration: {elapsed_time} | |
| Health Score: {score}/100 | |
| Categories Processed: | |
| ✅ Environment: {status} | |
| ✅ Setup: {status} | |
| ✅ Cleanup: {status} | |
| ✅ Discovery: {status} | |
| {if PR created} | |
| PR Created: {PR_URL} | |
| {endif} | |
| Next Steps: | |
| 1. Review the summary report above | |
| 2. Address action items by priority | |
| 3. {if PR created} Review and merge the PR {endif} | |
| ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
| Run this command regularly to maintain repository health: | |
| /repo-maintenance --mode quick # Quick daily check | |
| /repo-maintenance --mode full # Weekly full maintenance | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
370-370: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
.claude/commands/repo-maintenance.md around lines 370 to 399: the example output
is inside a fenced code block without a language identifier; add a language tag
(e.g., "text") immediately after the opening ``` to make the block a labeled
code fence for proper rendering and syntax highlighting, update the opening
fence to ```text and leave the rest of the block unchanged.
PR Review - feat: Add Setup category to repo-maintenance command概要このPRは コマンドに Setup カテゴリを追加し、CI/CD セットアップ系コマンドを統合するものです。全体的によく構成されたドキュメントで、リポジトリメンテナンスの自動化に有用な機能追加となっています。 ✅ 良い点1. 明確な構造とドキュメント
2. 既存コマンドとの統合
3. 実用的な機能
4. Conventional Commits 準拠
|
|
🎉 This PR is included in version 1.41.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
/repo-maintenanceコマンドに Setup カテゴリを追加Changes
新規追加: Setup カテゴリ
/setup-team-protection/setup-husky/pre-pr-checklist除外されたカテゴリ
Security(/dependency-health-check,/security-credential-scan)Quality(/code-complexity-check,/test-coverage-trend,/similarity-analysis)カテゴリ構成(変更後)
Test plan
/repo-maintenanceコマンドを実行して新しいカテゴリが表示されることを確認🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.