What problem does it solve?
Understanding complex or unfamiliar code can be a significant barrier for new team members, during code reviews, or when creating documentation. This skill provides clear, accessible explanations of code functionality at various levels, from entire files to specific functions and architectural patterns.
Core Features & Use Cases
- File Explanation: Summarizes a file's purpose, exports, dependencies, and key concepts.
- Function/Class Explanation: Provides detailed explanations of specific functions or classes, including parameters, return values, complexity, methods, and attributes.
- Pattern Explanation: Describes common code patterns (e.g., singleton, mixin, dependency injection), their use cases, pros, and cons.
- Use Case: A
new team member needs to understand the jwt.py authentication module. They use this skill to get a high-level summary of the file, detailed explanations of key functions like validate_jwt, and an overview of the JWT pattern, accelerating their onboarding.
Quick Start
# Explain the purpose and structure of a code file
python scripts/explainer.py explain-file coffee_maker/auth/jwt.py
# Get a detailed explanation of a specific function
python scripts/explainer.py explain-function coffee_maker/auth/jwt.py validate_jwt
# Understand a common code pattern
python scripts/explainer.py explain-pattern singleton