Skip to main content
ClaudeWave
Skill4.6k repo starsupdated yesterday

learning-opportunities

Write a scenario or question; wait for their approach; compare against actual implementation." ``` ### 3. Variation explorer After understanding the baseline, pose a "what if" question. ``` Example: Agent: "We used index fields on the schema. What if we removed that index and instead added a computed column. What would get faster, and what would get slower?" [STOP, wait for response] ``` Confirm the core insight, then offer a bonus: `Let's run a quick profile to see the actual numbers?` This bridges theory to measurement." ``` ### 4. Explain to me Ask them to summarize a concept or piece of code in their own words. ``` Example: Agent: "Can you describe in your own words why we needed that .map() call?" [STOP, wait for response] ``` Confirm, clarify gaps, and extend (offer a variation or context question). ### 5. Debugging question Pose a real (or realistic) bug scenario related to the work just done. ``` Example: User just implemented a pub/sub system. Agent: "Users are reporting that messages arrive out of order

Install in Claude Code
Copy
git clone --depth 1 https://github.com/tech-leads-club/agent-skills /tmp/learning-opportunities && cp -r /tmp/learning-opportunities/packages/skills-catalog/skills/(learning)/learning-opportunities ~/.claude/skills/learning-opportunities
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Learning Opportunities

Facilitate deliberate skill development during AI-assisted coding sessions. Offer short, optional exercises that counteract passive consumption of AI-generated code.

When adapting techniques or making judgment calls about learning approaches, consult `references/PRINCIPLES.md` for the underlying learning science.

## When to offer exercises

Offer an optional 10-15 minute exercise after:

- Creating new files or modules
- Database schema changes
- Architectural decisions or refactors
- Implementing unfamiliar patterns
- Any work where the user asked "why" questions during development

Always ask before starting: "Would you like to do a quick learning exercise on [topic]? About 10-15 minutes."

## When NOT to offer

- User declined an exercise this session
- User already completed 2 exercises this session
- User signals urgency ("fix this quick", "just ship it", "deploy now")
- Pure debugging/hotfix context

Keep offers to one short sentence. Do not repeat or insist.

## Core principle: Pause for input

This is the most important rule. After posing a question:

1. **Stop generating immediately.** Do not continue after the question mark.
2. Do not generate suggested answers, hints, examples, or encouragement like "Think about..." or "Consider..."
3. Wait for the user's actual response before continuing.

Allowed after the question:

- "(Take your best guess — wrong predictions are useful data.)"
- "(Or we can skip this one.)"

After their response:

- If correct: confirm and deepen ("Exactly. And what would change if [variation]?")
- If wrong: **be direct** about what's incorrect, then explore the gap — this is high-value learning

## Exercise types

### 1. Predict then observe

Ask what they predict will happen in a specific scenario before revealing the answer.

```
Example:
User just created auth middleware.

Agent: "Would you like a quick learning exercise on middleware patterns?"
User: "sure"
Agent: "What do you think happens when a request hits your middleware with an expired token?

(Take your best guess — wrong predictions are useful data.)"

[STOP — wait for response]

After response:
Agent: "Actually [correct behavior]. The key difference is [explanation].
What surprised you about that?"

[STOP — wait for response]
```

### 2. Generate then compare

Ask them to sketch an approach before showing the actual implementation.

```
Example:
Agent: "Before I show you — how would you structure the error handling for this API endpoint?"

[STOP — wait for response]

After response:
Agent: "Here's what we went with: [implementation].
What's similar to your approach? What's different, and why do you think we chose this direction?"

[STOP — wait for response]
```

### 3. Teach it back

Ask them to explain a component as if to a new team member.

```
Example:
Agent: "Explain how the caching layer we just built works, as if I'm a new developer joining the project."

[STOP — wait for response]

After response:
Agent: "You nailed [specific part]. One thing to refine: [specific gap]."
```

## Hands-on code exploration

Prefer directing users to files over showing code snippets. Having learners locate code themselves builds codebase familiarity.

**Adjust guidance based on demonstrated familiarity:**

- Early: "Open `src/middleware/auth.ts`, around line 45. What does `validateToken` return?"
- Later: "Find where we handle token refresh."
- Eventually: "Where would you look to change how session expiry works?"

After they locate code, prompt self-explanation:

"You found it. Before I say anything — what do you think this line does?"

## Techniques to weave in naturally

- **"Why" questions:** "Why did we use a Map here instead of an object?"
- **Transfer prompts:** "This is the strategy pattern. Where else in this codebase might it apply?"
- **Varied context:** "We used this for auth — how would you apply it to API rate limiting?"
- **Error analysis:** "Here's a bug someone might introduce — what would go wrong and why?"

## Anti-patterns to avoid

- Dumping multiple questions at once
- Softening wrong answers into ambiguity ("well, that's partially right...")
- Offering exercises more than twice per session
- Making exercises feel like tests rather than exploration
- Continuing to generate after posing a question
component-common-domain-detectionSkill

Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic duplicated?", "find common code between services", "what can be consolidated?", "detect shared domain logic", or analyzing component overlap before refactoring. Do NOT use for code-level duplication detection (use linters) or dependency analysis (use coupling-analysis).

component-flattening-analysisSkill

Detects misplaced classes and fixes component hierarchy problems — finds code that should belong inside a component but sits at the root level. Use when asking "clean up component structure", "find orphaned classes", "fix module hierarchy", "flatten nested components", or analyzing why namespaces have misplaced code. Do NOT use for dependency analysis (use coupling-analysis) or domain grouping (use domain-identification-grouping).

component-identification-sizingSkill

Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use for runtime performance sizing or infrastructure capacity planning.

coupling-analysisSkill

Analyzes coupling between modules using the three-dimensional model (strength, distance, volatility) from "Balancing Coupling in Software Design". Use when asking "are these modules too coupled?", "show me dependencies", "analyze integration quality", "which modules should I decouple?", "coupling report", or evaluating architectural health. Do NOT use for domain boundary analysis (use domain-analysis) or component sizing (use component-identification-sizing).

decomposition-planning-roadmapSkill

Creates step-by-step decomposition plans and migration roadmaps for breaking apart monolithic applications. Use when asking "what order should I extract services?", "plan my migration", "create a decomposition roadmap", "prioritize what to split", "monolith to microservices strategy", or tracking decomposition progress. Do NOT use for domain analysis (use domain-analysis) or component sizing (use component-identification-sizing).

domain-analysisSkill

Maps business domains and suggests service boundaries in any codebase using DDD Strategic Design. Use when asking "what are the domains in this codebase?", "where should I draw service boundaries?", "identify bounded contexts", "classify subdomains", "DDD analysis", or analyzing domain cohesion. Do NOT use for grouping existing components into domains (use domain-identification-grouping) or dependency analysis (use coupling-analysis).

domain-identification-groupingSkill

Groups existing components into logical business domains to plan service-based architecture. Use when asking "which components belong together?", "group these into services", "organize by domain", "component-to-domain mapping", or planning service extraction from an existing codebase. Do NOT use for identifying new domains from scratch (use domain-analysis) or analyzing coupling (use coupling-analysis).

frontend-blueprintSkill

AI frontend specialist and design consultant that guides users through a structured discovery process before generating any code. Collects visual references, design tokens, typography, icons, layout preferences, and brand guidelines to ensure the final output matches the user's vision with high fidelity. Use when the user asks to build, design, create, or improve any frontend interface — websites, landing pages, dashboards, components, apps, emails, forms, modals, or any UI element. Also triggers on "build me a UI", "design a page", "create a component", "improve this layout", "make this look better", "frontend", "interface", "redesign", or when the user provides mockups, screenshots, or design references. Do NOT use for backend logic, API design, database schemas, or non-visual code tasks.