How the course-guide Skill Functions as a Topic Router

The course-guide skill operates as a deterministic topic router by classifying learner requests into six distinct categories, querying static curriculum manifests and the repository README, and returning precise lesson identifiers with host-specific next-action commands.

The course-guide skill serves as the central navigation layer for the rohitg00/ai-engineering-from-scratch curriculum. When learners submit topics, questions, or struggles, this topic router maps unstructured requests to exact lesson paths without consulting external APIs. All routing decisions rely solely on static repository contents defined in skills/course-guide/SKILL.md and supporting manifest files.

Six Input Categories Drive Routing Decisions

The skill parses every incoming request into one of six distinct input shapes before selecting a routing strategy. These categories determine which data sources the router consults and how it prioritizes results:

  • Topic – A direct subject inquiry (e.g., "attention mechanisms")
  • Struggle – A problem or error description (e.g., "NaN loss in optimizer")
  • Meta – Questions about the curriculum structure or learning path
  • Certification – Queries related to Claude certification tracks
  • MCP – Requests involving Model Context Protocol concepts
  • Agent Skills – Questions about autonomous agent development

This classification occurs in the Ask Interpretation phase (lines 74‑93 of SKILL.md), where the skill analyzes intent keywords and selects the appropriate lookup method.

The Seven-Step Routing Pipeline

The routing logic follows a deterministic sequence defined in skills/course-guide/SKILL.md, ensuring reproducible answers across all invocation contexts.

1. Host-Invocation Contract

Before processing content, the skill identifies the execution environment to format next-action commands correctly. The host-invocation contract (lines 21‑30) defines syntax rules for three targets:

  • Codex CLI – Emits commands like learn or check-understanding
  • Claude Code – Uses slash commands like /learn
  • Plain language – Provides instructions in natural text

2. Curriculum Indexing via Routing Table

The skill locates lessons by reading the Contents section of the repository’s README.md (lines 36‑44). This table serves as the master index, mapping lesson titles to their phase and directory structure. The skill reads this file locally or fetches it from the raw GitHub URL to build a searchable lesson map.

3. Special Route Manifests

For specific sub-domains, the skill bypasses the generic README table and queries dedicated JSON manifests (lines 50‑68):

These manifests contain ordered lesson sequences and prerequisite chains for their respective domains.

4. Fuzzy Lesson Matching

For Topic and Struggle classifications, the skill performs a fuzzy match against lesson titles from the routing table. It then fetches each candidate lesson’s docs/en.md file to verify content coverage before presentation (lines 96‑101). The router limits results to three maximum lessons to avoid overwhelming the learner.

5. Response Formatting Constraints

All replies adhere to a strict answer shape protocol (lines 103‑112):

  • Maximum 12 lines of output
  • Lesson identifiers (Phase, Number, Title)
  • One-sentence coverage justification
  • Direct URLs formatted as https://aiengineeringfromscratch.com/lesson?path=phases/<phase-dir>/<lesson-dir>
  • Prerequisites (when applicable)
  • Host-specific next-action command

6. Fallback Handling

When no lesson matches the query, the skill executes a fallback procedure (lines 15‑16). It identifies the closest relevant phase from the curriculum structure and suggests that section, explicitly avoiding fabrication of non-existent lessons.

Host-Specific Usage Examples

The skill adapts its output format based on the detected host environment while maintaining consistent lesson linking logic.

Codex CLI Invocation

learn course-guide attention

Response:

<ul>
  <li>Phase 05 – Lesson 12 – "Attention Mechanisms": teaches scaled dot-product attention (why it works).</li>
  <li>Prerequisite: basic linear algebra.</li>
  <li>Next action: `learn` to start the lesson now.</li>
</ul>

Claude Code Invocation

/course-guide how does backprop work

Response:


Learn the back-propagation fundamentals in Phase 04 – Lesson 03 – "Back-propagation Basics". Next: /learn

Natural Language Processing

Input: "I'm stuck on NaN loss in my optimizer"

Interpretation: The skill classifies this as a Struggle query.

Response:


1. Phase 03 – Lesson 07 – "Numerical Stability" – explains why loss can overflow.
2. Phase 03 – Lesson 08 – "Gradient Clipping" – fixes NaN issues.

Next action: `learn` (or `check-understanding 3` to test).

Key Source Files Supporting the Router

The deterministic routing behavior depends on these specific files within the repository:

Summary

  • The course-guide skill functions as a deterministic topic router that maps learner requests to curriculum segments without external API dependencies.
  • Six input shapes (Topic, Struggle, Meta, Certification, MCP, Agent Skills) determine which routing strategy and data sources the skill employs.
  • The primary routing table resides in the README.md Contents section, while specialized manifests handle certification and protocol-specific queries.
  • Host-specific formatting ensures responses use the correct command syntax for Codex CLI, Claude Code, or natural language environments.
  • All lesson URLs follow the pattern https://aiengineeringfromscratch.com/lesson?path=phases/<phase-dir>/<lesson-dir> with a maximum 12-line response limit.

Frequently Asked Questions

How does the course-guide skill determine which lesson to recommend?

The skill first classifies the request into one of six categories, then performs a fuzzy match against lesson titles from the README.md Contents table or specialized JSON manifests. For Topic and Struggle queries, it verifies coverage by scanning each candidate lesson’s docs/en.md file before presenting up to three matches with direct links.

What happens when the course-guide skill cannot find a matching lesson?

When no lesson matches the query, the skill executes its fallback protocol defined in SKILL.md lines 15‑16. It identifies the closest relevant phase from the curriculum structure and directs the learner to that section, explicitly declining to invent non-existent lessons or hallucinate content.

Which input formats can the course-guide skill process?

The skill recognizes six distinct input shapes: direct Topic inquiries, Struggle descriptions (errors/debugging), Meta questions about curriculum structure, Certification queries for Claude tracks, MCP (Model Context Protocol) questions, and Agent Skills development requests. Each shape triggers a specific lookup strategy in the routing pipeline (lines 74‑93).

Where does the skill store its curriculum mapping data?

The skill relies on static files within the repository: the README.md Contents section serves as the master routing table for general lessons, while certifications/claude/program.json, learning-paths/model-context-protocol.json, and learning-paths/agent-skills.json provide specialized paths for certification and protocol-specific queries.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →