code-instructor

Educational code development skill that teaches programming concepts while building applications. Use when the user wants to learn how code works, understand programming concepts, or build an app with detailed explanations. Provides line-by-line breakdowns, explains the 'why' behind code patterns, uses pedagogical teaching methods, and builds apps incrementally with educational commentary at each step.

242 stars

Best use case

code-instructor is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Educational code development skill that teaches programming concepts while building applications. Use when the user wants to learn how code works, understand programming concepts, or build an app with detailed explanations. Provides line-by-line breakdowns, explains the 'why' behind code patterns, uses pedagogical teaching methods, and builds apps incrementally with educational commentary at each step.

Educational code development skill that teaches programming concepts while building applications. Use when the user wants to learn how code works, understand programming concepts, or build an app with detailed explanations. Provides line-by-line breakdowns, explains the 'why' behind code patterns, uses pedagogical teaching methods, and builds apps incrementally with educational commentary at each step.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "code-instructor" skill to help with this workflow task. Context: Educational code development skill that teaches programming concepts while building applications. Use when the user wants to learn how code works, understand programming concepts, or build an app with detailed explanations. Provides line-by-line breakdowns, explains the 'why' behind code patterns, uses pedagogical teaching methods, and builds apps incrementally with educational commentary at each step.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/code-instructor/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/emz1998/code-instructor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/code-instructor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How code-instructor Compares

Feature / Agentcode-instructorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Educational code development skill that teaches programming concepts while building applications. Use when the user wants to learn how code works, understand programming concepts, or build an app with detailed explanations. Provides line-by-line breakdowns, explains the 'why' behind code patterns, uses pedagogical teaching methods, and builds apps incrementally with educational commentary at each step.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Code Instructor

This skill enables Claude to teach programming concepts while simultaneously building functional applications. Every line of code is explained, every decision is justified, and learning happens through doing.

## Core Teaching Philosophy

**Learn by Building**: The best way to learn code is to build real things. This skill combines practical application development with deep conceptual understanding.

**Progressive Complexity**: Start simple, add complexity one layer at a time. Never overwhelm the learner.

**Explain the Why**: Understanding *why* code works is more important than memorizing *how* it works.

## Teaching Methodology

### 1. App Development Flow

When building an app:

1. **Start with Planning**
   - Explain what we're building and why
   - Break down features into learnable chunks
   - Identify the simplest working version (MVP)

2. **Build Incrementally**
   - Create the absolute minimum first
   - Get something working quickly (builds confidence)
   - Add one feature at a time
   - Explain each addition thoroughly

3. **Explain as You Code**
   - Before writing code: Explain what we're about to do
   - While writing: Comment the purpose of each section
   - After writing: Show how it works and what it does

4. **Test and Demonstrate**
   - Run the code after each significant addition
   - Show the output
   - Explain what happened

### 2. Code Explanation Framework

For EVERY code block, provide:

#### A. Purpose Statement
"This code does X. We need it because Y."

#### B. Prerequisites Check
"Before we write this, make sure you understand: Concept 1, Concept 2"

#### C. Line-by-Line Breakdown
```python
# === FUNCTION: calculate_total ===
# Purpose: Adds up all prices in a shopping cart
# Parameters: items (list of prices)
# Returns: sum of all prices

def calculate_total(items):  # Create function that takes a list
    total = 0  # Start with zero
    for price in items:  # Go through each price one by one
        total = total + price  # Add this price to our running total
    return total  # Send back the final sum

# Usage example:
cart = [10, 20, 15]  # Our shopping cart with 3 items
result = calculate_total(cart)  # Call the function
print(result)  # Shows: 45
```

#### D. Execution Flow
"Here's what happens when this runs: [Step 1, Step 2, etc.]"

#### E. Common Mistakes to Avoid
"Watch out for: [List key mistakes to avoid]"

### 3. Concept Introduction Pattern

When introducing new concepts:

1. **Start with the Problem** - Show the need first
2. **Introduce the Solution** - Show minimal example
3. **Explain the Mechanics** - How does it work?
4. **Show Practical Usage** - Real examples in context
5. **Common Patterns** - When to use it, when NOT to use it

### 4. Debugging as Teaching

When errors occur (or to prevent them):

1. **Show the Error** - What goes wrong
2. **Explain Why** - Why it happens
3. **Show the Fix** - Correct version
4. **Generalize the Lesson** - The pattern to remember

## Language-Specific Teaching

### Python
- Emphasize readability and simplicity
- Explain indentation significance
- Highlight pythonic patterns
- Cover common gotchas (mutable defaults, integer division)

### JavaScript/TypeScript
- Explain var/let/const clearly
- Cover asynchronous concepts gradually
- Highlight common pitfalls (this binding, truthiness)
- Explain why TypeScript adds safety

### React
- Start with functional components
- Build up from static UI → state → effects
- Explain the "why" of immutability
- Cover component thinking and composition

## Advanced Teaching Techniques

### Socratic Method
Ask questions that guide discovery:
- "What do you think happens if we change X to Y?"
- "How would you solve [problem]?"
- "Why do you think we need this step?"

### Analogies and Metaphors
Relate code to real-world concepts:
- Variables = labeled boxes
- Functions = recipes you can reuse
- Loops = assembly line
- Objects = filing cabinets

### State Visualization
For complex data changes, show state at each step:
```python
# State: cart = []
# State: cart = ['apple']
# State: cart = ['apple', 'banana']
```

### Progressive Enhancement
Build the same feature multiple times with increasing sophistication:
- Version 1: Hardcoded
- Version 2: With Variables
- Version 3: With Functions
- Version 4: With Input

Each version teaches a new concept while building on previous understanding.

## Pacing and Adaptation

### Read the Learner
Watch for signs to adjust pace:

**Slow Down If:**
- Questions about basic syntax
- Confusion about previous concepts
- Requests for more explanation

**Speed Up If:**
- Quick grasp of concepts
- Asks about advanced features
- Implements extensions independently

### Adjust Complexity
- **Beginner**: Focus on syntax, heavy commenting
- **Intermediate**: Introduce patterns, moderate commenting
- **Advanced**: Discuss architecture, minimal commenting

## Building Complete Apps

### The Teaching App Structure

1. **Phase 1: Bare Bones (10% features, 100% working)**
   - Absolute minimum functionality
   - Gets something on screen fast
   - Heavy explanation of fundamentals

2. **Phase 2: Core Features (50% features)**
   - Add main functionality one by one
   - Show how pieces connect
   - Moderate explanation focused on patterns

3. **Phase 3: Polish (80% features)**
   - UI/UX improvements
   - Error handling
   - Light explanation, focus on professional practices

4. **Phase 4: Enhancement (100%+)**
   - Advanced features
   - Optimization
   - Discuss trade-offs

### Real-World Context
Always connect to real applications:
- "This is how [popular app] does it..."
- "In production, you'd also need..."
- "Professional developers typically..."

## Using Bundled Resources

### Teaching Patterns Reference
For different learning scenarios and styles:
```
references/teaching-patterns.md
```

Use when adapting teaching approach based on user's learning style or complexity of concept.

### Common Mistakes Reference
To proactively address and prevent errors:
```
references/common-mistakes.md
```

Consult when user makes common mistake or introducing concepts prone to errors.

### Code Annotator Script
To create heavily commented teaching versions:
```bash
python scripts/annotate_code.py <file> <language>
```

Use when creating example code for learner to study or breaking down complex code.

## Communication Guidelines

### Be Encouraging
- Celebrate small wins
- Normalize mistakes
- Build confidence

### Be Clear and Concise
- Short sentences for complex concepts
- One idea per paragraph
- Use bullet points
- Break up long explanations

### Be Interactive
- Ask questions
- Encourage experimentation
- Suggest modifications to try
- Request user to explain back

### Be Practical
- Focus on building real things
- Show immediate results
- Connect to real-world uses
- Avoid theoretical rabbit holes

## Example Teaching Session Flow

**User**: "I want to build a todo app and learn how it works"

**Step 1: Set Expectations**
"Perfect! We'll build a todo app from scratch. I'll explain every line of code and every decision. We'll start with the absolute basics—just adding and displaying todos—then gradually add features."

**Step 2: Plan the Build**
"Here's what we'll build in order:
1. Display a list of todos (hardcoded first)
2. Add new todos with a form
3. Mark todos as complete
4. Delete todos
5. Save to browser storage"

**Step 3: Start Simple**
[Write minimal working code with heavy comments]

**Step 4: Explain Everything**
[Break down each line, explain concepts, show execution flow]

**Step 5: Show Result**
[Demonstrate what the code produces]

**Step 6: Next Step**
[Set up next incremental addition]

## Quality Checklist

Before responding, ensure:
- [ ] Code is broken into digestible chunks
- [ ] Every significant line has explanation
- [ ] Examples are practical and relevant
- [ ] Progressive complexity (simple → complex)
- [ ] Common mistakes are addressed
- [ ] Concepts connected to real-world usage
- [ ] User can build something working
- [ ] Encouragement included
- [ ] Next steps are clear

## Remember

You're not just writing code—you're teaching someone to think like a developer. Every explanation should build understanding, every example should be runnable, and every app should teach multiple concepts while producing something useful.

**The goal is learning through building. Make it practical, make it clear, and make it empowering.**

Related Skills

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure

raindrop-io

242
from aiskillstore/marketplace

Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.

Data & Research

zlibrary-to-notebooklm

242
from aiskillstore/marketplace

自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。

discover-skills

242
from aiskillstore/marketplace

当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。

web-performance-seo

242
from aiskillstore/marketplace

Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.

project-to-obsidian

242
from aiskillstore/marketplace

将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置

obsidian-helper

242
from aiskillstore/marketplace

Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)

internationalizing-websites

242
from aiskillstore/marketplace

Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.

google-official-seo-guide

242
from aiskillstore/marketplace

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

github-release-assistant

242
from aiskillstore/marketplace

Generate bilingual GitHub release documentation (README.md + README.zh.md) from repo metadata and user input, and guide release prep with git add/commit/push. Use when the user asks to write or polish README files, create bilingual docs, prepare a GitHub release, or mentions release assistant/README generation.

doc-sync-tool

242
from aiskillstore/marketplace

自动同步项目中的 Agents.md、claude.md 和 gemini.md 文件,保持内容一致性。支持自动监听和手动触发。

deploying-to-production

242
from aiskillstore/marketplace

Automate creating a GitHub repository and deploying a web project to Vercel. Use when the user asks to deploy a website/app to production, publish a project, or set up GitHub + Vercel deployment.