---
name: explain-code-3c666c1578f7
description: Explain what code does in plain English
disable-model-invocation: true
allowed-tools: Read, Grep, Glob
---

**Usage:** `/explain-code PATH_OR_DESCRIPTION`

**Examples:**
- `/explain-code v2/lib/src/components/Button.ts`
- `/explain-code the button ripple effect`
- `/explain-code design token system`

Explain: $ARGUMENTS

**Setup:**
1. Read `.claude/PROJECT_CONTEXT.md` to understand AgnosticUI's architecture

**Process:**

2. **Locate and read the code:**
   - Identify if it's a core component, framework implementation, or utility
   - Read the specified file(s)
   - Use Grep/Glob to find related files if needed:
     - If explaining core component, show framework usage examples
     - If explaining framework story, reference core component
     - If explaining utility, show where it's used

3. **Understand the context:**
   - Where does this fit in AgnosticUI's architecture?
   - Is it framework-agnostic or framework-specific?
   - Does it use design tokens or CSS custom properties?
   - Are there related files in other frameworks?

4. **Explain clearly:**
   - **What it does** (high level, user-facing behavior)
   - **How it works** (key logic, algorithms, patterns)
   - **Why it's structured this way** (architectural decisions)
   - **AgnosticUI-specific context:**
     - How it fits the CSS-first approach
     - Framework-agnostic vs framework-specific aspects
     - Design token usage
     - Accessibility considerations
   - **Common usage patterns** with examples
   - **Edge cases or gotchas** to be aware of

5. **Provide helpful context:**
   - Show where it's used (examples, stories, playgrounds)
   - Note framework differences if applicable
   - Link to related components or utilities
   - Reference relevant playbooks if they exist

**Keep explanations:**
- Clear and jargon-free (or explain jargon)
- Organized from high-level to details
- Focused on understanding, not just describing
- Contextualized within AgnosticUI's multi-framework architecture

---
Source attribution: AgnosticUI
Original project: https://github.com/AgnosticUI/agnosticui
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: AgnosticUI
Original project: https://github.com/AgnosticUI/agnosticui
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Content & Media, Design, Development & Engineering
Roles: Frontend Developer, Technical Writer, UX Writer
Specialties: Specialty not specified
Tools: Glob, Grep
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 7bab9c2a97c92d48ada7d5e3190967c88d168a4eda94b443e2f70e19cac0db9f
