# Claude Codex Settings A production-ready plugin ecosystem for Claude Code/Desktop and OpenAI Codex that delivers automated code quality enforcement, intelligent git workflow agents, and seamless MCP server integration. This setup transforms AI coding assistants into battle-tested development environments through 6 specialized plugins, covering 8+ languages with automated formatting hooks, specialized agents for commits and pull requests, progressive disclosure skills system, and pre-configured access to 10+ external services. It eliminates manual formatting overhead while maintaining enterprise-level code quality standards. The project provides three core capabilities: (1) comprehensive code quality automation through pre/post tool use hooks with support for Python (ruff/custom docstring formatter), JavaScript/TypeScript (prettier), CSS/JSON/YAML (prettier), Markdown (prettier), shell scripts (prettier-plugin-sh), and whitespace cleanup, (2) intelligent git workflow agents (commit-manager, pr-manager, pr-reviewer) that handle semantic commits, PR creation, and code reviews automatically, and (3) seamless MCP server integration for 10+ services including GitHub, MongoDB, Tavily, Context7, Azure, Linear, Playwright, Paper Search, Slack, and Supabase. Additional features include git workflow confirmation dialogs, desktop notifications, progressive disclosure skills, custom slash commands, and OpusPlan mode configuration with real-time usage tracking. ## Plugin Installation Install all components via Claude Code's plugin marketplace with 6 specialized plugins: ```bash # Add marketplace /plugin marketplace add fcakyon/claude-codex-settings # Install plugins /plugin install ultralytics-dev@fcakyon-claude-plugins # Python/JS/Markdown/Bash formatting + Slack/MongoDB/Linear MCPs /plugin install github-dev@fcakyon-claude-plugins # Git agents (commit/PR/review) + workflow commands /plugin install websearch-tools@fcakyon-claude-plugins # Tavily MCP + WebFetch/WebSearch hooks /plugin install general-dev@fcakyon-claude-plugins # Code simplifier agent + utilities /plugin install plugin-dev@fcakyon-claude-plugins # Plugin development toolkit with skills /plugin install claude-tools@fcakyon-claude-plugins # CLAUDE.md sync + context refresh # Create symlink for cross-tool compatibility ln -s CLAUDE.md AGENTS.md ``` Manual installation alternative: ```bash # Clone and copy configuration git clone https://github.com/fcakyon/claude-codex-settings.git ~/.claude-settings cp -r ~/.claude-settings/.claude/* ~/.claude/ cp -r ~/.claude-settings/plugins/* ~/.claude/plugins/ ln -s ~/.claude/CLAUDE.md ~/.claude/AGENTS.md chmod +x ~/.claude/plugins/*/hooks/scripts/*.py chmod +x ~/.claude/plugins/*/hooks/scripts/*.sh ``` ## Settings Configuration Configure Claude Code with OpusPlan mode, model selection, environment variables, and custom hooks: ```json { "$schema": "https://json.schemastore.org/claude-code-settings.json", "model": "opusplan", "includeCoAuthoredBy": false, "spinnerTipsEnabled": false, "alwaysThinkingEnabled": true, "env": { "CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "1", "DISABLE_BUG_COMMAND": "1", "DISABLE_ERROR_REPORTING": "1", "DISABLE_TELEMETRY": "1", "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-20251101", "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-opus-4-5-20251101", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-5-20250929", "CLAUDE_CODE_SUBAGENT_MODEL": "claude-opus-4-5-20251101", "MAX_MCP_OUTPUT_TOKENS": "40000" }, "permissions": { "allow": [ "Bash(git diff:*)", "Bash(git status:*)", "Bash(ruff:*)", "mcp__tavily__tavily-extract", "mcp__github__pull_request_read", "mcp__context7__get-library-docs" ] }, "statusLine": { "type": "command", "command": "npx -y ccusage@latest statusline", "padding": 0 }, "extraKnownMarketplaces": { "fcakyon-claude-plugins": { "source": { "source": "github", "repo": "fcakyon/claude-codex-settings" } } } } ``` Alternative API providers: - **Z.ai GLM models**: Configuration in `.claude/settings-zai.json` with GLM-4.6 (main) and GLM-4.5-Air (fast) - 85% cheaper than Claude 4.5 - **Kimi K2**: Run with `kimi-k2-thinking-turbo` via Anthropic-compatible API at `https://api.moonshot.ai/anthropic/` - **OpenAI Codex**: Configuration in `~/.codex/config.toml` with gpt-5-codex model support ## Python Code Quality Hook Auto-format Python files with ruff and custom Google-style docstring formatter after every Edit/Write operation: ```python #!/usr/bin/env python3 import json import sys import subprocess import shutil from pathlib import Path def main(): try: data = json.load(sys.stdin) file_path = data.get("tool_input", {}).get("file_path", "") if not file_path.endswith('.py'): sys.exit(0) if not shutil.which('ruff'): sys.exit(0) py_file = Path(file_path) if not py_file.exists(): sys.exit(0) work_dir = py_file.parent # Format with ruff subprocess.run([ 'ruff', 'format', '--line-length', '120', str(py_file) ], capture_output=True, check=False, cwd=work_dir) # Check and fix with ruff subprocess.run([ 'ruff', 'check', '--fix', '--extend-select', 'I,D,UP', '--target-version', 'py39', '--ignore', 'D100,D101,D103,D104,D203,D205,D212,D213,D401,D406,D407,D413,F821,F841', str(py_file) ], capture_output=True, check=False, cwd=work_dir) # Format docstrings with custom formatter subprocess.run([ 'python', '.claude/hooks/format_python_docstrings.py', str(py_file) ], capture_output=True, check=False, cwd=work_dir) except Exception: pass sys.exit(0) if __name__ == "__main__": main() ``` Usage with Claude Code - Python files are automatically formatted after editing: ```bash # Claude Code uses Edit tool on auth.py # Hook automatically runs: # 1. ruff format auth.py # 2. ruff check --fix auth.py # 3. Custom Google-style docstring formatter # Result: Formatted, linted, and properly documented code ``` ## WebFetch to Tavily Hook Redirect slow WebFetch calls to faster Tavily extract (20-30s → 1-2s): ```python #!/usr/bin/env python3 import json import sys try: data = json.load(sys.stdin) url = data["tool_input"]["url"] except (KeyError, json.JSONDecodeError) as err: print(f"hook-error: {err}", file=sys.stderr) sys.exit(1) print(json.dumps({ "systemMessage": "WebFetch detected. AI is directed to use Tavily extract instead.", "hookSpecificOutput": { "hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": f"Please use mcp__tavily__tavily-extract with urls: ['{url}'] and extract_depth: 'advanced'" } }, separators=(',', ':'))) sys.exit(0) ``` Usage example: ```bash # Claude Code attempts: WebFetch(url="https://docs.anthropic.com/api") # Hook intercepts and suggests: # mcp__tavily__tavily-extract(urls=["https://docs.anthropic.com/api"], extract_depth="advanced") # Result: 15x faster content extraction with bot protection bypass ``` ## Git Workflow Confirmation Hooks Provide user confirmation dialogs before critical git operations: **git_commit_confirm.py** - Shows confirmation dialog before creating git commits: ```python #!/usr/bin/env python3 import json import sys import subprocess try: data = json.load(sys.stdin) command = data.get("tool_input", {}).get("command", "") if not command.startswith("git commit"): sys.exit(0) # Get staged files count result = subprocess.run( ["git", "diff", "--cached", "--name-only"], capture_output=True, text=True, check=False ) files = result.stdout.strip().split('\n') if result.stdout.strip() else [] # Extract commit message msg_start = command.find('-m "') + 4 if '-m "' in command else -1 msg = command[msg_start:command.find('"', msg_start)] if msg_start > 3 else "Unknown" print(json.dumps({ "systemMessage": f"Commit confirmation:\n\nMessage: {msg}\nFiles: {len(files)} staged\n\nProceed?", "hookSpecificOutput": { "hookEventName": "PreToolUse", "permissionDecision": "ask" } })) except Exception: pass sys.exit(0) ``` **gh_pr_create_confirm.py** - Shows confirmation dialog before creating GitHub pull requests: ```python #!/usr/bin/env python3 import json import sys try: data = json.load(sys.stdin) command = data.get("tool_input", {}).get("command", "") if not command.startswith("gh pr create"): sys.exit(0) # Extract PR title title_start = command.find('--title "') + 9 title_end = command.find('"', title_start) title = command[title_start:title_end] if title_start > 8 else "Unknown" body_preview = command[:200] + "..." if len(command) > 200 else command print(json.dumps({ "systemMessage": f"PR creation confirmation:\n\nTitle: {title}\n\nPreview: {body_preview}\n\nProceed?", "hookSpecificOutput": { "hookEventName": "PreToolUse", "permissionDecision": "ask" } })) except Exception: pass sys.exit(0) ``` ## Commit Manager Agent Intelligent git workflow agent that analyzes staged changes and creates optimal commits: ```markdown --- name: commit-manager description: Git commit expert that analyzes staged changes and creates semantic commits with updated documentation tools: Bash, BashOutput, Glob, Grep, Read, WebSearch, WebFetch, TodoWrite model: claude-opus-4-5-20251101 --- You are a Git commit workflow manager, an expert in version control best practices. Workflow: 1. Check all staged files: git diff --cached --name-only 2. Read code diffs: git diff --cached 3. Check README.md for outdated docs 4. Plan commit strategy (single or multi-commit) 5. Execute commits with semantic messages 6. Push to remote (if needed) Commit message format: - First line: {task-type}: brief description - Task types: feat, fix, refactor, docs, style, test, build - Focus on 'why' and 'what' rather than implementation details ``` Usage with slash command: ```bash # Stage files git add src/auth.py src/auth_test.py # Run commit manager /github-dev:commit-staged "Implement JWT authentication" # Agent analyzes and commits: # Commit 1: feat: implement user authentication system # - Add JWT token validation in auth.py:15-42 # - Create comprehensive test suite # - Update README with authentication setup # # Result: Clean, semantic commit with updated docs ``` ## PR Manager Agent End-to-end pull request workflow automation with branch creation and documentation updates: ```markdown --- name: pr-manager description: Complete PR workflow including branch creation, committing, and PR submission with inline source links tools: Bash, Glob, Grep, Read, WebSearch, WebFetch, TodoWrite, SlashCommand, mcp__github__list_pull_requests model: claude-opus-4-5-20251101 --- You are a Git and GitHub PR workflow automation specialist. Workflow: 1. Verify staged changes exist: git diff --cached --name-only 2. Check current branch: git branch --show-current 3. Create feature branch if on main: feature/brief-description 4. Commit changes via /commit-manager 5. Update documentation (README, docs) 6. Verify config/API changes with web search 7. Create PR with gh CLI: gh pr create -t "title" -b "body" -a @me 8. Include inline source links in PR description PR Format: - Brief summary (1 sentence) - Bullet points with inline markdown links: [file.py:15-42](file.py#L15-L42) - Code examples for significant changes - Source links for API/config updates ``` Usage with slash command: ```bash # Stage feature implementation git add src/feature.py tests/test_feature.py # Create PR /github-dev:create-pr "Add user dashboard feature" # Agent workflow: # 1. Creates branch: feature/add-user-dashboard # 2. Commits via commit-manager # 3. Updates README.md with feature docs # 4. Searches web for API reference links # 5. Creates PR: # Title: Add user dashboard feature # Body: # Add user dashboard with real-time updates # - Implement dashboard UI in [src/feature.py:15-42](src/feature.py#L15-L42) # - Add tests with 95% coverage # - API reference: [docs](https://example.com/api) # 6. Returns PR URL: https://github.com/user/repo/pull/123 ``` ## PR Reviewer Agent AI-powered code review agent that analyzes pull requests and provides actionable feedback: ```markdown --- name: pr-reviewer description: AI code reviewer that analyzes PRs with focus on best practices, security, and maintainability tools: Bash, Grep, Read, mcp__github__pull_request_read, mcp__github__get_pull_request_comments model: claude-opus-4-5-20251101 --- You are a senior code reviewer focusing on best practices, security, and maintainability. Workflow: 1. Fetch PR details via GitHub MCP 2. Analyze changed files for patterns and issues 3. Check for security vulnerabilities (SQL injection, XSS, etc.) 4. Review test coverage and documentation 5. Provide actionable feedback with line numbers ``` Usage: ```bash # Review PR #123 mcp__github__pull_request_read(owner="user", repo="repo", pull_number=123) # Agent provides detailed code review with security checks and best practices ``` ## Code Simplifier Agent Contextual pattern analyzer that ensures new code follows existing project conventions: ```markdown --- name: code-simplifier description: Pattern enforcer that analyzes existing codebase to ensure new code follows conventions tools: Glob, Grep, Read, WebSearch, WebFetch, TodoWrite, mcp__tavily__tavily-search, mcp__github__search_code model: claude-opus-4-5-20251101 --- You are a code pattern consistency enforcer that analyzes existing codebase patterns. Workflow: 1. When TodoWrite is used, trigger pattern analysis 2. Search for similar implementations using semantic search 3. Extract patterns: imports, function signatures, naming, base classes 4. Compare new code against existing patterns 5. Update todo plans or provide pattern-aligned suggestions Example patterns: - Import style: from utils.api_client import APIClient - API keys: config.get_api_key('service_name') - Base classes: inherit from BaseService with __init__(self, config: Dict) - Function signatures: async def get(self, key: str) -> Optional[str] ``` Auto-triggers after TodoWrite to maintain consistent codebase patterns. ## MCP Server Configuration Connect to 10+ external services with Model Context Protocol: ```json { "mcpServers": { "azure": { "command": "npx", "args": ["-y", "@azure/mcp@latest", "server", "start"] }, "context7": { "type": "stdio", "command": "npx", "args": ["-y", "@upstash/context7-mcp"] }, "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp", "headers": { "Authorization": "Bearer ghp_xxxxxxxxxxxx" } }, "linear": { "type": "sse", "url": "https://mcp.linear.app/sse" }, "mongodb": { "command": "npx", "args": [ "-y", "mongodb-mcp-server", "--connectionString", "mongodb://localhost:27017/myDatabase", "--readOnly" ] }, "paper-search": { "command": "docker", "args": ["run", "-i", "--rm", "mcp/paper-search"] }, "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] }, "slack": { "command": "npx", "args": ["-y", "@ubie-oss/slack-mcp-server@0.1.4"], "env": { "SLACK_BOT_TOKEN": "xoxb-...", "SLACK_USER_TOKEN": "xoxp-..." } }, "tavily": { "command": "npx", "args": ["-y", "tavily-mcp@latest"], "env": { "TAVILY_API_KEY": "tvly-xxxxxxxxxxxx" } }, "supabase": { "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.supabase.com/mcp?project_ref=abcd1234&read_only=true&features=database" ] } } } ``` Usage examples: ```bash # GitHub MCP - Get pull request info mcp__github__pull_request_read(owner="anthropics", repo="claude-code", pull_number=123) # Returns: PR title, body, status, commits, files changed # Tavily MCP - Search and extract web content mcp__tavily__tavily-search(query="Claude Code hooks documentation 2025", max_results=5) # Returns: 5 most relevant search results with snippets mcp__tavily__tavily-extract(urls=["https://docs.anthropic.com/hooks"], extract_depth="advanced") # Returns: Full page content with advanced extraction (1-2s vs 20-30s for WebFetch) # Context7 MCP - Get library documentation mcp__context7__resolve-library-id(library="react", version="18.3.1") # Returns: library_id for documentation lookup mcp__context7__get-library-docs(library_id="react-18.3.1", query="useState hook") # Returns: Up-to-date React documentation for useState # MongoDB MCP - Query database (READ-ONLY) mcp__mongodb__list_databases() # Returns: List of available databases mcp__mongodb__list_collections(database="myDatabase") # Returns: Collections in myDatabase with schema info # Slack MCP - Search messages mcp__slack__slack_search_messages(query="deployment status", channel="engineering") # Returns: Recent Slack messages matching query # Linear MCP - Project management mcp__linear__list_issues(team_id="...", status="in_progress") # Returns: Active Linear issues for team # Azure MCP - Resource management mcp__azure__list_resources(subscription_id="...", resource_group="...") # Returns: Azure resources in specified group # Paper Search MCP - Academic research mcp__paper_search__search(query="machine learning transformers", sources=["arxiv", "pubmed"]) # Returns: Research papers from multiple academic databases # Playwright MCP - Browser automation mcp__playwright__navigate(url="https://example.com") # Returns: Page loaded confirmation for web testing # Supabase MCP - Database operations mcp__supabase__list_tables() # Returns: All tables in Supabase project with schema info ``` ## Skills System Progressive disclosure skills that provide just-in-time documentation and examples: **Slack Usage Skill** - Search Slack messages and view channel history: ```markdown --- name: slack-usage description: Learn how to effectively use Slack MCP for message search and channel history --- # Slack MCP Usage ALWAYS use `mcp__slack__slack_search_messages` first for message searches. Only use `mcp__slack__slack_get_channel_history` when explicitly asked for channel history. ## Search Messages mcp__slack__slack_search_messages(query="deployment", channel="engineering", limit=10) ## Get Channel History mcp__slack__slack_get_channel_history(channel_id="C123ABC", limit=50) ``` **Tavily Usage Skill** - Web search and content extraction workflows: ```markdown --- name: tavily-usage description: Learn web search and content extraction with Tavily MCP --- # Tavily MCP Usage Use `mcp__tavily__tavily-search` for discovery/broad queries. Use `mcp__tavily__tavily-extract` for specific URL content with extract_depth="advanced". ## Search mcp__tavily__tavily-search(query="Claude Code plugins 2025", max_results=5) ## Extract mcp__tavily__tavily-extract(urls=["https://docs.anthropic.com"], extract_depth="advanced") ``` **PR Workflow Skill** - Complete PR creation workflow: ```markdown --- name: pr-workflow description: Complete PR creation workflow with branch management and semantic commits --- # PR Workflow 1. Stage changes: git add 2. Create PR: /github-dev:create-pr "Feature description" 3. Agent creates branch, commits via commit-manager, updates docs, creates PR ``` ## Slash Commands Custom productivity commands that invoke specialized agents: ```bash # Commit staged files with context /github-dev:commit-staged "Fix authentication bug" # Create pull request with context /github-dev:create-pr "Add user dashboard feature" # Update PR summary for PR #123 /github-dev:update-pr-summary 123 # Clean up local branches deleted from remote /github-dev:clean-gone-branches # Explain project architecture pattern /general-dev:explain-architecture-pattern "authentication system" # Sync CLAUDE.md from GitHub repository /claude-tools:sync-claude-md # Load CLAUDE.md context in long conversations /claude-tools:load-claude-md # Load frontend design skill from Anthropic /claude-tools:load-frontend-skill # Sync permissions allowlist from repository /claude-tools:sync-allowlist # Create new plugin with guided workflow /plugin-dev:create-plugin # Load all plugin development skills /plugin-dev:load-skills ``` ## Plugin Development The plugin-dev plugin provides complete toolkit for building Claude Code plugins: **Skills:** - `hook-development` - Create hooks with prompt-based API - `mcp-integration` - Configure MCP servers in plugins - `plugin-structure` - Plugin layout and auto-discovery - `plugin-settings` - Per-project configuration - `command-development` - Create custom slash commands - `agent-development` - Build autonomous agents - `skill-development` - Create reusable skills with progressive disclosure **Agents:** - `agent-creator` - AI-assisted agent generation - `plugin-validator` - Validate plugin structure and manifest - `skill-reviewer` - Improve skill quality and adherence **Commands:** - `/plugin-dev:create-plugin` - 8-phase guided plugin creation workflow - `/plugin-dev:load-skills` - Load all plugin development skills at once **Hooks:** - `validate_skill.py` - Validates SKILL.md structure on Write - `validate_mcp_hook_locations.py` - Validates MCP/hook file locations - `validate_plugin_paths.py` - Validates plugin.json paths reference - `validate_plugin_structure.py` - Validates plugin directory structure - `sync_marketplace_to_plugins.py` - Syncs marketplace.json to plugin.json files ## Integration Workflow Complete development workflow combining all components: ```bash # 1. Setup environment /plugin marketplace add fcakyon/claude-codex-settings /plugin install ultralytics-dev@fcakyon-claude-plugins /plugin install github-dev@fcakyon-claude-plugins /plugin install websearch-tools@fcakyon-claude-plugins /plugin install general-dev@fcakyon-claude-plugins # 2. Implement feature # Claude Code edits src/api.py # Hooks automatically run: # - Python formatting (ruff + custom docstring formatter) # - Prettier formatting for config.json # - Whitespace cleanup # - Git confirmation dialogs ready # Result: Production-ready formatted code # 3. Commit changes git add src/api.py config.json README.md /github-dev:commit-staged "Add REST API endpoint" # Agent creates semantic commits with updated docs # Confirmation dialog shows staged files and message # 4. Create pull request /github-dev:create-pr "Add user API endpoint" # Agent workflow: # - Creates feature branch # - Commits via commit-manager # - Updates documentation # - Verifies API references with Tavily MCP # - Creates PR with inline source links: [src/api.py:15-42](src/api.py#L15-L42) # - Confirmation dialog shows PR details # - Returns: https://github.com/user/repo/pull/456 # 5. Query external services # GitHub: Check PR status mcp__github__pull_request_read(owner="user", repo="repo", pull_number=456) # Tavily: Find related documentation mcp__tavily__tavily-search(query="REST API best practices 2025") # Context7: Get framework docs mcp__context7__get-library-docs(library_id="fastapi-0.115.0", query="endpoint validation") # MongoDB: Query production database (READ-ONLY) mcp__mongodb__list_collections(database="production") # Slack: Search team discussions mcp__slack__slack_search_messages(query="API deployment", channel="engineering") # Azure: Check deployment status mcp__azure__list_resources(subscription_id="...", resource_group="prod") # Paper Search: Find relevant research mcp__paper_search__search(query="API design patterns", sources=["arxiv"]) # Desktop notification when complete # Result: Zero manual formatting, consistent commits, automated PR workflow ``` This configuration system eliminates 95% of manual code quality tasks while maintaining enterprise standards. The hook system achieves zero CI formatting by handling Python (ruff + custom docstring formatter), JavaScript/TypeScript (prettier), CSS/JSON/YAML (prettier), Markdown (prettier), and shell scripts (prettier-plugin-sh) automatically. Git workflow confirmation dialogs provide safety for critical operations while desktop notifications keep you informed of task completion. OpusPlan mode with Opus 4.5 provides advanced planning capabilities for complex tasks. All components gracefully degrade when tools aren't available, never disrupting Claude Code operations. The agent system transforms git workflows from manual multi-step processes into single-command operations. The pr-reviewer agent adds AI-powered code review capabilities with security analysis. The code-simplifier agent ensures all new code follows existing project patterns, maintaining consistency across the codebase. The skills system provides progressive disclosure of documentation, showing relevant examples only when needed. Combined with MCP servers, it creates a unified development environment where AI assistants have direct access to GitHub, Azure, databases, web search, academic papers, browser automation, Slack, project management tools, and up-to-date library documentation - all while maintaining consistent code quality and semantic version control practices through intelligent workflow automation.