brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
code-summarizerGenerate concise summaries of source code at multiple scales. Use when users ask to summarize, explain, or understand code - whether it's a single function, a class, a module, or an entire codebase. Handles function-level code by explaining intention and core logic, and large codebases by providing high-level overviews with drill-down capabilities for speci…
Independent GitHub snapshot · Automated classification · Original documentation governs
Generate clear, concise summaries of source code at any scale - from individual functions to entire codebases.
This skill helps analyze and summarize code by adapting the level of detail to the code's scale:
User provides code → Assess scale
├─ Small-scale (< 200 lines, single file/function)
│ └─ Generate focused summary
│
└─ Large-scale (> 200 lines, multiple files/modules)
├─ Generate high-level overview
├─ List main modules/components
└─ Prompt user to select specific parts for detailed analysis
For functions, classes, or small files (typically < 200 lines), provide a focused summary that includes:
Purpose Statement (1-2 sentences)
Core Logic (2-4 bullet points)
Key Details
Notable Patterns (if applicable)
## Summary
**Purpose**: This function validates user email addresses and normalizes them to lowercase format before database storage.
**Core Logic**:
- Uses regex pattern matching to validate email format (RFC 5322 compliant)
- Strips whitespace and converts to lowercase for consistency
- Checks against a blocklist of disposable email domains
- Logs validation failures for security monitoring
**Key Details**:
- Input: `email` (string) - raw email address from user input
- Returns: `normalized_email` (string) or raises `ValidationError`
- Side effect: Logs to `security.log` on validation failure
- Dependencies: `re`, `logging`, custom `EmailBlocklist` class
**Notable Patterns**:
- Uses early return pattern for validation failures
- Implements defensive programming with input sanitization
For modules, packages, or entire repositories (typically > 200 lines or multiple files), use a hierarchical approach:
Provide a concise overview that includes:
Project Purpose (2-3 sentences)
Architecture Overview
Main Components (list with brief descriptions)
Entry Points
After providing the overview, prompt the user to select specific areas for detailed analysis:
## Detailed Analysis Available
I can provide more detailed summaries of specific components:
1. **[Component Name]** - [Brief description]
2. **[Component Name]** - [Brief description]
3. **[Component Name]** - [Brief description]
...
Which component(s) would you like me to analyze in detail? You can:
- Select one or more by number
- Ask about specific functionality (e.g., "How does authentication work?")
- Request a specific file or module by name
When user selects a component, provide a detailed summary using the small-scale format adapted for the component:
Read strategically
Identify patterns
Focus on intent over implementation
Adapt terminology and patterns to the language:
User: "Can you summarize this repository?"
Response approach:
User: "What does this function do?" [provides code]
Response approach:
User: "Summarize these two implementations and compare them"
Response approach:
User: "Help me understand this old code"
Response approach:
Use clear markdown with:
Use structured markdown with:
When referencing specific code elements:
backticks for function/class/variable namessrc/utils/validator.py:validate_email()lines 45-67When encountering limitations, acknowledge them and offer alternative approaches or ask for additional context.