Skip to content

Latest commit

ย 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Code Learning Tutorial Skill

License: MIT

A comprehensive skill for creating interactive web tutorials that help programming beginners learn codebases from scratch.

๐Ÿ“– Overview

This skill provides a proven 11-stage methodology for transforming complex codebases into beginner-friendly interactive tutorials. Based on real-world experience creating the Nanobot Tutorial, this skill guides you through every step of creating an effective learning experience.

๐ŸŽฏ What This Skill Does

  • Analyzes codebases to identify key concepts and learning paths
  • Creates interactive web tutorials with navigation, search, and progress tracking
  • Implements Socratic teaching methods to encourage critical thinking
  • Visualizes code relationships through diagrams and knowledge graphs
  • Demonstrates real execution flows with step-by-step scenarios
  • Deploys tutorials online for easy access

๐Ÿš€ Quick Start

Prerequisites

  • Basic knowledge of HTML, CSS, and JavaScript
  • A codebase you want to create a tutorial for
  • Git installed on your system
  • GitHub account (for deployment)

Installation

  1. Clone this repository:
git clone https://github.com/shuolsure/code-learning-tutorial-skill.git
  1. Copy the SKILL.md file to your Trae skills directory:
mkdir -p .trae/skills/code-learning-tutorial
cp code-learning-tutorial-skill/SKILL.md .trae/skills/code-learning-tutorial/
  1. Restart Trae or reload skills

Usage

Simply tell Trae:

"ๆˆ‘ๆƒณไธบ่ฟ™ไธช้กน็›ฎๅˆ›ๅปบไธ€ไธชๅˆๅญฆ่€…ๆ•™็จ‹"
"Create a beginner tutorial for this codebase"
"ๅธฎๆˆ‘ๅˆ›ๅปบไธ€ไธชไปฃ็ ๅญฆไน ๆ•™็จ‹"

The skill will guide you through all 11 stages automatically!

๐Ÿ“š The 11-Stage Methodology

Stage 1: Project Understanding & Overview

Analyze the project and create a high-level overview explaining what it does and why.

Stage 2: Code Annotation & Line-by-Line Explanation

Add detailed comments to all core files, explaining every line in simple terms.

Stage 3: Design Details & Architecture Deep Dive

Explain architectural choices and design rationale behind decisions.

Stage 4: Create Interactive Web Tutorial Structure

Build the HTML structure with navigation, search, and progress tracking.

Stage 5: Add Source Code Viewers

Implement modal dialogs for viewing code with syntax highlighting.

Stage 6: Interactive Folder Structure

Create visual folder trees with click-to-view functionality.

Stage 7: Socratic Teaching Method

Use thought-provoking questions to guide learning and critical thinking.

Stage 8: Method Introduction & Relationships

Create method hierarchies and knowledge graphs showing relationships.

Stage 9: Run Demo & Execution Flow

Show how code actually runs with step-by-step execution diagrams.

Stage 10: UI/UX Optimization

Ensure the tutorial is visually appealing and works on all devices.

Stage 11: Deployment & Publishing

Deploy the tutorial to GitHub Pages for online access.

๐ŸŒŸ Features

  • โœ… Beginner-Friendly: Assumes no prior knowledge
  • โœ… Interactive: Click, explore, and discover
  • โœ… Visual: Diagrams, flowcharts, and visualizations
  • โœ… Socratic: Questions guide learning
  • โœ… Comprehensive: Covers all aspects of the codebase
  • โœ… Deployable: Easy online access via GitHub Pages
  • โœ… Mobile-Responsive: Works on all devices

๐Ÿ“ File Structure

A typical tutorial created with this skill includes:

tutorial/
โ”œโ”€โ”€ index.html              # Main page
โ”œโ”€โ”€ css/
โ”‚   โ”œโ”€โ”€ style.css          # Main styles
โ”‚   โ”œโ”€โ”€ components.css     # Component styles
โ”‚   โ””โ”€โ”€ responsive.css     # Mobile styles
โ”œโ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ tutorial.js        # Core functionality
โ”‚   โ”œโ”€โ”€ code-data.js       # Code explanations
โ”‚   โ”œโ”€โ”€ methods-data.js    # Method documentation
โ”‚   โ”œโ”€โ”€ demo-data.js       # Demo scenarios
โ”‚   โ”œโ”€โ”€ demo-flow.js       # Flow diagram renderer
โ”‚   โ””โ”€โ”€ demo-controller.js # Demo interactions
โ””โ”€โ”€ assets/
    โ”œโ”€โ”€ images/            # Diagrams
    โ””โ”€โ”€ icons/             # Icons

๐ŸŽจ Example Tutorials

Nanobot Tutorial

URL: https://shuolsure.github.io/nanobot-weblearn/

Features:

  • 4 core feature modules with detailed explanations
  • Method pyramid structure and knowledge graph
  • 4 interactive demo scenarios
  • Complete code explanations with Socratic method
  • Mobile-responsive design

Screenshots:

  • Project Overview
  • Core Features
  • System Architecture
  • Method Relationships
  • Run Demo

๐Ÿ› ๏ธ Tools & Libraries

Recommended for Syntax Highlighting

Recommended for Diagrams

  • Mermaid.js - Flowcharts and sequence diagrams
  • D3.js - Custom interactive visualizations
  • SVG - For simple diagrams

Recommended for Search

Recommended for Deployment

๐Ÿ“‹ Best Practices

For Beginners

  1. Start simple - don't overwhelm with details
  2. Use analogies to explain complex concepts
  3. Make it visual with diagrams and charts
  4. Keep it interactive - let learners explore
  5. Show basics first, details on demand

For Code Explanation

  1. Explain every line, even imports
  2. Focus on "why" not just "what"
  3. Provide concrete usage examples
  4. Highlight common patterns

For Socratic Teaching

  1. Ask before telling
  2. Provide hints before answers
  3. Link to related concepts
  4. Use practical examples

โš ๏ธ Common Pitfalls to Avoid

  1. Too Technical Too Soon: Start with basics, add complexity gradually
  2. No Code Examples: Always show actual code when explaining concepts
  3. Passive Learning: Make it interactive, not just reading
  4. Poor UI/UX: Test on different devices and screen sizes
  5. Missing Deployment: Make sure it's accessible online
  6. No Progress Tracking: Let learners know how far they've come
  7. Broken Links: Verify all code links and references work

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

shuolsure

๐Ÿ™ Acknowledgments

  • Inspired by the need to make code learning accessible to everyone
  • Based on real-world experience creating the Nanobot Tutorial
  • Thanks to all contributors and users who provide feedback

๐Ÿ“Š Success Metrics

A successful tutorial created with this skill should:

  • โœ… Be understandable by complete beginners
  • โœ… Explain all core concepts with code examples
  • โœ… Use Socratic method to encourage thinking
  • โœ… Provide interactive exploration
  • โœ… Show real execution scenarios
  • โœ… Be accessible online
  • โœ… Work on mobile devices
  • โœ… Have clear navigation and search

๐Ÿ”— Links


Transform complex code into an enjoyable learning journey! ๐Ÿš€

About

A comprehensive skill for creating interactive web tutorials that help programming beginners learn codebases from scratch

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages