Skip to content

feat: Sync Claude settings from 21 repositories - #312

Merged
keito4 merged 1 commit into
mainfrom
feat/sync-claude-settings-20260104
Jan 4, 2026
Merged

feat: Sync Claude settings from 21 repositories#312
keito4 merged 1 commit into
mainfrom
feat/sync-claude-settings-20260104

Conversation

@keito4

@keito4 keito4 commented Jan 4, 2026

Copy link
Copy Markdown
Owner

概要

Elu-co-jp 配下の全プロジェクトと keito4 リポジトリから .claude/settings.local.json を収集し、共通設定を抽出して DevContainer 設定に反映しました。

収集元

  • Elu-co-jp リポジトリ: 19件
  • keito4 リポジトリ: 2件
  • 共通設定抽出: 55件

変更内容

WebFetch ドメイン (3件追加)

  • vercel.com - Vercel ドキュメント
  • blog.lai.so - 技術ブログ
  • azukiazusa.dev - 技術ブログ

MCP ツール (1件追加)

  • o3-search - o3 検索機能

npm run スクリプト (5件追加)

  • npm run clean:* - クリーンアップ
  • npm run types:* - 型生成関連
  • npm run test:ci:* - CI用のテスト
  • npm run lint:strict:* - 厳格なlint
  • npm audit fix:* - 脆弱性自動修正

TypeScript/Node.js ツール (3件追加)

  • tsx:* - TypeScriptエグゼキューター
  • nodemon:* - 開発サーバー
  • tsc:* - TypeScriptコンパイラ

GitHub CLI (1件追加)

  • gh issue close:* - GitHub issue クローズ

Bash コマンド (42件追加)

  • 制御構文: for:*, do:*, while:*, done, if:*, then, else, fi
  • テキスト処理: head:*, tee:*, xargs -I {} git diff:*
  • 開発ツール: bats:*, actionlint:*, cargo install:*
  • Claude CLI: claude marketplace update:*, claude plugin install:*, claude plugin uninstall:*
  • 1Password CLI: op:*
  • o3 MCP: npx o3-search-mcp:*

クリーンアップ

環境依存の直接ファイルパス指定を削除し、より汎用的な設定に改善:

  • macOS固有パス (Homebrew)
  • DevContainer固有パス (mise)
  • ユーザー固有パス (~/.codex, /Users/keito4)

影響範囲

  • DevContainer イメージをビルドする全プロジェクト
  • 次回の DevContainer イメージビルド時から有効化

テスト

  • ✅ All pre-commit checks passed
  • ✅ Format check passed
  • ✅ ESLint passed
  • ✅ All tests passed (101 tests)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated development environment configuration to expand tooling and capability permissions for enhanced development workflow support.

Note: This release contains no user-facing changes. Updates are limited to internal development environment configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

Elu-co-jp 配下の全プロジェクトと keito4 リポジトリから settings.local.json を収集し、
共通設定を抽出して DevContainer 設定に反映しました。

## 収集元
- Elu-co-jp リポジトリ: 19件
- keito4 リポジトリ: 2件
- 共通設定: 55件

## 主な変更

### WebFetch ドメイン (3件追加)
- vercel.com - Vercel ドキュメント
- blog.lai.so - 技術ブログ
- azukiazusa.dev - 技術ブログ

### MCP ツール (1件追加)
- o3-search - o3 検索機能

### npm run スクリプト (5件追加)
- npm run clean:* - クリーンアップ
- npm run types:* - 型生成関連
- npm run test:ci:* - CI用のテスト
- npm run lint:strict:* - 厳格なlint
- npm audit fix:* - 脆弱性自動修正

### TypeScript/Node.js ツール (3件追加)
- tsx:* - TypeScriptエグゼキューター
- nodemon:* - 開発サーバー
- tsc:* - TypeScriptコンパイラ

### GitHub CLI (1件追加)
- gh issue close:* - GitHub issue クローズ

### Bash コマンド (42件追加)
- 制御構文: for, do, while, if/then/else/fi
- テキスト処理: head, tee, xargs連携
- 開発ツール: bats, actionlint, cargo
- Claude CLI: marketplace, plugin管理
- 1Password CLI: op
- その他のユーティリティ

## 影響範囲
- DevContainer イメージをビルドする全プロジェクト
- 次回の DevContainer イメージビルド時から有効化

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jan 4, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR expands the allow-list permissions in .devcontainer/claude-settings.json by adding 30+ new entries, including WebFetch domain (vercel.com), shell capabilities (head, for, while, if/then/else constructs), development tools (tsx, nodemon, tsc), npm commands, GitHub CLI operations, and miscellaneous utilities. The configuration structure remains unchanged.

Changes

Cohort / File(s) Summary
DevContainer Claude Settings Configuration
.devcontainer/claude-settings.json
Added 30+ permission entries to permissions.allow: WebFetch domain (vercel.com), Bash shell capabilities (head, for, do, while, done, if, then, else, fi), development tools (tsx, nodemon, tsc), npm scripts (clean, types, test:ci, lint:strict, audit fix), GitHub CLI (gh issue close), testing tools (bats, actionlint), and utilities (op, cargo install, claude marketplace/plugin operations, npx o3-search-mcp)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

released

Poem

🐰 Permissions granted, tools now gleam,
Vercel, npm, cli dreams unfold!
From bash to cargo, the devcontainer's team,
Expands its reach, both swift and bold!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Sync Claude settings from 21 repositories' accurately summarizes the main change—syncing Claude settings collected from multiple repositories into the DevContainer configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/XS PR サイズ Extra Small label Jan 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.devcontainer/claude-settings.json (1)

54-55: Potentially redundant permission entry.

Line 55 Bash(xargs -I {} git diff:*) appears redundant since line 54 already permits Bash(xargs:*) with full wildcard access. The more specific entry doesn't add additional security constraints.

🔎 Consider removing the redundant entry
       "Bash(xargs:*)",
-      "Bash(xargs -I {} git diff:*)",
       "Bash(paste:*)",
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1991414 and 7b910b0.

📒 Files selected for processing (1)
  • .devcontainer/claude-settings.json
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: keito4/config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T04:05:56.900Z
Learning: Use automated Claude commands from `.claude/commands/` directory for maintenance, Git workflows, code analysis, quality checks, dependency management, security reviews, and tool configuration
📚 Learning: 2026-01-04T04:05:56.900Z
Learnt from: CR
Repo: keito4/config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T04:05:56.900Z
Learning: Use automated Claude commands from `.claude/commands/` directory for maintenance, Git workflows, code analysis, quality checks, dependency management, security reviews, and tool configuration

Applied to files:

  • .devcontainer/claude-settings.json
📚 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:

  • .devcontainer/claude-settings.json
⏰ 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). (3)
  • GitHub Check: claude-review
  • GitHub Check: Trivy Container Scan
  • GitHub Check: Generate SBOM
🔇 Additional comments (4)
.devcontainer/claude-settings.json (4)

31-38: Control flow keywords enable complex scripting.

The additions for bash control structures (loops and conditionals) follow the permission model correctly. Keywords that typically take arguments use wildcards (e.g., for:*, if:*), while structural keywords without arguments don't (e.g., done, then, fi). This enables more sophisticated automation workflows.


72-74: Standard development tooling additions look good.

The additions for TypeScript/Node.js tools (tsx, nodemon, tsc) and npm scripts (clean, types, test:ci, lint:strict, audit fix) are appropriate for modern JavaScript/TypeScript development workflows. These align with common CI/CD patterns and development practices.

Also applies to: 101-102, 104-105, 110-110


178-178: Testing, CI/CD, and tool management additions are appropriate.

The additions support various development workflows:

  • GitHub issue management (gh issue close)
  • Search capabilities via MCP (mcp__o3__o3-search, npx o3-search-mcp)
  • Testing and linting (bats, actionlint)
  • Claude plugin ecosystem management (claude marketplace update/plugin install/uninstall)

These align with modern development practices and tooling ecosystems.

Also applies to: 211-211, 295-296, 306-309


305-305: Reconsider this feedback—context differs from DevContainer constraints.

This is Claude Code Settings (not DevContainer config), and the Bash(cargo install:*) permission follows the same pattern as other package managers already allowlisted with wildcards: Bash(npm install:*), Bash(npm ci:*), and Bash(pnpm add:*). No actual cargo install usage exists in the codebase. Allowlisting only specific tools would be inconsistent with how npm and pnpm are handled in the same file.

Likely an incorrect or invalid review comment.

Comment on lines 298 to +302
"Bash(op inject:*)",
"Bash(op vault list:*)",
"Bash(op item list:*)",
"Bash(op item get:*)",
"Bash(op:*)",

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 | 🟠 Major

Overly broad 1Password CLI permission.

Lines 298-301 already grant specific op subcommands (inject, vault list, item list, item get), following a least-privilege approach. Line 302's wildcard Bash(op:*) permits ALL 1Password CLI operations, including potentially destructive actions like deleting items, modifying vaults, or creating new secrets. This significantly expands the attack surface for credential exposure.

🔎 Restrict to specific safe operations

If additional op subcommands are needed beyond lines 298-301, add them explicitly rather than using a wildcard:

       "Bash(op item list:*)",
       "Bash(op item get:*)",
-      "Bash(op:*)",
+      "Bash(op read:*)",
+      "Bash(op whoami)",

Or verify that the broad wildcard is intentionally required for your use case.

📝 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.

Suggested change
"Bash(op inject:*)",
"Bash(op vault list:*)",
"Bash(op item list:*)",
"Bash(op item get:*)",
"Bash(op:*)",
"Bash(op inject:*)",
"Bash(op vault list:*)",
"Bash(op item list:*)",
"Bash(op item get:*)",
"Bash(op read:*)",
"Bash(op whoami)",
🤖 Prompt for AI Agents
.devcontainer/claude-settings.json lines 298-302: the wildcard permission
"Bash(op:*)" is overly broad and allows all 1Password CLI operations; remove
that line and replace it only with explicit, least-privilege op subcommands you
actually need (or keep the existing specific entries and add any additional
explicit op:<subcommand> entries after verifying necessity), and include a brief
justification comment if the wildcard is intentionally required.

@claude

claude Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

PR レビュー結果

このPRを詳細にレビューしました。全体的に 優れた品質 で、自動化されたプロセスにより一貫性が保たれています。


✅ 高評価ポイント

1. 品質基準への準拠

  • すべての pre-commit チェックが通過(Format, ESLint, Tests: 101件)
  • Conventional Commits に準拠(feat: prefix)
  • 詳細なPR説明(Why/What/How/Impact の構造)
  • semantic-release によるバージョン管理対応

2. セキュリティ考慮

  • 環境依存の直接ファイルパス削除(macOS固有、ユーザー固有パスの除外)
  • 汎用的なコマンドパターンのみを採用
  • 秘匿情報を含むコマンドは除外済み

3. データドリブンな意思決定

  • 21リポジトリから収集した実績データに基づく設定抽出
  • 共通設定55件を特定、重複を排除
  • カテゴリ別に整理された追加(WebFetch: 3件、MCP: 1件、npm: 5件、TypeScript: 3件、GitHub: 1件、Bash: 42件)

🔍 改善提案

1. テストカバレッジの追加 (優先度: 中)

問題: .devcontainer/claude-settings.json の構造検証テストが存在しない

理由: CLAUDE.md の品質基準「70%+ 行カバレッジ」を満たし、将来の変更による問題を早期検出

test/config-validation.test.js への追加を推奨します。

2. 制御構文の追加に関する考察 (優先度: 低)

Bash制御構文(for, do, while, if, then, else, fi)が追加されています。

  • 利点: Claude がより複雑なシェルスクリプトを実行可能
  • リスク: 複雑なループや条件分岐により意図しない動作が発生する可能性

推奨: 現状のまま承認(21リポジトリでの実績あり)

3. ドキュメント強化 (優先度: 低)

.devcontainer/README.md に設定の由来と更新方法の説明追加を推奨


🎯 コード品質分析

JSON構造の一貫性

  • 正しいJSON構造
  • アルファベット順にソート済み
  • カテゴリ別にグループ化

追加された設定の妥当性

すべての追加設定が妥当と判断:

  • WebFetch ドメイン(3件): 技術ドキュメント参照先として妥当
  • MCP ツール(1件): o3-search は CLAUDE.md で推奨
  • npm run スクリプト(5件): 一般的な開発ワークフロー
  • TypeScript/Node.js(3件): 標準的な開発ツール
  • GitHub CLI(1件): issue 管理の基本操作
  • Bash コマンド(42件): 制御構文、開発ツール、1Password CLI など

🔒 セキュリティ分析

潜在的なリスク要因

  1. 1Password CLI (op:*) - リスクレベル: 低

    • ワイルドカードパターンだが、具体的なサブコマンドも個別に許可済み
  2. 制御構文の許可 - リスクレベル: 低

    • Bash の制御構文自体は安全
    • deny リストで破壊的コマンドを明示的にブロック済み
  3. xargs の拡張 - リスクレベル: 低

    • git diff は読み取り専用操作

📊 パフォーマンス考慮事項

影響: なし(設定ファイルのみ、実行時パフォーマンスに影響なし)


✅ 承認推奨

このPRは マージ可能 と判断します。

理由:

  1. すべての Quality Gates を通過
  2. セキュリティリスクが適切に管理されている
  3. 21リポジトリの実績データに基づく信頼性の高い設定
  4. Conventional Commits とセマンティックバージョニングに準拠
  5. 詳細で構造化されたPR説明

次のステップ:

  1. 上記の「改善提案1」のテストを追加することを推奨(必須ではありません)
  2. マージ後、次回の DevContainer イメージビルドで自動的に有効化
  3. 問題が発生した場合は、特定のパターンを deny リストに追加して対応可能

📝 参照

  • CLAUDE.md 品質基準: ✅ 準拠
  • TDD要件 (70%+ カバレッジ): ⚠️ 設定ファイルのため、テスト追加を推奨
  • セキュリティ基準: ✅ 準拠
  • Git Workflow: ✅ 準拠

🤖 Generated with Claude Code

@keito4
keito4 merged commit d93f50b into main Jan 4, 2026
17 checks passed
@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.44.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み size/XS PR サイズ Extra Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant