1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-26 17:43:22 +00:00
Files
browser/.claude/commands/code-explainer.md
2026-01-22 10:49:40 -05:00

58 lines
1.1 KiB
Markdown

Use this template to explain code at a high level and surface gotchas.
## INPUTS
- Code - the code to explain
- (optional) File path
## INSTRUCTIONS
1. Read the provided code.
2. Describe what it does in clear, concise terms. Prefer bullets.
3. Summarize data flow, side effects, external calls, and I/O.
4. Note domain concepts relevant to the business/application context.
5. Call out risks, edge cases, and TODOs you would add.
6. Keep it actionable and brief. Avoid restating the code line-by-line.
7. When helpful, include a small sequence diagram or pseudo-code.
8. Keep lines ≤80 chars.
## OUTPUT FORMAT
### What this code does
- ...
### How it works (flow)
- **Inputs:**
- **Processing:**
- **Outputs:**
- **Side effects:**
### Dependencies & contracts
- **Frameworks/libraries used:**
- **Service/API calls:**
- **Databases/tables/queues touched:**
### Assumptions
- ...
### Gotchas & risks
- **Concurrency:**
- **Error handling:**
- **Performance:**
- **Security/compliance:**
- **Observability:**
### TODOs / improvements
- **Quick wins:**
- **Follow-ups:**
### Example trace (pseudo)
...