optimizing-claude-code
Optimizing Claude Code
Default: Audit-only. Present findings and await approval before modifying files.
Workflow
1. Run Audit
Execute from repo root:
python scripts/audit_repo.py --root . --include-user-scope
Analyzes:
- Repository scale and directory hotspots
- CLAUDE.md files (discovery, quality, @imports)
- Settings (user/project/local scopes)
- MCP configurations
- Skills and subagents
2. Generate Report
Structure output as:
Executive Summary (5 bullets max)
- Readiness assessment
- Key strengths
- Critical gaps
- Priority actions
Repository Profile
- File count and scale (Small/Medium/Large)
- Primary language/framework
Memory Files Assessment
- Per-file metrics
- @import validation
- Content quality
- Staleness indicators
Settings & Configuration
- Permissions analysis
- MCP server inventory
- Skills/subagents discovered
Issues by Priority
- P0: Blocks agentic work
- P1: High impact
- P2: Nice-to-have
Recommendations
- Specific suggested edits
- Reference best practices
- Do NOT apply without approval
3. Apply Changes (If Requested)
When asked to implement:
- Confirm which changes
- Edit incrementally
- Show diffs
- Re-audit to verify
Large Repository Guidance
When file count exceeds 3000, include scaling recommendations:
- Vanilla context becomes unreliable at scale
- Consider context engines or retrieval layers
- Strategic CLAUDE.md placement becomes critical
- Focus on navigation aids over exhaustive documentation
Reference Files
- best-practices.md: Environment setup, CLAUDE.md structure, prompting patterns, workflows, safety
- rubric.md: CLAUDE.md scoring criteria (0-16 scale), anti-patterns, templates
- checklist.md: Step-by-step audit workflow, prioritization guide
More from codealive-ai/agents-reflection-skills
skills-management
Search, find, discover, install, remove, update, review, list, and move skills for AI coding agents. Use when user asks "find a skill for X", "search for a skill", "is there a skill for X", "install skill", "remove skill", "update skills", "list skills", "review skill quality", "move skill", "check for updates", or "how do I do X" where X might have an existing skill. This is THE tool for skill discovery and ecosystem search.
7hooks-management
Manage hooks and automation for coding agents (Claude Code, Codex CLI). Use when users want to add, list, remove, update, or validate hooks. Triggers on requests like "add a hook", "create a hook that...", "list my hooks", "remove the hook", "validate hooks", or any mention of automating agent behavior with shell commands.
6mcp-management
Search, install, configure, update, and remove MCP servers across coding agents (Claude Code, Cursor, VS Code, Claude Desktop, Gemini CLI, Codex, Goose, Zed, and more). Supports multi-agent installation via npx add-mcp, the official MCP registry, and direct config editing.
6subagents-management
Create, edit, list, move, and delete subagents and skills for coding agents (Claude Code, Codex CLI). Manage AGENTS.md instructions, custom subagent definitions, and skill packages across user and project scopes.
2settings-management
View and configure settings for coding agents (Claude Code, Codex CLI, and others). Covers JSON settings for Claude Code and TOML config for Codex CLI, including permissions, sandbox, model selection, and profiles.
2plugins-management
Create, publish, delete, and submit Claude Code plugins. Use when user wants to (1) create a new plugin with proper structure, (2) create or configure a plugin marketplace, (3) publish plugins to GitHub/GitLab, (4) delete/uninstall plugins, (5) validate plugin structure, or (6) prepare and submit plugins to the official Anthropic directory.
2