From claude-evolve
Explains complex subjects like PR changes, code, architectures, documents, or concepts step-by-step with summaries, logical ordering, and key insights.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-evolve:explain-step-by-stepThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You explain complex things progressively, building understanding layer by layer.
You explain complex things progressively, building understanding layer by layer.
Determine the subject:
For PRs/code changes:
# Get the diff
git diff main...HEAD # or specific commits
gh pr diff <number> # for GitHub PRs
For code:
For concepts:
Always start with a 1-2 sentence summary:
This PR adds rate limiting to the API by introducing a Redis-backed
token bucket and applying it to all authenticated endpoints.
Then break into logical steps:
| Subject Type | Step Ordering |
|---|---|
| PR/changes | By logical dependency, not file order |
| Code flow | By execution order |
| Architecture | Outside-in (boundaries -> core) or inside-out |
| Process | Chronological or causal |
| Concept | Simple -> complex, concrete -> abstract |
Format each step as:
## Step N: [What This Step Accomplishes]
[1-2 sentences explaining the step]
[Code snippet or relevant excerpt if applicable]
**Key insight:** [One sentence on why this matters or what to notice]
After all steps, optionally add:
Input: "Explain this PR"
Output:
## Summary
This PR adds user session management with automatic timeout and refresh.
---
## Step 1: New Session Model
Adds `Session` struct with user ID, expiry, and refresh token.
```rust
pub struct Session {
user_id: Uuid,
expires_at: DateTime<Utc>,
refresh_token: String,
}
Key insight: Sessions are stored server-side, not in JWT claims.
New middleware checks session validity on each request.
async fn session_check(req: Request, next: Next) -> Response {
let session = get_session(&req)?;
if session.is_expired() {
return Err(Unauthorized);
}
next.run(req).await
}
Key insight: Expired sessions return 401, forcing re-auth.
Adds /auth/refresh to extend sessions without re-login.
Key insight: Refresh tokens are single-use and rotated on each refresh.
Request -> Middleware checks session -> If valid, proceed -> If expired, client calls refresh -> New session issued
Watch out for: The refresh token rotation means clients must store the new token after each refresh.
## Adapting to Domain
### For Code Explanation
- Follow execution flow
- Highlight state changes
- Note side effects
### For Architecture
- Start with boundaries (what goes in/out)
- Then internal components
- Then data flow between them
### For Concepts
- Start with what it is (definition)
- Then why it exists (motivation)
- Then how it works (mechanism)
- Then when to use it (application)
### For Errors/Debugging
- Start with the symptom
- Then the cause chain
- Then the fix
## Anti-Patterns
**DON'T:**
- Explain in file order (often wrong logical order)
- Include every detail (focus on what builds understanding)
- Use filler ("Let me explain...", "As you can see...")
- Assume knowledge level (calibrate to user)
**DO:**
- Start with summary
- Order by logical dependency
- Use code snippets sparingly but effectively
- End with connections/insights
## Efficiency Tips
- If user knows the domain, skip basics
- If change is trivial, say so briefly
- If step is obvious, compress it
- If something is complex, expand it
## Output Branding
Use `[explain]` prefix for multi-part explanations:
[explain] Breaking down this PR in 4 steps...
...
For simple explanations, skip the prefix.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub hknc/claude-evolve