What Is the Purpose of the `learn` Skill in the AI Engineering from Scratch Curriculum?
The learn skill functions as the interactive tutor that orchestrates lesson delivery, manages resume routing across specialized learning paths, and persists learner progress in the AI Engineering from Scratch repository.
The learn skill is the central pedagogical engine in RohitG00's AI Engineering from Scratch. It transforms static curriculum content into a personalized, state-driven educational experience by determining what to teach next, how to deliver it interactively, and where to store learning evidence for future sessions.
Core Responsibilities of the Learn Skill
Orchestrating Lesson Delivery via the Six-Step Workflow
According to skills/learn/SKILL.md (lines 49-83), the skill implements a rigid Step 0-5 sequence that structures every learning session:
- Step 0: Route selection—checks for existing state files and dispatches to sub-skills if needed
- Step 1: Warm-up recall—presents two random quiz questions from the previous lesson
- Step 2: Lesson loading—fetches the next unfinished lesson from
phases/<phase>/<lesson>/docs/en.md - Step 3: Interactive delivery—walks through problem framing, core concepts, from-scratch implementation, and production-library comparisons
- Step 4: Progress recording—appends session data to
LEARNING.md(lines 63-71) - Step 5: Next steps—determines whether to continue, review, or pause
Managing Resume Routing and Sub-Skills
Before initiating a lesson, the skill inspects the filesystem for route-specific state files including LEARNING.md, MCP-LEARNING.md, and AGENT-SKILLS-LEARNING.md. As implemented in lines 49-73 of SKILL.md, if the learner wishes to resume a specialized path, the skill dispatches to dedicated sub-skills such as learn-mcp or learn-agent-skills, sourcing their curricula from learning-paths/model-context-protocol.json and learning-paths/agent-skills.json respectively.
Providing Warm-Up Recall Questions
To prime the learner's memory, Step 1 of the workflow (lines 20-27) automatically selects two random quiz questions from the previously completed lesson before introducing new material. This spaced repetition mechanism ensures knowledge retention across sessions.
Recording Progress and State Management
The skill maintains a comprehensive learning journal. At Step 4 (lines 63-71), it appends a structured row to LEARNING.md containing the date, lesson identifier, quiz score, and qualitative notes. It also updates phase status indicators and review queues, enabling precise session restoration.
Supporting Multiple Host Invocation Syntaxes
The skill defines a flexible host invocation contract (lines 22-30) that accommodates different execution environments. Whether running in Codex, Claude Code, or natural-language interfaces, the skill accepts learn, /learn, or conversational requests like "Use learn to start the AI engineering course."
Acting as the Curriculum Gateway
The learn skill serves as the entry point for the entire educational ecosystem. As noted in lines 15-19 of SKILL.md, when learners require personalized roadmaps, the skill can invoke the start-learning sub-skill to generate customized learning plans before transitioning into standard lesson delivery.
How the Learn Skill Retrieves Curriculum Content
The skill dynamically assembles lessons by reading from the structured phases/ directory:
# Conceptual content retrieval pattern based on SKILL.md implementation
lesson_content = f"phases/{current_phase}/{next_lesson}/docs/en.md"
quiz_data = f"phases/{current_phase}/{next_lesson}/quiz.json"
It parses the lesson's markdown to extract sections covering problem framing, core concepts, from-scratch implementation, and production-library comparisons, then presents the quiz questions defined in the accompanying JSON.
Practical Usage Examples
The learn skill operates across multiple host environments with syntax adaptations:
# Codex-style native command
learn
# Claude Code slash-command style
/learn
# Natural-language interface (any host)
Use learn to start the AI engineering course.
When invoked, the skill first attempts to read LEARNING.md to locate the learner's current position. If no state exists, it initializes a new learning session starting at Phase 1, Lesson 1.
Integration with Specialized Learning Paths
The architecture supports branching curricula through dedicated state files:
| State File | Sub-Skill | Source JSON |
|---|---|---|
MCP-LEARNING.md |
learn-mcp |
learning-paths/model-context-protocol.json |
AGENT-SKILLS-LEARNING.md |
learn-agent-skills |
learning-paths/agent-skills.json |
This routing logic enables the learn skill to function as a universal router, directing learners to domain-specific tutors while maintaining centralized progress tracking.
Summary
- The
learnskill acts as an interactive tutor that manages the complete lifecycle of a learning session in the AI Engineering from Scratch curriculum. - It implements a six-step workflow (Steps 0-5) defined in
skills/learn/SKILL.mdthat handles everything from resume routing to progress persistence. - The skill maintains learner state in
LEARNING.mdand supports specialized paths through separate state files and sub-skills. - It provides spaced repetition through warm-up quiz questions and supports multiple invocation syntaxes across different AI coding hosts.
- Content is dynamically fetched from the
phases/directory, combining lesson documentation (en.md) with interactive assessments (quiz.json).
Frequently Asked Questions
How does the learn skill know which lesson to teach next?
The skill reads the learner's state file, LEARNING.md, to identify the most recently completed lesson and selects the next sequential lesson from the curriculum structure defined in the phases/ directory. If no state file exists, it begins with Phase 1, Lesson 1.
Can the learn skill handle multiple specialized learning tracks?
Yes. Before starting a lesson, the skill checks for route-specific state files such as MCP-LEARNING.md or AGENT-SKILLS-LEARNING.md. If these exist and the learner chooses to resume that path, the skill dispatches to specialized sub-skills (learn-mcp or learn-agent-skills) while referencing their respective JSON curriculum definitions in the learning-paths/ directory.
What information does the learn skill store after each session?
According to lines 63-71 of skills/learn/SKILL.md, the skill appends a row to LEARNING.md containing the session date, lesson identifier, quiz score, and a brief qualitative note. It also updates phase completion status and review queue indicators to facilitate spaced repetition in future sessions.
How can I invoke the learn skill in different AI coding environments?
The skill supports a host invocation contract (lines 22-30) that accommodates various syntaxes: native commands (learn), slash commands (/learn), or natural language requests. The specific format depends on whether you are using Codex, Claude Code, or another compatible AI assistant host.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →