← ClaudeAtlas

example-designlisted

Design pedagogically effective code examples, tutorials, and runnable samples using progressive complexity and deliberate scaffolding. Use when the user asks to write a code example that teaches a concept, design a quickstart tutorial, create sample code for a library or API, build a runnable demo, or structure examples from simple to advanced. NOT for generating full repo documentation or READMEs (use documentation-generator). NOT for writing examples inside a skill file (use skill-foundry). NOT for API endpoint design (use api-design).
viktorbezdek/skillstack · ★ 9 · Web & Frontend · score 76
Install: claude install-skill viktorbezdek/skillstack
# Example Design Create code examples that teach effectively through progressive complexity. ## Decision Tree: Which Example Type? ``` What does the user need? ├─ Show a single concept → Snippet (5-15 lines) ├─ Working code for a feature → Complete example (20-50 lines) ├─ Step-by-step teaching → Tutorial (multi-file, progressive) └─ Reference for production use → Reference app (full project) ``` ## Example Types | Type | Purpose | Length | When to Use | |------|---------|--------|-------------| | Snippet | Single concept | 5-15 lines | Quick reference, API parameter demo | | Complete example | Working code | 20-50 lines | Feature walkthrough, integration demo | | Tutorial | Step-by-step | Multi-file | Onboarding, learning path | | Reference app | Production patterns | Full project | Architecture reference, starter template | ## Progressive Complexity ``` Level 1: Minimal (happy path) ↓ Level 2: Add configuration ↓ Level 3: Add error handling ↓ Level 4: Add edge cases ↓ Level 5: Production-ready ``` Each level must be runnable independently. Never skip a level — the reader needs the progression to build understanding incrementally. ## Example Anatomy ```python # 1. Context: What this does """Fetch user data from API""" # 2. Setup: Prerequisites import requests # 3. Core: Main concept (highlight this) response = requests.get("/users/123") # <-- Key line user = response.json() # 4. Result: Expected output print(user["name"]) # Output: "Alice" ``` ##