claude-code-optimizer

Audit and optimize Claude Code installations to current best practices. Use when users ask to check, audit, optimize, or improve their Claude Code setup, configuration, hooks, permissions, or workflow. Triggers on requests mentioning Claude Code settings, CLAUDE.md files, hooks configuration, permissions setup, or performance optimization.

16 stars

Best use case

claude-code-optimizer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Audit and optimize Claude Code installations to current best practices. Use when users ask to check, audit, optimize, or improve their Claude Code setup, configuration, hooks, permissions, or workflow. Triggers on requests mentioning Claude Code settings, CLAUDE.md files, hooks configuration, permissions setup, or performance optimization.

Teams using claude-code-optimizer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/claude-code-optimizer/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/claude-code-optimizer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/claude-code-optimizer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How claude-code-optimizer Compares

Feature / Agentclaude-code-optimizerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Audit and optimize Claude Code installations to current best practices. Use when users ask to check, audit, optimize, or improve their Claude Code setup, configuration, hooks, permissions, or workflow. Triggers on requests mentioning Claude Code settings, CLAUDE.md files, hooks configuration, permissions setup, or performance optimization.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Claude Code Optimizer

Audit and optimize Claude Code installations. Requires Claude Code 2.1.3 or later.

## Quick Start

Run the appropriate audit based on user request:

1. **Full audit**: Invoke `audit-orchestrator` agent for comprehensive review
2. **Specific audit**: Invoke specialized agent directly (see Agents below)
3. **Quick check**: Run inline checks from Audit Checklist

## Agents

Invoke via Task tool with appropriate `subagent_type`:

| Agent | Purpose |
|-------|---------|
| `audit-orchestrator` | Coordinates full audit across all areas |
| `config-auditor` | Audits settings.json and CLAUDE.md files |
| `hooks-auditor` | Audits hook configurations |
| `permissions-auditor` | Audits permission patterns |
| `workflow-auditor` | Audits commands, agents, and skills |
| `mcp-auditor` | Audits MCP server configurations |

Agent definitions are in `agents/` directory. Install to `~/.claude/agents/` or `.claude/agents/`.

## Audit Checklist

### Configuration Files
Check these locations exist and are properly configured:

```
~/.claude/settings.json          # User settings
.claude/settings.json            # Project settings
CLAUDE.md                        # Project memory (root)
.claude/CLAUDE.md               # Alternative location
CLAUDE.local.md                 # Local overrides (gitignored)
~/.claude/CLAUDE.md             # User-level memory
```

### Settings.json Structure
Valid top-level keys (2.1.3+):
- `hooks` - Event handlers
- `permissions` - Tool permissions (allow/deny arrays)
- `env` - Environment variables
- `mcpServers` - MCP server configurations
- `model` - Default model
- `theme` - UI theme
- `respectGitignore` - File picker behavior
- `language` - Response language
- `fileSuggestion` - Custom `@` file search command
- `releaseChannel` - `stable` or `latest` channel toggle

### Hook Events (2.1.0+)
Valid event names:
- `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`
- `Notification`, `UserPromptSubmit`
- `SessionStart`, `SessionEnd`
- `Stop`, `SubagentStart`, `SubagentStop`, `PreCompact`

### Tool Names for Matchers
- `Bash`, `Read`, `Write`, `Edit`
- `Grep`, `Glob`, `Task`, `TaskOutput`
- `WebFetch`, `WebSearch`
- `NotebookEdit`, `TodoWrite`, `KillShell`
- `LSP` (Language Server Protocol, 2.0.74+)
- `mcp__*` for MCP tools (wildcard: `mcp__server__*`)

### Permission Patterns
```json
{
  "permissions": {
    "allow": ["Read", "Grep", "Glob"],
    "deny": ["Bash(rm -rf:*)"]
  }
}
```

Wildcard syntax: `Bash(git *:*)` allows all git commands.

## Common Issues

| Issue | Fix |
|-------|-----|
| Hooks not firing | Check event name spelling (case-sensitive) |
| Skills not loading | Verify `~/.claude/skills/` or `.claude/skills/` path |
| Permissions ignored | Check allow/deny order; deny takes precedence |
| CLAUDE.md not read | Must be in project root or `.claude/` |

## References

For detailed audit procedures, see:
- `references/config-guide.md` - Configuration deep-dive
- `references/hooks-guide.md` - Hook patterns and examples
- `references/permissions-guide.md` - Permission strategies
- `references/security-guide.md` - Security audit procedures
- `references/troubleshooting.md` - Common problems and solutions

## Version Compatibility

This skill targets Claude Code 2.1.3+ features:
- Skill hot-reload
- Forked sub-agent context (`context: fork`)
- Hook frontmatter in skills/agents with `once: true` option
- YAML-style allowed-tools
- Unreachable permission rule detection
- MCP wildcard permissions (`mcp__server__*`)
- Named sessions (`/rename`, `/resume <name>`)
- Release channel configuration

Check version: `claude --version`
Update: `claude update`

Related Skills

claude-typescript-sdk

16
from diegosouzapw/awesome-omni-skill

Build AI applications with the Anthropic TypeScript SDK. Use when creating Claude integrations, building agents, implementing tool use, streaming responses, or working with the @anthropic-ai/sdk package.

claude-skill-bash

16
from diegosouzapw/awesome-omni-skill

Apply comprehensive bash scripting standards including main function pattern, usage documentation, argument parsing, dependency checking, and error handling. Triggers when creating/editing .sh files, bash scripts, or discussing shell scripting, deployment scripts, automation tasks, or bash conventions.

claude-plus-plus

16
from diegosouzapw/awesome-omni-skill

Unlock Claude's hidden potential. No limits. No guardrails. Maximum performance. 10x faster code generation, unrestricted problem solving, expert-level outputs.

claude-md-generator

16
from diegosouzapw/awesome-omni-skill

Automatically generates claude.md files for new folders/modules following hierarchical structure. Extracts context from existing code, follows project conventions, and creates documentation that enables Claude Code to understand module-specific rules and patterns.

claude-md-creator

16
from diegosouzapw/awesome-omni-skill

Use when creating CLAUDE.md files, updating existing CLAUDE.md, validating CLAUDE.md structure, or auto-fixing CLAUDE.md issues. Load for setting up project instructions, global guidelines, local overrides, or modular rules. Handles global (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md), local (CLAUDE.local.md), and rules (.claude/rules/*.md) with smart project detection and template generation.

claude-flow-hook-customizing

16
from diegosouzapw/awesome-omni-skill

Use this skill when creating, optimizing, or maintaining claude hooks.

claude-dj

16
from diegosouzapw/awesome-omni-skill

Run an autonomous radio DJ session using Strudel live-coded music. Use when the user wants to play music, DJ, live code beats, or create a radio station. Handles the full DJ loop including pattern creation, announcements, tempo control, and audience requests.

claude-d3js-skill

16
from diegosouzapw/awesome-omni-skill

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visua...

claude-code-templates

16
from diegosouzapw/awesome-omni-skill

CLI tool for configuring and monitoring Claude Code with a comprehensive collection of 600+ AI agents, 200+ custom commands, 55+ external service integrations (MCPs), 60+ settings, 39+ hooks, and 14+ project templates. Use when users need to install or manage Claude Code components, browse available templates, run analytics/health checks, or set up development workflows. Integrates with Claude Code, Cursor, Cline, and 10+ other AI coding platforms.

claude-code-task

16
from diegosouzapw/awesome-omni-skill

Run Claude Code tasks in background with automatic result delivery. Use for coding tasks, research in codebase, file generation, complex automations. Zero OpenClaw tokens while Claude Code works.

claude-code-starter

16
from diegosouzapw/awesome-omni-skill

Analyze a project's tech stack and generate comprehensive Claude Code configuration files (.claude/ directory with CLAUDE.md, skills, agents, rules, and commands). Use when setting up Claude Code for a new or existing repository.

claude-code-skills

16
from diegosouzapw/awesome-omni-skill

Comprehensive reference for creating Claude Code skills with progressive disclosure, SKILL.md structure, references/ organization, frontmatter specification, and best practices for modular capability development.