Interactive Learning Skill
Turn any topic into a polished, self-contained HTML learning tool. No frameworks, no dependencies beyond CDN libraries when needed.
Standard page structure (always follow this order)
Every learning tool MUST have this structure — theory first, interactive second:
- Theory Section (top) — visual explainer with diagrams, annotations, SVG graphics, step-by-step breakdowns
- Flashcard / Practice Section (bottom) — interactive drill after the theory is understood
Never skip the theory section, even if the user only asks for flashcards. The theory anchors the cards.
When to adjust format
| User intent |
Adjustment |
| "Erkläre mir X" |
Expand theory heavily, flashcards optional |
| "Lernkarten zu X" |
Standard theory + full flashcard deck |
| "Ich will X üben" |
Light theory recap + interactive exercises with input fields |
Design principles
Read /mnt/skills/public/frontend-design/SKILL.md for aesthetic guidance. Key points for learning tools specifically:
- Dark theme preferred — easier on eyes during long study sessions
- One topic per screen — don't overwhelm; use cards, tabs, or steps to chunk information
- Immediate feedback — reveal answers, highlight correct/wrong, show worked solutions inline
- Progress indicators — card X of Y, completion %, streak counters motivate
- Mobile-friendly — learners study on phones; use
max-width: 700px, large tap targets
- Keyboard shortcuts — spacebar to flip card, arrow keys to navigate, enter to confirm answer
Flashcard Deck — implementation guide
<!-- Core state -->
<script>
const cards = [
{ front: "Was ist CVD?", back: "Cumulative Volume Delta — kumulierte Differenz zwischen Buy- und Sell-Volumen." },
// ...
];
let current = 0, flipped = false, score = { correct: 0, total: 0 };
function flip() { /* toggle .flipped class */ }
function next(knew) { score.total++; if (knew) score.correct++; current = (current+1) % cards.length; }
</script>
<!-- Card structure -->
<div class="card"
<div class="front">{{ cards[current].front }}</div>
<div class="back">{{ cards[current].back }}</div>
</div>
<button Wusste ich</button>
<button Nochmal</button>
CSS flip animation:
.card { perspective: 1000px; cursor: pointer; }
.card-inner { transition: transform 0.5s; transform-style: preserve-3d; }
.card.flipped .card-inner { transform: rotateY(180deg); }
.front, .back { backface-visibility: hidden; position: absolute; width: 100%; }
.back { transform: rotateY(180deg); }
Theory Section — implementation guide
Structure:
- Hero — topic name, one-sentence summary, a "Was du lernen wirst" bullet list
- Concept blocks — each concept: plain-language definition → formal definition → annotated SVG diagram or visual → worked example
- Key formulas — rendered with KaTeX for math/quant topics
- Visual types to include (use SVGs inline, no external image deps):
- Flow diagrams — boxes + arrows showing process steps (e.g. how CVD is computed per trade)
- Annotated charts — simplified price/indicator charts drawn in SVG
- Comparison visuals — side-by-side concept comparisons
- Formula breakdowns — formula rendered in KaTeX with labeled parts below
- Timeline / sequence diagrams — for processes that unfold over time
- Sticky section nav — clicking jumps to each concept block (smooth scroll)
SVG diagram pattern
<svg viewBox="0 0 600 200" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:600px">
<!-- boxes -->
<rect x="20" y="70" width="130" height="50" rx="8" fill="#1a1a2e" stroke="#00e5ff" stroke-width="1.5"/>
<text x="85" y="100" text-anchor="middle" fill="#e0e0f0" font-size="13" font-family="Space Mono">Trade eingeht</text>
<!-- arrow -->
<line x1="150" y1="95" x2="200" y2="95" stroke="#6b6b8a" stroke-width="1.5" marker-end="url(#arr)"/>
<defs>
<marker id="arr" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto">
<path d="M0,0 L0,6 L8,3 z" fill="#6b6b8a"/>
</marker>
</defs>
</svg>
For math/stats/quant topics, always use KaTeX:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
<script>
document.querySelectorAll('.math').forEach(el => {
katex.render(el.textContent, el, { throwOnError: false });
});
</script>
Subject-specific notes
Mathe / Statistik
- Always render formulas with KaTeX
- Include worked numerical examples with step-by-step annotations
- Use SVG or canvas for graphs (no external chart libs needed for simple plots)
Programmierung / Informatik
- Use
<pre><code> blocks with a dark syntax theme (Monokai palette)
- For algo explanations, animate the steps with JS (highlight current step, show state)
BM / Allgemeinbildung
- Include Lernziele at the top ("Nach dieser Einheit kannst du…")
- Use real Swiss examples (CHF, Schweizer Recht, etc.) where relevant
- Structure to match Lehrplan-style: Wissen → Verstehen → Anwenden
Quant Finance / Trading
- Define terms precisely (e.g. CVD = sum of signed delta per trade)
- Include realistic market data examples (fake but plausible prices/volumes)
- Link concepts to practical trading decisions where possible
Output checklist
Before delivering the artifact:
1---2name: interactive-learning3description: Create interactive HTML learning tools — flashcard decks, visual theory explainers, and concept pages — for studying. Use this skill whenever the user wants to learn, review, or practice a topic interactively, wants flashcards, a visual summary, a quiz, or says things like "erkläre mir X interaktiv", "mach mir Lernkarten zu X", "ich will X üben", "help me study X", "make a study page for X", or "build me a flashcard deck on X". Covers all subjects including mathematics, statistics, programming, general education (BM/Schule), and quantitative finance/trading. Always prefer this skill over plain text explanations when the user wants to actively learn or review something, not just read about it.4---56# Interactive Learning Skill78Turn any topic into a polished, self-contained HTML learning tool. No frameworks, no dependencies beyond CDN libraries when needed.910## Standard page structure (always follow this order)1112Every learning tool MUST have this structure — theory first, interactive second:13141. **Theory Section** (top) — visual explainer with diagrams, annotations, SVG graphics, step-by-step breakdowns152. **Flashcard / Practice Section** (bottom) — interactive drill after the theory is understood1617Never skip the theory section, even if the user only asks for flashcards. The theory anchors the cards.1819### When to adjust format2021| User intent | Adjustment |22|---|---|23| "Erkläre mir X" | Expand theory heavily, flashcards optional |24| "Lernkarten zu X" | Standard theory + full flashcard deck |25| "Ich will X üben" | Light theory recap + interactive exercises with input fields |2627## Design principles2829Read `/mnt/skills/public/frontend-design/SKILL.md` for aesthetic guidance. Key points for learning tools specifically:3031- **Dark theme preferred** — easier on eyes during long study sessions32- **One topic per screen** — don't overwhelm; use cards, tabs, or steps to chunk information33- **Immediate feedback** — reveal answers, highlight correct/wrong, show worked solutions inline34- **Progress indicators** — card X of Y, completion %, streak counters motivate35- **Mobile-friendly** — learners study on phones; use `max-width: 700px`, large tap targets36- **Keyboard shortcuts** — spacebar to flip card, arrow keys to navigate, enter to confirm answer3738## Flashcard Deck — implementation guide3940```html41<!-- Core state -->42<script>43const cards = [44 { front: "Was ist CVD?", back: "Cumulative Volume Delta — kumulierte Differenz zwischen Buy- und Sell-Volumen." },45 // ...46];47let current = 0, flipped = false, score = { correct: 0, total: 0 };4849function flip() { /* toggle .flipped class */ }50function next(knew) { score.total++; if (knew) score.correct++; current = (current+1) % cards.length; }51</script>5253<!-- Card structure -->54<div class="card" onclick="flip()">55 <div class="front">{{ cards[current].front }}</div>56 <div class="back">{{ cards[current].back }}</div>57</div>58<button onclick="next(true)">✓ Wusste ich</button>59<button onclick="next(false)">✗ Nochmal</button>60```6162**CSS flip animation:**63```css64.card { perspective: 1000px; cursor: pointer; }65.card-inner { transition: transform 0.5s; transform-style: preserve-3d; }66.card.flipped .card-inner { transform: rotateY(180deg); }67.front, .back { backface-visibility: hidden; position: absolute; width: 100%; }68.back { transform: rotateY(180deg); }69```7071## Theory Section — implementation guide7273Structure:741. **Hero** — topic name, one-sentence summary, a "Was du lernen wirst" bullet list752. **Concept blocks** — each concept: plain-language definition → formal definition → annotated SVG diagram or visual → worked example763. **Key formulas** — rendered with KaTeX for math/quant topics774. **Visual types to include (use SVGs inline, no external image deps):**78 - **Flow diagrams** — boxes + arrows showing process steps (e.g. how CVD is computed per trade)79 - **Annotated charts** — simplified price/indicator charts drawn in SVG80 - **Comparison visuals** — side-by-side concept comparisons81 - **Formula breakdowns** — formula rendered in KaTeX with labeled parts below82 - **Timeline / sequence diagrams** — for processes that unfold over time835. **Sticky section nav** — clicking jumps to each concept block (smooth scroll)8485### SVG diagram pattern86```html87<svg viewBox="0 0 600 200" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:600px">88 <!-- boxes -->89 <rect x="20" y="70" width="130" height="50" rx="8" fill="#1a1a2e" stroke="#00e5ff" stroke-width="1.5"/>90 <text x="85" y="100" text-anchor="middle" fill="#e0e0f0" font-size="13" font-family="Space Mono">Trade eingeht</text>91 <!-- arrow -->92 <line x1="150" y1="95" x2="200" y2="95" stroke="#6b6b8a" stroke-width="1.5" marker-end="url(#arr)"/>93 <defs>94 <marker id="arr" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto">95 <path d="M0,0 L0,6 L8,3 z" fill="#6b6b8a"/>96 </marker>97 </defs>98</svg>99```100101For math/stats/quant topics, always use KaTeX:102```html103<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">104<script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>105<script>106 document.querySelectorAll('.math').forEach(el => {107 katex.render(el.textContent, el, { throwOnError: false });108 });109</script>110```111112## Subject-specific notes113114### Mathe / Statistik115- Always render formulas with KaTeX116- Include worked numerical examples with step-by-step annotations117- Use SVG or canvas for graphs (no external chart libs needed for simple plots)118119### Programmierung / Informatik120- Use `<pre><code>` blocks with a dark syntax theme (Monokai palette)121- For algo explanations, animate the steps with JS (highlight current step, show state)122123### BM / Allgemeinbildung124- Include Lernziele at the top ("Nach dieser Einheit kannst du…")125- Use real Swiss examples (CHF, Schweizer Recht, etc.) where relevant126- Structure to match Lehrplan-style: Wissen → Verstehen → Anwenden127128### Quant Finance / Trading129- Define terms precisely (e.g. CVD = sum of signed delta per trade)130- Include realistic market data examples (fake but plausible prices/volumes)131- Link concepts to practical trading decisions where possible132133## Output checklist134135Before delivering the artifact:136- [ ] Single self-contained HTML file, no external CSS files137- [ ] Works offline (CDN libs only for math rendering or fonts)138- [ ] Keyboard navigation implemented139- [ ] Mobile layout tested (check at 375px width mentally)140- [ ] Progress/score displayed141- [ ] Aesthetic is distinctive — not default Bootstrap/generic142- [ ] Content is accurate and appropriately detailed for the subject