Skip to content
lesson-runner logo

Lesson Runner Skill

lesson-runner

Run Python code in lesson context with proper uv and venv handling for agent-spike project. Activate when user wants to run tests, demos, or CLI commands for lessons in lessons/ directories. Project-specific for agent-spike multi-agent learning.

SKILL.md

Full skill instructions

Lesson Runner Skill

Standard patterns for running lesson code in the agent-spike multi-agent learning project.

When to Use

This skill activates when:

  • User wants to run test/​demo scripts in lessons
  • User wants to execute lesson CLI commands
  • User is working in lessons/ directories
  • User asks "how to run this lesson"

Running Lesson Code

Standard Execution Patterns

Navigate to lesson directory first:

cd lessons/​lesson-XXX

Run test scripts:

uv run python test_router.py
uv run python test_coordinator.py
uv run python test_*.py

Run demo scripts:

uv run python demo.py "https://example.com"
uv run python demo.py "https://youtube.com/​watch?v=..."

Run module CLI (if lesson has one):

# Interactive mode
uv run python -m youtube_agent.cli interactive
uv run python -m webpage_agent.cli interactive

# Analyze mode
uv run python -m youtube_agent.cli analyze "URL"
uv run python -m <name>_agent.cli analyze "URL"

Running from Project Root

You can also run from project root (uv finds the lesson automatically):

# From root directory
uv run python lessons/​lesson-003/​demo.py "URL"
uv run python lessons/​lesson-001/​test_agent.py

Why uv run Works

Cross-directory execution:

  1. uv searches upward for pyproject.toml (finds project root)
  2. Looks for .venv at project root
  3. Also checks for lesson-specific .venv if in lesson directory
  4. Runs command with correct Python interpreter and dependencies

Benefits:

  • No manual venv activation
  • No manual path management
  • Works from any directory
  • Cross-platform (Windows/​Linux/​Mac)

Virtual Environment Structure (FYI)

This project has a hybrid .venv structure:

  • Root .venv: Contains all dependencies (created by uv sync --all-groups)
  • Lesson-001 .venv: Legacy from initial setup (still works)
  • Lessons 002, 003: Use shared root .venv

You don't need to manage this - uv run python handles it automatically.

Common Commands

# Install lesson dependencies
uv sync --group lesson-001
uv sync --group lesson-002
uv sync --group lesson-003
uv sync --all-groups              # Install all lessons (recommended)

# Check what's installed
uv pip list

# Run specific lesson
cd lessons/​lesson-001
uv run python -m youtube_agent.cli analyze "https://youtube.com/​watch?v=..."

cd lessons/​lesson-002
uv run python -m webpage_agent.cli analyze "https://github.com/​..."

cd lessons/​lesson-003
uv run python test_coordinator.py

Troubleshooting

If you get "module not found" errors:

  1. Check dependencies installed: uv sync --group lesson-XXX
  2. Verify you're using uv run python (not python directly)
  3. Check that you're in the right lesson directory

If you get ".env not found" warnings:

  1. Copy .env from another lesson: cp ../​lesson-001/​.env .
  2. Or create new .env with API keys (see lesson README)

If tests fail:

  1. Check STATUS.md for known issues
  2. Verify API keys in .env
  3. Check that lesson is marked as complete in STATUS.md

Quick Reference

Most common pattern:

cd lessons/​lesson-XXX
uv run python <script>.py

Always use:

  • ✅ uv run python (handles venv automatically)
  • ✅ -m flag for module execution (e.g., -m youtube_agent.cli)
  • ✅ Navigate to lesson directory first (clearer context)

Never use:

  • ❌ Manual .venv paths (.venv/​Scripts/​python.exe)
  • ❌ System python command directly
  • ❌ Relative venv paths (../​../​../​.venv/)

Note: See python-workflow skill for general Python/​uv best practices. This skill is specific to running agent-spike lesson code.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View