Generate 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 specific modules.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill code-summarizer
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:
## 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:
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:
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.
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take arabelatso/code-summarizer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.