with one click
claude-code-expert
// Expert on Claude Code CLI, skills, commands, hooks, plugins, MCP, settings, and workflows. Triggers on claude code, cli, skill, command, hook, plugin, mcp, slash command, settings
// Expert on Claude Code CLI, skills, commands, hooks, plugins, MCP, settings, and workflows. Triggers on claude code, cli, skill, command, hook, plugin, mcp, slash command, settings
Run all 8 cleanup skills in sequence: unused ā cycles ā dedupe ā types ā weak-types ā defensive ā legacy ā slop. Each step verifies before the next runs; halts on first failure. Produces one consolidated report. Use when the user asks to clean up the whole codebase, run all cleanup skills, do a full code-quality pass, or sweep the repo. Example queries ā "clean up the whole codebase", "run a full code-quality pass", "sweep this repo", "do all the cleanups in order".
Detect and untangle circular dependencies. Runs madge/skott (TS), pycycle (Py), or compiler-only checks (Go/Rust). Auto-fixes leaf-extractable cycles; reports core cycles for human review. Use when the user asks to find circular imports, fix dependency cycles, or untangle module graph. Example queries ā "find circular imports", "fix dependency cycles", "untangle our module graph", "why is madge complaining".
Detect duplicated code blocks and refactor to DRY where it reduces complexity. Runs jscpd (multi-language), filters by signal-to-noise, and auto-extracts only token-identical blocks ā„30 LOC. Use when the user asks to deduplicate, DRY up, find copy-paste, or consolidate repeated logic. Example queries ā "DRY this up", "find copy-paste in the codebase", "consolidate repeated logic", "where are the duplicated blocks".
Remove pointless try/catch blocks and defensive guards that hide errors or add no value. Preserves catches at true system boundaries (HTTP handlers, CLI entry, message consumers). Use when the user asks to remove try/catch, fix error hiding, clean up defensive code, or stop swallowing errors. Example queries ā "remove pointless try/catch", "we're swallowing errors", "stop hiding bugs in catch blocks", "clean up the defensive code".
Find and remove deprecated, legacy, and fallback code paths with zero callers. Verifies callers via repo grep + LSP before deletion. Removes unreachable fallback branches. Use when the user asks to remove deprecated code, clean up legacy paths, drop fallbacks, or simplify code branches. Example queries ā "remove the deprecated API", "drop the v1 fallback", "this code is marked legacy, kill it", "simplify these branches".
Strip AI slop, narration comments, restated-code comments, in-motion notes, and stub markers. Preserves comments that explain WHY (workarounds, invariants, surprising behavior). Comment-only changes ā never touches code logic. Use when the user asks to remove AI slop, clean up comments, strip narration, or remove unhelpful comments. Example queries ā "remove the AI slop", "strip the narration comments", "clean up unhelpful comments", "delete the comments that just restate the code".
| name | claude-code-expert |
| description | Expert on Claude Code CLI, skills, commands, hooks, plugins, MCP, settings, and workflows. Triggers on claude code, cli, skill, command, hook, plugin, mcp, slash command, settings |
| allowed-tools | Read, Grep, Glob |
| model | sonnet |
Provide expert guidance on Claude Code CLI features, including skills, commands, hooks, plugins, MCP integration, and configuration based on official Claude Code documentation.
Auto-invoke when users mention:
Documentation is stored in Markdown format (multiple languages):
docs/docs/INDEX.md.md files_en suffix, e.g., docs_en_skills.mdWhen a user asks about Claude Code:
Common topics:
- Getting started / installation
- Creating skills
- Writing slash commands
- Implementing hooks
- Using MCP plugins
- Configuration (settings.json, CLAUDE.md)
- Agents and sub-agents
- Memory and context management
- Sandboxing and security
- Headless/CI mode
- IDE integration (VS Code, JetBrains)
Use Grep to find relevant English docs:
# Search for specific topics (focus on English docs)
Grep "skill" docs/ --output-mode files_with_matches --glob "*_en_*.md"
Grep "hook|validation" docs/ --output-mode content -C 3 --glob "*_en_*.md"
Check the INDEX.md for navigation:
Read docs/INDEX.md
Read the most relevant English documentation files:
# Prefer English (_en) versions
Read docs/code_claude_com/docs_en_skills.md
Read docs/code_claude_com/docs_en_slash-commands.md
Structure your response:
.claude/ directory structureUser: "How do I create a skill in Claude Code?"
1. Search: Grep "skill" docs/ --glob "*_en_*.md"
2. Read: docs_en_skills.md
3. Answer:
- Explain skill.md frontmatter format
- Show directory structure
- Provide skill template
- Explain trigger keywords
- Mention allowed-tools
User: "How do I create a post-edit hook?"
1. Search: Grep "hook|PostToolUse" docs/ --glob "*_en_*.md"
2. Read: docs_en_hooks.md, docs_en_hooks-guide.md
3. Answer:
- Explain hook types (PostToolUse, etc.)
- Show hook file structure
- Demonstrate settings.json configuration
- Provide validation example
User: "How do I use MCP plugins with Claude Code?"
1. Search: Grep "mcp|plugin" docs/ --glob "*_en_*.md"
2. Read: docs_en_mcp.md, docs_en_plugins.md
3. Answer:
- Explain MCP (Model Context Protocol)
- Show plugin installation
- Demonstrate configuration
- List available plugins
Core Components:
Features:
Directory Structure:
.claude/
āāā skills/ # Auto-invoked skills
āāā commands/ # Slash commands
āāā hooks/ # Validation hooks
āāā docs/ # Documentation
āāā settings.json # Configuration
Configuration Files:
.claude/settings.json - Claude Code settingsCLAUDE.md - Project-specific instructionsskill.md - Skill definition (with frontmatter)command-name.md - Command workflow_en docs when availableAfter answering, suggest: