This repository holds a collection of configuration settings and scripts for managing a consistent development environment across different systems. The primary purpose of this repository is to reduce the time and effort required to set up a new development environment. By running a single command, you can replicate the same development environment on a new computer.
It includes settings for various tools, such as the shell (Zsh), Git, npm, and Visual Studio Code, and provides specific configurations for different operating systems.
.claude/: Claude Code configuration directory containing settings, commands, agents, and hooks. User-specific settings likesettings.local.jsonare 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..devcontainer/: Development container configuration providing containerized development environment with consistent tooling across different machines. Thetemplates/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. Thetemplates/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.credentials/: Contains templates and scripts for secure credential management using 1Password CLI integration.eslint/: Contains recommended ESLint complexity rules template and documentation to prevent technical debt accumulation. See eslint/README.md for usage guidelines.dot/: Directory for dotfiles and configuration files that are typically placed in the home directory, including Zsh configuration with comprehensive aliases, functions, and environment setup.git/: Contains Git configuration files including gitconfig, gitignore, commitlint configuration with i18n support, and modular configuration files in thegitconfig.d/subdirectory. See git/README.md for details.npm/: Contains npm global package configuration.script/: Contains utility scripts for exporting configuration settings (export.sh), importing configuration settings (import.sh), credential management (credentials.sh), Homebrew dependency management (brew-deps.sh), semantic versioning (version.sh), documentation sync checking (check-docs-sync.sh), and automated library updates for Codex/Claude Code tooling (update-libraries.sh). See script/README.md for details.vscode/: Contains Visual Studio Code configuration including extensions list and installation documentation. Thetemplates/subdirectory contains project-specific settings templates such as Tailwind CSS + CVA IntelliSense configuration. See vscode/README.md for details.
This repository follows security best practices to protect sensitive information:
- No hardcoded credentials: Personal information like email addresses and SSH keys are not stored in configuration files
- Environment variables: Sensitive data is managed through environment variables and templates
- 1Password integration: Use
script/credentials.shfor secure credential management via 1Password CLI - Secure file permissions: Generated credential files are automatically set to 600 permissions
The git/gitconfig file uses commented placeholders instead of hardcoded values. Configure your Git settings securely with:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global user.signingkey "$(cat ~/.ssh/id_ed25519.pub)"-
Install 1Password CLI
brew install --cask 1password-cli
-
Sign in to 1Password
op signin
-
Set up environment variables
⚠️ Run on host machine BEFORE DevContainerFor multiple 1Password accounts:
OP_ACCOUNT=my.1password.com bash script/setup-env.sh bash script/setup-mcp.sh
For single account:
bash script/setup-env.sh bash script/setup-mcp.sh
This creates
~/.devcontainer.envwhich is required for DevContainer startup. -
Configure Git settings
git config --global user.name "Your Name" git config --global user.email "your.email@example.com" git config --global user.signingkey "$(cat ~/.ssh/id_ed25519.pub)"
-
Install packages using Homebrew
brew bundle --file=brew/StandaloneBrewfile
The automated setup creates:
~/.devcontainer.env- DevContainer environment variables (600 permissions)credentials/mcp.env- MCP environment variables (600 permissions).mcp.json- MCP configuration file (600 permissions)
All generated files are automatically excluded from Git via .gitignore.
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: ...
│ └── AWS_REGION: ap-northeast-1
└── Other credentials
For detailed security guidelines and troubleshooting, see SECURITY.md and credentials/README.md.
The .claude/ directory contains Claude Code configuration that is partially version-controlled:
Note: This section is an overview. For authoritative development standards and AI workflow details, see
CLAUDE.mdandAGENTS.md.
settings.json- Shared permissions, environment variables, and hookscommands/- Custom slash commands available to all usersagents/- Specialized agent configurationshooks/- Event-driven automation scriptsplugins/config.json- Custom plugin repository configurationplugins/known_marketplaces.json.template- Template for plugin marketplace configuration (generatesknown_marketplaces.jsonlocally)CLAUDE.md- Global development standards and guidelines
settings.local.json- User-specific overrides (plugin preferences, local permissions).credentials.json- Sensitive authentication dataplugins/installed_plugins.json- Installed plugin metadata (environment-specific)plugins/marketplaces/- Downloaded plugin files from marketplacesplugins/repos/- Custom repository pluginsdebug/,file-history/,history.jsonl,plans/,projects/,session-env/,shell-snapshots/,statsig/,todos/- Runtime and session data
Claude Code設定はexport.shとimport.shスクリプトで自動的に同期されます:
自動同期される設定
settings.json- 共有パーミッション、環境変数、フックcommands/- カスタムスラッシュコマンドagents/- 専用エージェント設定hooks/- イベント駆動の自動化スクリプトplugins/config.json,plugins/known_marketplaces.json.template- プラグイン設定(テンプレート)CLAUDE.md- 開発標準とガイドライン
同期されない設定(ローカル専用)
settings.local.json- ユーザー固有のオーバーライド.credentials.json- 認証情報plugins/installed_plugins.json- インストール済みプラグイン- ランタイムデータ(
debug/,projects/,todos/など)
export.shを実行すると、これらの共有設定が自動的にリポジトリにコピーされます。import.shを実行すると、リポジトリから~/.claude/に復元されます。
Plugin configuration is managed through two layers:
-
Marketplace Configuration (template in
plugins/known_marketplaces.json.template, generated asknown_marketplaces.jsonlocally)- Defines which plugin marketplaces to use
- Template is shared across all team members
- Generated file is local-only (not version-controlled)
- Examples: official Anthropic plugins, community repositories
-
Plugin Activation (local-only in
settings.local.json)- Individual choice of which plugins to enable
- Environment-specific preferences
- Not committed to version control
For detailed plugin management instructions, see .claude/plugins/README.md.
The repository includes LSP configuration (.claude-plugin/plugin.json) to enable advanced code analysis and IntelliSense features in Claude Code v2.0.74+.
Supported Language Servers:
- TypeScript/JavaScript:
typescript-language-server- Provides type checking, auto-completion, and navigation - Bash:
bash-language-server- Shell script analysis and validation - JSON:
vscode-json-language-server- JSON schema validation and formatting - YAML:
yaml-language-server- YAML syntax checking and schema validation
Installation:
Language servers are automatically installed as global npm packages during DevContainer setup. To manually install:
npm install -g typescript-language-server typescript bash-language-server vscode-langservers-extracted yaml-language-serverConfiguration:
The .claude-plugin/plugin.json file defines LSP server configurations. Language servers are automatically activated based on file extensions:
- TypeScript/JavaScript:
.js,.jsx,.ts,.tsx - Bash:
.sh,.bash - JSON:
.json,.jsonc - YAML:
.yaml,.yml
Benefits:
- Real-time code analysis and error detection
- Intelligent auto-completion and suggestions
- Go-to-definition and find-references navigation
- Inline documentation and type information
- Refactoring support
For more information about LSP support in Claude Code, see Claude Code LSP Guide.
Before using these configuration settings, you should review them and adjust as necessary for your specific environment and preferences. For credentials, we use environment variables managed by 1Password.
Set the REPO_PATH environment variable to this repository's root and run the import.sh script to import configuration settings:
export REPO_PATH=/path/to/config
cd "$REPO_PATH"
./script/import.shThe script performs the following actions:
- Installs Homebrew packages listed in OS-specific Brewfiles
- Installs Oh My Zsh and zsh-autosuggestions plugin
- Installs VS Code/Cursor extensions
- Copies Git configuration files (
.gitconfig,.gitignore,.gitattributes) - Copies Zsh configuration files (
.zprofile,.zshrc,.zshrc.devcontainer,.zsh/) - Copies Peco configuration (
.peco/) - Installs npm global packages
- Copies Claude Code shared configuration (
settings.json,commands/,agents/,hooks/,plugins/) - Clones GitHub repositories using
ghq(if available)
settings.local.json are not overwritten.
Ensure REPO_PATH points to the repository and run the export.sh script to capture the current machine's configuration:
export REPO_PATH=/path/to/config
cd "$REPO_PATH"
./script/export.shThe script performs the following actions:
- Exports Homebrew package lists to OS-specific Brewfiles
- Exports VS Code/Cursor extensions list
- Exports Git configuration files (
.gitconfig,.gitignore,.gitattributes) - Exports Zsh configuration files (
.zprofile,.zshrc,.zshrc.devcontainer,.zsh/) - Exports Peco configuration (
.peco/) - Exports npm global packages list
- Exports Claude Code shared configuration (
settings.json,commands/,agents/,hooks/,plugins/)
settings.local.json and credentials are excluded.
- Run
npm run update:libs(wrapper forscript/update-libraries.sh) to refresh npm devDependencies together with Codex/Claude Code CLI definitions captured innpm/global.json. - The script performs
npm-check-updates,npm install, and re-synchronizes global CLI versions vianpm view <package> versionbefore running lint/tests to verify the updated toolchain. - Packages that currently require newer Node.js releases (
semantic-release,@semantic-release/github) are excluded by default. Override the exclusion list withUPDATE_LIBS_REJECT="pkg1,pkg2" npm run update:libswhen you are ready to bump them. .github/workflows/update-libraries.ymlexecutes the same script weekly and opens a PR whenever it produces changes, ensuring Codex/Claude Code tooling stays current without manual effort.
- Run
npm run update:claude(wrapper forscript/update-claude-code.sh) to check and update only the@anthropic-ai/claude-codepackage to the latest version. - The script compares the current version in
npm/global.jsonwith the latest available version on npm registry. - If a newer version is available, it automatically updates
npm/global.jsonand displays the release notes URL. - Use
/update-claude-codeClaude command for interactive update within Claude Code sessions.
- Commits that touch release-critical files (
package*.json,npm/global.json,.devcontainer/codex*,.codex/**) must use a release-triggering Conventional Commit type (feat,fix,perf,revert, ordocs). Commitlint enforces this so semantic-release can publish automatically when tooling versions change.
npm/global.jsonis the single source of truth for both@openai/codexand@anthropic-ai/claude-codeversions.- The DevContainer Dockerfile copies this file into the build context and reads the versions at build time, guaranteeing that
npm install -g ...pins to the same versions used by local setups. - When bumping either CLI, update the version in
npm/global.json(or runnpm run update:libs) and rebuild the DevContainer image. No manual edits in.devcontainer/Dockerfileare required anymore. - Rebuild the DevContainer image after updating CLI versions to ensure consistency across environments.
The repository provides standardized configuration files that can be imported to set up a consistent development environment. See the usage instructions below for importing and exporting configurations.
This repository uses 1Password CLI for secure, automated environment variable management. Credentials are never committed to Git.
Use the automated setup scripts to generate environment files from 1Password:
# For multiple 1Password accounts
OP_ACCOUNT=my.1password.com bash script/setup-env.sh
bash script/setup-mcp.sh
# For single account
bash script/setup-env.sh
bash script/setup-mcp.shThis automatically creates:
~/.devcontainer.env- DevContainer environment variablescredentials/mcp.env- MCP environment variables.mcp.json- MCP configuration file
All files are set with 600 permissions and excluded from Git.
If 1Password CLI is not available, you can manually create the environment file:
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.envThe .mcp.json file is already configured with Linear MCP server. If you need to customize it:
# Edit .mcp.json to add additional MCP servers
chmod 600 .mcp.jsonThe environment variable setup is required at specific times:
1. Initial Setup (Required - Run on Host Machine)
Before using DevContainer for the first time, run on your host machine:
OP_ACCOUNT=my.1password.com bash script/setup-env.shThis creates ~/.devcontainer.env which is required for DevContainer startup via runArgs.
2. DevContainer Startup (Automatic)
When DevContainer starts, postCreateCommand automatically runs:
setup-env.sh- Regenerates environment files inside containersetup-mcp.sh- Generates.mcp.jsonfrom template
3. Credential Updates (Manual)
Re-run setup scripts when:
- API keys are rotated in 1Password
- New credentials are added to templates
- Environment variables need to be refreshed
# On host machine
OP_ACCOUNT=my.1password.com bash script/setup-env.sh
# Inside DevContainer (or rebuild container)
bash script/setup-env.sh
bash script/setup-mcp.sh4. Template Updates (Manual)
After modifying credentials/templates/*.env.template, regenerate:
bash script/setup-env.sh
bash script/setup-mcp.sh- 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
For detailed instructions, troubleshooting, and 1Password Vault structure, see credentials/README.md.
The repository includes a Makefile with various utility commands:
# Create a patch version (1.0.0 -> 1.0.1)
make version-patch
# Create a minor version (1.0.0 -> 1.1.0)
make version-minor
# Create a major version (1.0.0 -> 2.0.0)
make version-major
# Preview next version without creating tag
make version-dry-run# Automated setup (recommended)
bash script/setup-env.sh # Generate environment variables from 1Password
bash script/setup-mcp.sh # Generate MCP configuration
# For multiple 1Password accounts
OP_ACCOUNT=my.1password.com bash script/setup-env.sh
# Legacy method
make credentials # Fetch credentials from 1Password
make clean-credentials # Clean up credential files
make list-credentials # List available credential templates# List packages without dependencies (standalone packages)
make brew-leaves
# List packages organized by category
make brew-categorized
# Generate Brewfiles for standalone packages
make brew-generate
# Show dependencies of a specific package
make brew-deps pkg=<package>
# Show packages that depend on a specific package
make brew-uses pkg=<package>This repository includes comprehensive GitHub Actions workflows and development tooling:
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:
- Step-by-step CI/CD pipeline setup instructions
- Quality checks (lint, format, type-check, complexity analysis)
- Unit & E2E testing with 70%+ coverage requirement
- Security scanning (dependency audit, SAST, license compliance)
- Claude Code Review integration
- GitHub Secrets configuration guide
- Husky Git hooks setup
- Troubleshooting guidance
Quick Start:
@claude use setup-recommended-ci to set up CI/CD pipeline
- CI Pipeline (
.github/workflows/ci.yml): Automated testing, linting, and quality checks (uses Node.js 22) - Claude Code Integration (
.github/workflows/claude.yml): AI-assisted code review and issue management - Docker Image Build (
.github/workflows/docker-image.yml): Containerized build and deployment pipeline - Library Auto-Update (
.github/workflows/update-libraries.yml): Scheduled Codex/Claude tooling refresh that raises a PR whennpm run update:libsproduces changes
The repository includes configuration for act, a tool that allows you to run GitHub Actions workflows locally on your machine for testing and debugging before pushing to GitHub.
Quick Start:
# List all available workflows
act -l
# Run all workflows
act
# Run specific event triggers
act push
act pull_request
# Run a specific job
act -j quality
# Dry run (shows what would be executed without running)
act -nConfiguration:
The .actrc file provides default settings for act:
- Uses full-featured Ubuntu Docker images (
catthehacker/ubuntu:full-*) for better GitHub Actions compatibility - Loads environment variables from
.env.local(git-ignored) - Loads secrets from
~/.secretsif available - Enables workspace binding and container reuse for better performance
- Uses
linux/amd64architecture for consistency
Common Use Cases:
# Test CI workflow before pushing
act -j quality
# Test with specific environment variables
echo "MY_VAR=value" > .env.local
act
# Use verbose output for debugging
act -v
# Run workflow without pulling latest images
act --pull=falseEnvironment Variables:
For workflows requiring secrets or environment variables:
- Create
.env.localin the repository root (already in.gitignore) - Add your variables:
GITHUB_TOKEN=your_token_here - Run act normally - it will automatically load from
.env.local
Important Notes:
- First run downloads large Docker images (~2.6GB), subsequent runs are faster with
--reuse - Some GitHub-hosted runner features may not work identically in local containers
- For sensitive workflows, ensure
.env.localis never committed
- ESLint: JavaScript/TypeScript linting with customizable rules
- Prettier: Code formatting with consistent style enforcement
- Husky: Git hooks for pre-commit and commit-msg validation
- Commitlint: Enforces conventional commit message format
- semantic-release: Automated version management and releases
The repository includes a complete DevContainer setup (.devcontainer/) that provides:
- Consistent development environment across different machines
- Pre-configured tools and extensions
- Automatic import of configuration settings on container startup
- Integrated Claude Code configuration with specialized agents and commands
- Bell notification system for development workflow events
Latest Version: ghcr.io/keito4/config-base:1.48.0
Pre-installed Plugins (v1.48.0):
- Official plugins:
commit-commands,hookify,plugin-dev,typescript-lsp,code-review - Workflow plugins:
code-refactoring,kubernetes-operations,javascript-typescript,backend-development,full-stack-orchestration,database-design,database-migrations
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 for detailed usage instructions.
DevContainer推奨設定: Elu-co-jp配下のリポジトリで統一されたDevContainer環境を構築するための推奨設定とベストプラクティスについては、.codex/devcontainer-recommendations.mdを参照してください。
This repository uses semantic-release for automated version management and releases based on commit messages. Follow conventional commit format:
feat:- New features (minor version bump)fix:- Bug fixes (patch version bump)BREAKING CHANGE:- Breaking changes (major version bump)docs:,style:,refactor:,test:,chore:- No version bump
Releases are automatically created when changes are pushed to the main branch.
Node.js Version: The repository uses Node.js v22.14.0 in development containers and CI, which is compatible with semantic-release (v25.0.2) requirements (^22.14.0 || >= 24.10.0).
This repository supports AI-assisted development through Claude Code integration:
The CLAUDE.md file defines organization-wide development standards in Japanese:
- Test-Driven Development (TDD): Red → Green → Refactor methodology with 70%+ line coverage requirement
- Static Quality Gates: Automated linting, formatting, security analysis, and license checking
- Git Workflow: Conventional commits, branch naming conventions, and pull request requirements
- AI Prompt Design Guidelines: Structured approach for requirements definition and implementation
When encountering technical challenges, unresolved errors, or implementation roadblocks during development, consult o3 MCP (integrated via Model Context Protocol) for advanced problem-solving assistance. o3 MCP specializes in:
- Complex debugging scenarios and error resolution
- Architecture design decisions and pattern recommendations
- Performance optimization strategies
- Advanced algorithm implementation
- Real-time web search for latest documentation and solutions
- Root cause analysis for persistent issues
Usage Guidelines:
-
When to consult o3 MCP:
- Stuck on complex implementation details
- Encountering persistent errors or bugs
- Need architectural guidance or design review
- Performance bottlenecks requiring optimization
- Complex algorithm design and implementation
-
Integration with Claude Code:
- o3 MCP is accessible through Claude Code's MCP integration
- Formulate questions in English for optimal results
- Include relevant context, error messages, and code snippets
- Specify what solutions you've already attempted
-
Example consultation:
@claude Use o3 MCP to help debug this async/await deadlock issue @claude Consult o3 MCP for optimizing this database query performance @claude Ask o3 MCP about best practices for implementing this design pattern
The repository includes automated Slack notifications for development workflow events:
- Task Completion Notifications: Claude Code automatically sends notifications to Slack when tasks are completed
- CI/CD Pipeline Status: Integration with GitHub Actions for build and deployment status updates
- Error Alerts: Critical errors and CI failures trigger immediate Slack notifications to #ci-alerts channel
- MCP Integration: Uses Model Context Protocol (MCP) for seamless Slack workspace integration
Configuration Requirements:
- Slack workspace with MCP integration enabled
- Appropriate channel permissions for bot posting
- Environment variables configured for Slack API access
- act: A tool that allows you to run GitHub Actions workflows locally on your machine for testing and debugging before pushing to GitHub.
- Homebrew (Brew): A package manager for macOS and Linux that allows easy installation and management of software packages.
- Brewfile: A file format used by Homebrew to declare and install packages in a reproducible way.
- 1Password: A password manager that securely stores credentials, with CLI integration for automated credential management.
- 1Password CLI: Command-line tool for 1Password that enables automated credential retrieval using
op injectcommand. - op inject: 1Password CLI command that replaces
op://Vault/Item/Fieldreferences in templates with actual credential values. - Environment Variable Template: A template file (e.g.,
*.env.template) containingop://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.
- 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.
- GitHub Actions: CI/CD platform integrated with GitHub for automating workflows.
- Husky: Git hooks tool that enables running scripts at various Git lifecycle events.
- npm: The default package manager for the JavaScript runtime environment Node.js.
- Prettier: An opinionated code formatter that enforces consistent code style.
- Semantic Release: Automated version management and release process based on commit messages.
- Visual Studio Code: A free source-code editor made by Microsoft for Windows, Linux, and macOS.
- Zsh: An extended Unix shell with advanced features for interactive use and scripting.
- envsubst: GNU gettext utility that substitutes environment variables in shell format strings (e.g.,
${VARIABLE}).
This repository is intended for personal use. While it's made public for reference and learning purposes, it may not fit your development environment or use case directly. Always review and understand the settings and scripts before use.