Skip to content
Merged
7 changes: 3 additions & 4 deletions .claude/commands/devcontainer-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ cat .claude-plugin/plugin.json | jq '.lspServers | keys'

```bash
# 重要な環境変数の確認(値は表示しない)
env | grep -E "OPENAI_API_KEY|AWS_|CLAUDE_CODE" | sed 's/=.*/=***/'
env | grep -E "AWS_|CLAUDE_CODE" | sed 's/=.*/=***/'

# DevContainer環境ファイルの確認
ls -la ~/.devcontainer.env
Expand All @@ -145,7 +145,6 @@ ls -la .mcp.json

**確認ポイント:**

- [ ] `OPENAI_API_KEY` が設定されている
- [ ] `AWS_ACCESS_KEY_ID` が設定されている(必要な場合)
- [ ] `AWS_SECRET_ACCESS_KEY` が設定されている(必要な場合)
- [ ] `~/.devcontainer.env` が存在し、権限が600
Expand Down Expand Up @@ -285,7 +284,7 @@ act -l

- [ ] `/repo-maintenance` コマンドが実行可能
- [ ] カスタムコマンド(`.claude/commands/`)が読み込まれている
- [ ] MCPサーバー(Playwright, o3など)が利用可能
- [ ] MCPサーバー(Playwrightなど)が利用可能

### DevContainer固有

Expand All @@ -300,7 +299,7 @@ act -l
[[ -n "$CODESPACES" ]] && echo "Running in Codespaces" || echo "Not Codespaces"

# シークレットが正しく設定されているか確認
env | grep -E "OPENAI_API_KEY|ANTHROPIC_API_KEY|GEMINI_API_KEY" | sed 's/=.*/=***/'
env | grep -E "ANTHROPIC_API_KEY|GEMINI_API_KEY" | sed 's/=.*/=***/'
```

**確認ポイント:**
Expand Down
40 changes: 5 additions & 35 deletions .claude/devcontainer-recommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ bash script/setup-mcp.sh
```json
{
"mcpServers": {
"o3": {
"type": "stdio",
"command": "npx",
"args": ["o3-search-mcp"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
},
"playwright": {
"type": "stdio",
"command": "npx",
Expand All @@ -122,17 +114,11 @@ bash script/setup-mcp.sh
}
```

#### 必須環境変数(`.devcontainer.env`)

```bash
OPENAI_API_KEY=*** # o3 MCP用
```

#### ⚠️ 重要な注意事項

1. **セキュリティ**:
- `.mcp.json`は`.gitignore`に追加必須
- API KEYは環境変数テンプレート(`${OPENAI_API_KEY}`)を使用
- API KEYは環境変数テンプレートを使用
- 平文でのAPI KEY保存は避ける

2. **配置場所の優先順位**:
Expand Down Expand Up @@ -801,31 +787,16 @@ NODE_ENV=development
- 手動で実行: `bash script/setup-mcp.sh`
- 環境変数が展開されているか確認:
```bash
cat .mcp.json | grep OPENAI_API_KEY
# ${OPENAI_API_KEY}が残っている場合は未展開
cat .mcp.json | grep '\${'
# ${VAR_NAME}が残っている場合は未展開
```
- 推奨: `.mcp.json`を`.claude/.mcp.json`にコピー:
```bash
mkdir -p ~/.claude
cp .mcp.json ~/.claude/.mcp.json
```

8. **o3 MCP(OpenAI検索)が使えない**
- `OPENAI_API_KEY`の設定確認:
```bash
echo $OPENAI_API_KEY
```
- `credentials/mcp.env`に`OPENAI_API_KEY`が含まれているか確認
- 1Passwordから取得:
```bash
OP_ACCOUNT=your.1password.com bash script/setup-env.sh
```
- `.mcp.json`を再生成:
```bash
bash script/setup-mcp.sh
```

9. **Playwright MCPが動作しない**
8. **Playwright MCPが動作しない**
- Node.jsとnpxが利用可能か確認:
```bash
node --version
Expand Down Expand Up @@ -858,8 +829,7 @@ NODE_ENV=development

- [MCP公式ドキュメント](https://modelcontextprotocol.io/)
- [Playwright MCP](https://github.com/microsoft/playwright-mcp)
- [o3 Search MCP](https://www.npmjs.com/package/o3-search-mcp)
- 本リポジトリのMCP設定: [.mcp.json.template](./.mcp.json.template) および [credentials/templates/mcp.env.template](./credentials/templates/mcp.env.template)
- 本リポジトリのMCP設定: [credentials/templates/mcp.env.template](../credentials/templates/mcp.env.template)

---

Expand Down
1 change: 0 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"WebFetch(domain:www.assemblyai.com)",
"WebFetch(domain:ai-sdk.dev)",
"WebFetch(domain:vercel.com)",
"WebFetch(domain:linear.app)",
"WebFetch(domain:docs.speechmatics.com)",
"WebFetch(domain:docs.sentry.io)",
"mcp__ide__getDiagnostics",
Expand Down
1 change: 0 additions & 1 deletion .devcontainer/claude-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"WebFetch(domain:www.assemblyai.com)",
"WebFetch(domain:ai-sdk.dev)",
"WebFetch(domain:vercel.com)",
"WebFetch(domain:linear.app)",
"WebFetch(domain:docs.speechmatics.com)",
"WebFetch(domain:docs.sentry.io)",
"mcp__ide__getDiagnostics",
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# External packages
.agents/skills/

# Symlinks (git core.symlinks=false stores as text files)
CLAUDE.md
3 changes: 0 additions & 3 deletions .zsh/configs/pre/.env.secret.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# OpenAI API Key
OPENAI_API_KEY=op://Dev/OPENAI_API_KEY/Section_sm345wvnkaze2ungfiv3mosxue/value

# AWS Credentials
AWS_ACCESS_KEY_ID=op://Dev/AWS/AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY=op://Dev/AWS/AWS_SECRET_ACCESS_KEY
Expand Down
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It includes settings for various tools, such as the shell (Zsh), Git, npm, and V
## Directory Structure

- `.claude/`: Claude Code configuration directory containing settings, commands, agents, and hooks. User-specific settings like `settings.local.json` are git-ignored while shared configurations are version-controlled.
- `.codex/`: Contains MCP (Model Context Protocol) server configuration (`config.toml`) for Claude Code integration with external services like AWS, GitHub, Playwright, o3, Linear, n8n, Supabase, and Vercel.
- `.codex/`: Contains MCP (Model Context Protocol) server configuration (`config.toml`) for Claude Code integration with external services like AWS, GitHub, Playwright, n8n, Supabase, and Vercel.
- `.devcontainer/`: Development container configuration providing containerized development environment with consistent tooling across different machines. The `templates/` subdirectory contains optional DevContainer features templates for additional language support (Python, Ruby, Go, Java, .NET).
- `.github/`: GitHub configuration including workflows for CI/CD, security scanning, and release automation. The `templates/` subdirectory contains reusable workflow templates for unified CI with coverage reporting and monorepo releases with change detection.
- `brew/`: Contains Brewfiles for different operating systems (Linux, macOS) and dependency configurations, including lock files for reproducible package installations. Supports categorized package management and dependency analysis.
Expand Down Expand Up @@ -108,8 +108,6 @@ For the automated setup to work, create items in your 1Password Vault "Dev":

```
Vault: Dev
├── OPENAI_API_KEY (Login)
│ └── value: sk-proj-...
├── AWS (Login)
│ ├── AWS_ACCESS_KEY_ID: AKIA...
│ ├── AWS_SECRET_ACCESS_KEY: ...
Expand Down Expand Up @@ -364,15 +362,14 @@ If 1Password CLI is not available, you can manually create the environment file:

```bash
cat <<'EOF' > ~/.devcontainer.env
OPENAI_API_KEY=your_openai_api_key
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=ap-northeast-1
EOF
chmod 600 ~/.devcontainer.env
```

The `.mcp.json` file is already configured with Linear MCP server. If you need to customize it:
If you need to customize `.mcp.json`:

```bash
# Edit .mcp.json to add additional MCP servers
Expand Down Expand Up @@ -429,7 +426,6 @@ bash script/setup-mcp.sh
#### How It Works

- Environment variables are injected into DevContainer via `runArgs: ["--env-file=${localEnv:HOME}/.devcontainer.env"]`
- MCP configuration references environment variables (e.g., `"OPENAI_API_KEY": "${OPENAI_API_KEY}"`)
- Templates are version-controlled; generated files are git-ignored
- Update tokens by re-running setup scripts; no repository changes required

Expand Down Expand Up @@ -496,7 +492,7 @@ This repository includes comprehensive GitHub Actions workflows and development

#### Setup Guide for New Projects

For setting up a complete CI/CD pipeline in a new repository following Elu-co-jp organization standards, use the `setup-recommended-ci` command available in `.codex/prompts/setup-recommended-ci.md`. This comprehensive guide provides:
For setting up a complete CI/CD pipeline in a new repository, use the `/setup-ci` Claude command. This provides:

- Step-by-step CI/CD pipeline setup instructions
- Quality checks (lint, format, type-check, complexity analysis)
Expand All @@ -507,12 +503,6 @@ For setting up a complete CI/CD pipeline in a new repository following Elu-co-jp
- Husky Git hooks setup
- Troubleshooting guidance

**Quick Start:**

```
@claude use setup-recommended-ci to set up CI/CD pipeline
```

#### GitHub Actions Workflows

- **CI Pipeline** (`.github/workflows/ci.yml`): Automated testing, linting, and quality checks (uses Node.js 22)
Expand Down Expand Up @@ -615,7 +605,7 @@ The repository includes a complete DevContainer setup (`.devcontainer/`) that pr

**Recommended Usage**: For new projects, use the pre-built image without mounting host's `~/.claude` directory. This ensures the image configuration works immediately. See [docs/using-config-base-image.md](docs/using-config-base-image.md) for detailed usage instructions.

**DevContainer推奨設定**: Elu-co-jp配下のリポジトリで統一されたDevContainer環境を構築するための推奨設定とベストプラクティスについては、[.codex/devcontainer-recommendations.md](.codex/devcontainer-recommendations.md)を参照してください。
**DevContainer推奨設定**: Elu-co-jp配下のリポジトリで統一されたDevContainer環境を構築するための推奨設定とベストプラクティスについては、[.claude/devcontainer-recommendations.md](.claude/devcontainer-recommendations.md)を参照してください。

### Automated Releases

Expand Down Expand Up @@ -670,7 +660,7 @@ The repository includes automated Slack notifications for development workflow e
- **op inject**: 1Password CLI command that replaces `op://Vault/Item/Field` references in templates with actual credential values.
- **Environment Variable Template**: A template file (e.g., `*.env.template`) containing `op://` references that get expanded by 1Password CLI.
- **Claude Code**: AI-powered development assistant with specialized agents for code review, architecture validation, and quality analysis.
- **MCP (Model Context Protocol)**: Integration protocol enabling Claude Code to interact with external services like Slack, o3 search, and Playwright automation.
- **MCP (Model Context Protocol)**: Integration protocol enabling Claude Code to interact with external services like Slack, n8n, and Playwright automation.
- **DevContainer**: A containerized development environment that provides consistent tooling and configurations across different machines and platforms.
- **ESLint**: A static analysis tool for identifying problematic patterns in JavaScript/TypeScript code.
- **Git**: A distributed version control system for tracking changes in source code during software development.
Expand Down
22 changes: 5 additions & 17 deletions credentials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ credentials/

このリポジトリは以下のMCP (Model Context Protocol) サーバーをサポートしています:

| MCPサーバー | パッケージ | 必要な環境変数 | 説明 |
| -------------- | ------------------------------- | ---------------------------- | ------------------------------- |
| **Playwright** | `@playwright/mcp@latest` | なし | ブラウザ自動化とテスト |
| **o3 Search** | `o3-search-mcp` | `OPENAI_API_KEY` | OpenAI o3モデルによる高度な検索 |
| **Linear** | `@mseep/linear-mcp` | `LINEAR_API_KEY` | Linear イシュートラッキング |
| **n8n** | `@leonardsellem/n8n-mcp-server` | `N8N_API_URL`, `N8N_API_KEY` | n8n ワークフロー自動化 |
| MCPサーバー | パッケージ | 必要な環境変数 | 説明 |
| -------------- | ------------------------------- | ---------------------------- | ---------------------- |
| **Playwright** | `@playwright/mcp@latest` | なし | ブラウザ自動化とテスト |
| **n8n** | `@leonardsellem/n8n-mcp-server` | `N8N_API_URL`, `N8N_API_KEY` | n8n ワークフロー自動化 |

### MCP環境変数の設定

Expand All @@ -69,8 +67,6 @@ credentials/

```bash
# 例: 1Password "Dev" ボールトに以下のアイテムを作成
- OPENAI_API_KEY
- LINEAR_API_KEY
- N8N_API_URL
- N8N_API_KEY
```
Expand Down Expand Up @@ -161,8 +157,6 @@ export BUNDLE_RUBYGEMS__PKG__GITHUB__COM="op://Dev/GITHUB_TOKEN/credential"

```
Vault: Dev
├── OPENAI_API_KEY (Login)
│ └── value: sk-proj-...
├── AWS (Login)
│ ├── AWS_ACCESS_KEY_ID: AKIA...
│ ├── AWS_SECRET_ACCESS_KEY: ...
Expand All @@ -173,12 +167,6 @@ Vault: Dev
### アイテムの作成例

```bash
# OpenAI API Key を作成
op item create --category=login \
--title="OPENAI_API_KEY" \
--vault=Dev \
value="sk-proj-your-api-key-here"

# AWS クレデンシャルを作成
op item create --category=login \
--title="AWS" \
Expand Down Expand Up @@ -217,7 +205,7 @@ cp credentials/templates/devcontainer.env.template ~/.devcontainer.env

### .mcp.json が生成されない

**症状**: `envsubst: command not found` または空の OPENAI_API_KEY
**症状**: `envsubst: command not found`

**解決策**:

Expand Down
3 changes: 0 additions & 3 deletions credentials/templates/devcontainer.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# 1Password CLI により自動展開されます
# このファイルは script/setup-env.sh により ~/.devcontainer.env に展開されます

# OpenAI API Key (o3 MCP サーバー用)
OPENAI_API_KEY=op://Dev/OPENAI_API_KEY/value

# AWS Credentials
AWS_ACCESS_KEY_ID=op://Dev/AWS/AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY=op://Dev/AWS/AWS_SECRET_ACCESS_KEY
Expand Down
6 changes: 0 additions & 6 deletions credentials/templates/mcp.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
# このファイルは script/setup-env.sh により credentials/mcp.env に展開され、
# script/setup-mcp.sh により .mcp.json の生成に使用されます

# OpenAI API Key (o3 Search MCP サーバー用)
OPENAI_API_KEY=op://Dev/OPENAI_API_KEY/value

# Linear API Key (Linear MCP サーバー用)
LINEAR_API_KEY=op://Dev/LINEAR_API_KEY/value

# n8n API Configuration (n8n MCP サーバー用)
N8N_API_URL=op://Dev/N8N_API_URL/value
N8N_API_KEY=op://Dev/N8N_API_KEY/value
3 changes: 0 additions & 3 deletions credentials/templates/simple.env.template
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Simple template for existing 1Password items
# Only include items that actually exist in your 1Password

# OpenAI API Key
OPENAI_API_KEY=op://Dev/OPENAI_API_KEY/value

# AWS credentials (already working)
AWS_ACCESS_KEY_ID=op://Dev/AWS/AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY=op://Dev/AWS/AWS_SECRET_ACCESS_KEY
Expand Down
1 change: 0 additions & 1 deletion docs/tool-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ Layer 1: ベースイメージ (ghcr.io/keito4/config-base)
| ------------------------------- | ---------- | ---------------- |
| mcp-remote | 0.1.38 | MCP リモート接続 |
| `@leonardsellem/n8n-mcp-server` | 0.1.8 | n8n MCP サーバー |
| `@mseep/linear-mcp` | 78.0.1 | Linear MCP 連携 |

### 2.6 Git / CI 関連(Dockerfile 末尾でインストール)

Expand Down
4 changes: 0 additions & 4 deletions npm/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"version": "0.1.8",
"overridden": false
},
"@mseep/linear-mcp": {
"version": "78.0.1",
"overridden": false
},
"@openai/codex": {
"version": "0.101.0",
"overridden": false
Expand Down
8 changes: 2 additions & 6 deletions script/lib/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ config::import_mcp() {

cp "$source_file" "$target_file"
echo "✅ Imported .mcp.json"
echo "⚠️ 注意: 環境変数を設定してください"
echo " - OPENAI_API_KEY: o3-search用"
echo " - LINEAR_API_KEY: Linear MCP用"
}

# MCP設定のエクスポート
Expand All @@ -126,9 +123,8 @@ config::export_mcp() {
return 1
fi

# APIキーをプレースホルダーに置換
sed -E 's/"(sk-[a-zA-Z0-9]+)"/"${OPENAI_API_KEY}"/g' "$source_file" > "$target_file"
echo "✅ Exported .mcp.json (API keys replaced with placeholders)"
cp "$source_file" "$target_file"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore secret scrubbing when exporting .mcp.json

config::export_mcp now copies ~/.mcp.json directly into the tracked repo file without any redaction, so running ./script/export.sh on a workstation that stores MCP tokens in env/headers will write real credentials into .mcp.json and makes accidental secret commits likely. This is a regression from the prior export behavior that replaced API-key-like values before writing the file.

Useful? React with 👍 / 👎.

echo "✅ Exported .mcp.json"
}

# Codex設定のインポート
Expand Down
6 changes: 0 additions & 6 deletions script/setup-mcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ main() {
source "$MCP_ENV"
set +a

# 必須環境変数の確認
if [[ -z "${OPENAI_API_KEY:-}" ]]; then
print_warning "OPENAI_API_KEY が設定されていません"
print_info "MCP o3 機能は利用できません"
fi

# envsubst で変数置換して .mcp.json を生成
print_info ".mcp.json を生成中..."

Expand Down
Loading