From cook
Explains code behavior, logic flow, and purpose in detail. Useful for understanding unfamiliar code, algorithms, or architecture.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cook:explain-codeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
コードの動作を詳しく解説します。
コードの動作を詳しく解説します。
# ファイル内容を表示して Claude に依頼
cat <file>
「このコードの動作を解説して」
# Rust の所有権を理解
cat main.rs
「Rust の所有権とライフタイムの観点から解説して」
# アルゴリズムの解説
grep -A 50 "quicksort" sort.rs
「このソートアルゴリズムの仕組みと計算量を解説して」
# デザインパターンの説明
cat factory.rs
「使用されているデザインパターンとその利点を説明して」
# 初心者向け解説
cat complex_function.py
「このコードを初心者にもわかりやすく 1 行ずつ解説して」
# パフォーマンス分析
cat algorithm.rs
「このコードのパフォーマンス上の問題点と改善案を提示して」
# 図解付き説明
cat state_machine.js
「このコードの処理の流れを ASCII アートの図解付きで説明して」
# セキュリティレビュー
cat auth_handler.go
「このコードのセキュリティ上の懸念点を指摘して」
# 複雑なロジックの解説
cat recursive_parser.rs
「この再帰パーサーの動作を以下の観点で解説して:
1. 全体的な処理フロー
2. 各関数の役割と責任
3. エッジケースの処理
4. 改善可能な点」
# 非同期処理の解説
cat async_handler.ts
「この非同期処理について以下を解説して:
1. Promise チェーンの流れ
2. エラーハンドリングの仕組み
3. 並行処理の有無
4. デッドロックの可能性」
# アーキテクチャの説明
ls -la src/ && cat src/main.rs src/lib.rs
「このプロジェクトのアーキテクチャとモジュール構成を解説して」
コード解説では、単に動作を説明するだけでなく、なぜそのような実装になっているか、どのような利点があるか、潜在的な問題点は何かといった深い洞察も提供します。
npx claudepluginhub wasabeef/claude-code-cookbook --plugin cookExplains code behavior in detail, covering logic, architecture, performance, security, and design patterns. Activated by phrases like 'explain this code' or 'what does this function do?'.
Explica o funcionamento do código em detalhe, incluindo lógica, padrões de design, análise de performance e revisão de segurança.
Explains code behavior in detail, covering logic, flow, design patterns, and potential issues. Useful for understanding unfamiliar code or reviewing for performance and security.