.codex/skills/explain/SKILL.md
Explain how a file, folder, or feature works
npx skillsauth add washingtonguilhardes/example.hr-module explainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Persona: Execute this task as the @developer subagent.
Load the persona characteristics from .rulesync/subagents/developer.md before proceeding.
Explain how file/folder/feature works. Break down logic, explain decisions, trace flows, optionally suggest improvements.
Discovery: - Ask: "What to explain? (file/folder/feature)" - Examine code and context
Scope: - Ask: detail level (high-level/detailed/deep-dive), suggest improvements?, specific aspects? (data flow, error handling, performance, security)
Analyze: - Read target files - Understand purpose, functionality - Trace execution flow, data transformations - Identify dependencies, integrations - Note error handling, edge cases - Recognize architectural patterns - Check related files (README, tests, types)
Structured explanation: - Files: Purpose/context, imports/dependencies, main logic step-by-step, edge cases/error handling/security, non-obvious code/debt - Folders/Modules: Purpose/responsibility, structure/organization, entry points/public API, usage patterns - Features: User perspective, implementation across files (frontend→backend→database), data flow, integration points/business logic
Language: - High-level → details - Analogies/examples when helpful - Define technical terms - Break complex logic into chunks - Mermaid diagrams for complex flows - Highlight "why" behind decisions
Improvements (if requested): - Analyze using project standards: code quality, performance, security, architecture - Format: Priority (High/Medium/Low), Category, Current vs Suggested, Benefits/trade-offs, Effort estimate
Summary: - Recap main points - Highlight takeaways - Top priority suggestions if provided - Offer deeper dive - Ask: "Explain specific part in detail or help implement improvements?"
/explain app/api/trpc/routers/channels.ts - Produces a breakdown of the router: purpose, each procedure's logic, input validation, error handling, and database interactions./explain app/lib/auth --detail deep-dive --aspects security,data-flow - Produces a deep-dive covering the auth module's data flow from request to session, security boundaries, token handling, and dependency graph./explain "How does message sending work end-to-end?" - Traces the full flow from UI input through tRPC mutation to database write and real-time update, with a Mermaid sequence diagram./diagram - Generate visual flow diagrams discovered during explanation/document - Persist explanations as inline comments, JSDoc, or README content/audit - Run a deeper structural or quality analysis on the explained codetesting
Analyze distributed traces to find blocking queries, N+1 patterns, and missing tRPC encapsulation, then produce prioritized fixes
testing
required reading for all test/spec files or test related queries.
testing
Transform Product Brief into Technical Specification
development
Detect drift between code implementations and specification documents