Create educational and interactive Jupyter notebooks as SPAs that explain concepts, teach topics, create tutorials, illustrate ideas from text, or build blog posts. Use for interactive guides, demonstrations, explanations, documentation, or any content meant for end users and learners displayed via ipynb-viewer block. Keywords include educational notebook, tutorial notebook, interactive guide, blog notebook, SPA notebook, explain topic, illustrate concept, teach interactively.
Create engaging, educational Jupyter notebooks designed as interactive Single Page Applications (SPAs) that explain concepts, teach topics, and illustrate ideas. These notebooks are displayed via the ipynb-viewer block and are meant for end users, learners, and clients—not for testing EDS blocks.
Use this skill when you need to:
Do NOT use this skill for:
jupyter-notebook-testing skill instead)| Aspect | Testing Notebooks | Educational Notebooks |
|--------|-------------------|----------------------|
| Audience | Developers testing blocks | End users, learners, clients |
| Purpose | Verify block functionality | Teach and explain concepts |
| Content ratio | 30% markdown, 70% code | 60% markdown, 40% code |
| Code style | Technical verification | Illustrative examples |
| Structure | Ad-hoc test scenarios | Narrative flow with parts |
| Language | Technical jargon | Engaging, accessible |
| Helper usage | Always uses testBlock() | Uses pure JavaScript, sometimes helpers |
| Goal | Find bugs, verify behavior | Educate, demonstrate, engage |
When using the notebook variation (| IPynb Viewer (notebook) |), the viewer automatically wraps markdown cells with appropriate styling classes based on content patterns. This means you can write pure markdown without any HTML wrappers!
How It Works:
The viewer automatically detects cell types:
# heading → wrapped with ipynb-hero-cell## heading → wrapped with ipynb-content-card (thick 6px border)ipynb-transition-cardipynb-content-card-thin (thin 4px border)Benefits:
Example:
Pure Markdown (Auto-Wrapped):
# 🎯 Tutorial Title
**Compelling tagline** with additional context
Automatically becomes:
<div class="ipynb-hero-cell">
<h1>🎯 Tutorial Title</h1>
<p><strong>Compelling tagline</strong> with additional context</p>
</div>
When to Use:
Action Cards for Navigation (NEW):
Create beautiful navigation links using pure markdown with action cards:
# Getting Started Guide
Learn step by step.
<!-- action-cards -->
- [Installation](#)
- [Your First Block](#)
- [Advanced Topics](#)
Features:
How it works:
<!-- action-cards --> HTML comment in your markdown cell(#) as placeholderImportant: The <!-- action-cards --> marker only applies to the first list that follows it. Any subsequent lists in the same cell will remain as normal bullet lists.
Example matching:
[Installation](#) finds heading containing "Installation" (like "## Installation" or "### Installation Guide")[Basic Concepts](#) finds heading containing "Basic Concepts" (like "## Part 1: Basic Concepts")Best Practices:
[Part 1: Introduction](#) instead of just [Introduction](#)When to use action cards:
The ipynb-viewer block supports two independent link systems:
Smart linking works for ANY link with (#) as the href, not just action cards. This makes internal navigation resilient to notebook changes.
Activates when: Link has href="#" (hash placeholder)
Works in: Action cards, regular markdown, inline text, tables, any link element
Examples:
# Regular navigation links
Continue to [Next Section](#) or go [Back to Start](#).
# In tables
| Topic | Link |
|-------|------|
| Basics | [Learn the Basics](#) |
| Advanced | [Advanced Topics](#) |
# In lists (not action cards)
- [Introduction](#)
- [Getting Started](#)
- [Advanced Features](#)
# Action cards (same smart linking)
<!-- action-cards -->
- [Part 1](#)
- [Part 2](#)
Key points:
Links ending in .md automatically convert to GitHub URLs using the notebook's repo metadata.
Activates when: Link ends in .md
Requires: repo field in notebook metadata
Setup:
{
"metadata": {
"repo": "https://github.com/username/project"
}
}
Examples:
Learn more in [Complete Guide](docs/guide.md)
Reference the [API Documentation](docs/api-reference.md)
See [Architecture Overview](docs/architecture.md) for details
These convert to full GitHub URLs: https://github.com/username/project/blob/main/docs/guide.md
When to use repository links:
Both systems work independently and can be mixed:
# 🎓 Tutorial Navigation
<!-- action-cards -->
- [Next Lesson](#) <!-- Smart link: internal navigation -->
- [Previous Lesson](#) <!-- Smart link: internal navigation -->
## Additional Resources
- [Architecture Guide](docs/architecture.md) <!-- Repo link: external -->
- [API Reference](docs/api.md) <!-- Repo link: external -->
Continue to the [practice exercises](#) when ready. <!-- Smart link: internal -->
Mixing Auto-Wrapping with Custom HTML: You can combine both approaches in the same notebook:
<!-- Custom HTML for special styling -->
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 32px; margin: 0; color: white;">
# Special Section
This cell has custom purple gradient styling
</div>
Terminology clarification:
| IPynb Viewer (notebook) |)Every educational notebook should include:
# Title with Emoji 📓
Brief introduction explaining what this notebook covers and who it's for.
**What you'll learn:**
- Key concept 1
- Key concept 2
- Key concept 3
## 📋 Table of Contents
- [Part 1: Introduction](#part-1-introduction)
- [Part 2: Core Concepts](#part-2-core-concepts)
- [Part 3: Advanced Topics](#part-3-advanced-topics)
- [Resources & Next Steps](#resources-next-steps)
IMPORTANT - Hash Link Format:
## 🚀 Part 1: Introduction → #part-1-introduction## Resources & Next Steps → #resources-next-steps## What's New? → #whats-new## 🚀 Part 1: Introduction
Explanation text with context and background.
Key points:
- Point 1
- Point 2
Let's see this in action...
// Clear, explanatory comments
const demonstration = 'Show the concept in action';
console.log('Helpful output:', demonstration);
// Return value for display
return demonstration;
## 📚 Resources & Next Steps
**What you learned:**
- Summary point 1
- Summary point 2
**Next steps:**
- Action item 1
- Action item 2
**Learn more:**
- [Resource 1](#)
- [Resource 2](#)
Headers:
Lists:
Tables:
Code Blocks:
Use triple backticks for syntax examples:
```javascript
const example = 'This is a syntax example, not executable';
**Links:**
- Internal navigation: `[Part 2](#part-2-title)` - Use for TOC and cross-references
- External resources: `[Documentation](https://example.com)`
- Call-to-action links at the end
**Table of Contents Navigation:**
Hash links in TOC work in paged overlay mode:
```markdown
## 📋 Table of Contents
- [Part 1: The Big Picture](#part-1-the-big-picture)
- [Part 2: Core Concepts](#part-2-core-concepts)
- [Part 3: Advanced Topics](#part-3-advanced-topics)
ID Generation Rules:
## 🚀 Getting Started → #getting-started## Part 1: Introduction → #part-1-introduction## What's New? → #whats-new## Resources & Next Steps → #resources-next-stepsEmphasis:
Visual Block Demonstrations (RECOMMENDED):
// Use showPreview() to display beautiful block overlays
const { showPreview } = await import('/scripts/ipynb-helpers.js');
// Create content for the block
const content = '<div><div>Tab 1</div><div>Content 1</div><div>Tab 2</div><div>Content 2</div></div>';
console.log('✨ Displaying interactive tabs...');
await showPreview('tabs', content);
return '✓ Beautiful visual demonstration';
Available blocks for demonstrations:
Pure JavaScript Examples:
// Use for general programming concepts (no visual needed)
const data = [1, 2, 3, 4, 5];
const doubled = data.map(x => x * 2);
console.log('Original:', data);
console.log('Doubled:', doubled);
return { original: data, doubled };
Interactive Exploration:
// Combine interactivity with visual display
const { showPreview } = await import('/scripts/ipynb-helpers.js');
// Try changing these values!
const yourName = 'World';
const emoji = '👋';
const greeting = emoji + ' Hello, ' + yourName + '!';
console.log(greeting);
const content = '<div><div>' + greeting + '</div><div>Change the variables above and run again!</div></div>';
await showPreview('hero', content);
return greeting;
Match blocks to your content type:
| Content Type | Best Block | Why |
|--------------|-----------|-----|
| Comparisons, Q&A | accordion | Collapsible sections show alternatives |
| Features, categories | cards | Visual grid showcases multiple items |
| Options, variations | tabs | Switch between different views |
| Organized data | grid | Clean layout for multiple elements |
| Data comparisons | table | Structured information display |
| Key messages | hero | Bold, attention-grabbing |
| Inspirational quotes | quote | Emphasizes important text |
| Code examples | code-expander | Expandable for long snippets |
Example use cases:
Build complexity gradually:
Aim for 60% markdown, 40% code in educational notebooks.
Example structure for 20 cells:
Balance techniques:
## 🚀 Getting Started
## 💡 Key Insight
## ⚠️ Common Pitfall
## ✅ Best Practice
## 📚 Resources
Don't overuse—one per major section header is plenty.
---) to separate major sections>) for important notes## The Problem
Traditional approaches to X suffer from Y...
## The Solution
What if we could Z instead?
## How It Works
Let's break this down step by step...
## Why Does This Matter?
Imagine you're building a dashboard...
## What Could Go Wrong?
Without proper validation, three things can happen...
Unlike older patterns, no Cell 1 initialization is needed:
✅ Modern pattern (current):
// Import only what you need, when you need it
const { testBlock } = await import('/scripts/ipynb-helpers.js');
const block = await testBlock('accordion', content);
return block;
❌ Old pattern (outdated):
// Cell 1: Initialize jsdom, setup globals... (not needed anymore)
Key points:
Purpose: Step-by-step learning Structure:
Purpose: Engaging content with demonstrations Structure:
Purpose: Deep dive into a single idea Structure:
Purpose: Quick lookup and examples Structure:
Purpose: Showcase capabilities Structure:
When creating notebooks from existing text content:
IMPORTANT: Always include metadata in your notebooks for professional presentation.
Required metadata structure:
{
"metadata": {
"title": "{{GENERATE A GOOD TITLE}}",
"description": "{{GENERATE A ONE-LINE DESCRIPTION THAT AMPLIFIES THE TITLE}}",
"author": "{{PICK AUTHOR NAME}}",
"creation-date": "{{TODAY'S DATE IN YYYY-MM-DD FORMAT}}",
"version": "1.0",
"last-modified": "{{TODAY'S DATE IN YYYY-MM-DD FORMAT}}",
"category": "{{tutorial|reference|demo|concept}}",
"difficulty": "{{beginner|intermediate|advanced}}",
"duration": "{{ESTIMATED READING TIME}}",
"tags": ["tutorial", "javascript", "notebook", "interactive"],
"license": "{{MIT|CC BY 4.0|etc}}"
}
}
Field descriptions:
title - Main notebook title (required)description - One-line summary (required)author - Author name (required)creation-date - Initial creation date in YYYY-MM-DD format (required, never change after creation)version - Version tracking (required, increment on every edit)last-modified - Last modification date in YYYY-MM-DD format (required, update on every edit)category - Content type: tutorial, reference, demo, concept (optional, displayed as blue badge)difficulty - Skill level: beginner, intermediate, advanced (optional, displayed as orange badge)duration - Reading time estimate: "15 minutes", "1 hour" (optional, displayed as purple badge)tags - Keywords for searchability (optional, displayed as gray tags)license - Content license: MIT, CC BY 4.0, etc (optional)⚠️ CRITICAL - Version and Date Management:
version AND last-modified whenever you make ANY change to an .ipynb fileExample:
{
"metadata": {
"title": "Interactive JavaScript Tutorial",
"description": "Learn JavaScript fundamentals through hands-on examples and exercises",
"author": "Tom Cranstoun",
"creation-date": "2025-01-17",
"version": "1.4",
"last-modified": "2025-11-23",
"category": "tutorial",
"difficulty": "beginner",
"duration": "25 minutes",
"tags": ["tutorial", "javascript", "notebook", "interactive", "educational"],
"license": "MIT"
}
}
The ipynb-viewer block displays this metadata professionally in the header with:
Notebooks can be displayed in multiple modes via ipynb-viewer:
| IPynb Viewer |
|--------------|
| /notebook.ipynb |
| IPynb Viewer (paged) |
|----------------------|
| /notebook.ipynb |
| IPynb Viewer (autorun) |
|------------------------|
| /notebook.ipynb |
| IPynb Viewer (notebook) |
|--------------------------|
| /notebook.ipynb |
npx skills add ddttom/jupyter-educational-notebook下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Category:science-education