Claude Code Cookbook

April 14, 2026 · View on GitHub

🏠 Home | 🇺🇸 English | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇨🇳 简体中文 | 🇹🇼 繁體中文 | 🇪🇸 Español | 🇫🇷 Français | 🇧🇷 Português

A collection of settings to make Claude Code more useful.

It automatically proceeds with work without unnecessary confirmations, allowing you to focus on what you really want to do. Claude Code judges and executes common tasks like code fixes, test runs, and documentation updates.

Key Features

You can customize Claude Code's behavior with three features:

  • Commands: Custom commands starting with /
  • Roles: Role settings to answer from an expert's perspective
  • Hooks: Automatically execute scripts at specific times

Feature List

Commands

Stored as Markdown files in the /commands directory. Execute by entering the filename after /.

CommandDescription
/analyze-dependenciesAnalyze project dependencies and visualize circular dependencies and structural issues.
/analyze-performanceAnalyze application performance issues and propose improvements from a technical debt perspective.
/check-factCheck the accuracy of given information by referring to the project's codebase and documentation.
/pr-checksMonitor GitHub Actions CI status and track until completion.
/check-promptReview the current prompt content and suggest improvements.
/commit-messageGenerate only commit messages based on changes.
/context7Perform context management using Context7 MCP.
/design-patternsPropose and review implementations based on design patterns.
/explain-codeClearly explain the functionality and logic of selected code.
/fix-errorSuggest code fixes based on error messages.
/multi-roleCombine multiple roles to analyze the same target in parallel and generate an integrated report.
/planActivate implementation planning mode before implementation and formulate detailed implementation strategies.
/pr-auto-updateAutomatically update Pull Request content (description, labels).
/pr-createEnable efficient Pull Request workflows with automatic PR creation based on Git change analysis.
/pr-fixEfficiently respond to Pull Request review comments and aim for root solutions with a 3-stage error analysis approach.
/pr-issueDisplay a prioritized list of open Issues in the current repository.
/pr-listDisplay a prioritized list of open PRs in the current repository.
/pr-reviewEnsure code quality and architectural soundness through systematic review of Pull Requests.
/refactorPerform safe, step-by-step code refactoring and evaluate adherence to SOLID principles.
/role-debateHave multiple roles debate specific topics.
/role-helpDisplay a list and description of available Roles.
/roleAct as the specified role.
/screenshotCapture and analyze screen screenshots
/search-geminiPerform web searches using Gemini.
/semantic-commitDivide large changes into meaningful minimum units and commit sequentially with semantic commit messages.
/sequential-thinkingUse Sequential Thinking MCP to think through complex problems step by step and reach conclusions.
/show-planDisplay the current execution plan.
/smart-reviewPerform advanced reviews to improve code quality.
/specCreate detailed specifications step by step from requirements, following Kiro's spec-driven development.
/style-ai-writingDetect and correct unnatural AI-generated text.
/taskLaunch dedicated agents to autonomously execute complex search, research, and analysis tasks.
/tech-debtAnalyze project technical debt and create prioritized improvement plans.
/ultrathinkPerform step-by-step structured thinking processes for complex issues and important decisions.
/update-dart-docSystematically manage DartDoc comments in Dart files and maintain high-quality Japanese documentation.
/update-doc-stringUniquely manage and update documentation strings supporting multiple languages.
/update-flutter-depsSafely update dependencies in Flutter projects.
/update-node-depsSafely update dependencies in Node.js projects.
/update-rust-depsSafely update dependencies in Rust projects.

Roles

Defined in Markdown files in the agents/roles/ directory. Give Claude an expert perspective for more accurate answers.

Each role can also be executed independently as a sub-agent. Using the --agent option allows parallel execution of large-scale analysis and specialized processing without interfering with the main conversation context.

RoleDescription
/role analyzerAnalyze code and architecture as a system analysis expert.
/role architectReview and propose designs as a software architect.
/role backendProvide advice on API design, microservices, cloud-native, and serverless architecture as a backend development expert.
/role frontendAdvise on UI/UX and performance as a frontend expert.
/role mobileAnswer based on iOS/Android best practices as a mobile app development expert.
/role performanceSuggest improvements to speed and memory usage as a performance optimization expert.
/role qaReview from a test planning and quality assurance perspective as a QA engineer.
/role reviewerEvaluate code from readability and maintainability perspectives as a code reviewer.
/role securityPoint out vulnerabilities and security risks as a security expert.

Sub-agent Execution Examples

# Normal mode (execute in main context)
/cook-en:role security
"Security check for this project"

# Sub-agent mode (execute in independent context)
/cook-en:role security --agent
"Perform a comprehensive security audit of the project"

# Parallel analysis with multiple roles
/cook-en:multi-role security,performance --agent
"Comprehensively analyze the system's security and performance"

Hooks

Configure in settings.json to automate development work.

Execution ScriptEventDescription
preserve-file-permissions.shPreToolUse / PostToolUseSave original permissions before file editing and restore after editing. Prevent Claude Code from changing permissions.

Development Flow and Command Usage Guide

Example of Command Utilization in General Development Flow

flowchart TB
    Start([Task Confirmation]) --> PRList["/cook-en:pr-list<br/>Open PR List"]
    Start --> PRIssue["/cook-en:pr-issue<br/>Open Issue List"]

    PRList --> TaskType{Type?}
    PRIssue --> TaskType

    TaskType -->|New Feature| Plan["/cook-en:spec<br/>Requirements Definition & Design"]
    TaskType -->|Bug Fix| Fix["/cook-en:fix-error<br/>Error Analysis"]
    TaskType -->|Refactoring| Refactor["/cook-en:refactor<br/>Improvement"]
    TaskType -->|Review| Review["/cook-en:pr-review<br/>Review"]

    Plan --> Design["/cook-en:role architect<br/>/cook-en:role-debate<br/>Design Consultation"]
    Design --> Implementation[Implementation & Testing]
    Fix --> Implementation
    Refactor --> Implementation
    Review --> Implementation

    Implementation --> Check["/cook-en:smart-review<br/>Quality Check"]
    Check --> Commit["/cook-en:semantic-commit<br/>Commit by Purpose"]
    Commit --> PR["/cook-en:pr-create<br/>Automatic PR Creation"]
    PR --> CI["/cook-en:pr-checks<br/>CI Status Check"]

    CI --> Status{Any Issues?}
    Status -->|Yes| Feedback["Fix Response<br/>/cook-en:pr-fix<br/>/cook-en:fix-error"]
    Status -->|No| End([Completion])

    Feedback --> Implementation

    classDef commandBox fill:#e0f2fe,stroke:#0369a1,stroke-width:2px,rx:5,ry:5,color:#0c4a6e
    classDef processBox fill:#f0f9ff,stroke:#0ea5e9,stroke-width:1px,rx:5,ry:5,color:#075985
    classDef decisionBox fill:#fef3c7,stroke:#f59e0b,stroke-width:2px,rx:5,ry:5,color:#78350f
    classDef startEnd fill:#86efac,stroke:#22c55e,stroke-width:2px,rx:20,ry:20,color:#14532d

    class PRList,PRIssue,Plan,Fix,Refactor,Review,Design,Check,CI,Commit,PR,Feedback commandBox
    class Implementation processBox
    class TaskType,Status decisionBox
    class Start,End startEnd

    %%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#e0f2fe', 'primaryTextColor':'#0c4a6e', 'primaryBorderColor':'#0369a1', 'lineColor':'#64748b', 'secondaryColor':'#f0f9ff', 'background':'#ffffff', 'mainBkg':'#ffffff', 'fontSize': '14px'}}}%%

Installation

Step 1: Add the Marketplace

First, add this repository as a plugin marketplace:

/plugin marketplace add wasabeef/claude-code-cookbook

Step 2: Install the English Plugin

Next, install the English version plugin:

/plugin install cook-en@claude-code-cookbook

This command installs the English version of Commands and Roles.

Usage

After installation, commands and agents are called with the cook-en: prefix:

Running Commands

# Execute with prefix
/cook-en:check-fact

# Use tab completion
/cook-en:

Calling Agents

# Search for agents starting with @
@agent-cook-en:frontend

# Can also use via role command
/cook-en:role frontend

Note: The plugin name is automatically added as a prefix. This prevents name conflicts when multiple language plugins are installed simultaneously.

Customization

  • Add commands: Simply add .md files to commands/
  • Add roles: Simply add .md files to agents/roles/
  • Edit hooks: Edit settings.json to change automation processes