Paidagogos Micro
ASecurityProduces one focused lesson for a single, already-scoped concept — invoked by the paidagogos router after its scope check, or directly via /paidagogos:micro. Generates a structured lesson page (standard topics) or a live interactive page with sliders and visualisations (math, physics, geometry, statistics). Use for a concrete single concept such as "CSS flexbox", "async/await", "SQL JOINs", or "derivatives". For a bare or broad learning request ("teach me X", "explain X", "I want to learn X")...
- 2 stars
- 0 votes
- 0 copies
- 1 view
- Added September 19, 2026
Works with
Security analysis
100/100Pro scans all 4 files and shows the line behind each finding
npx -y skills add neotherapper/claude-plugins --skill paidagogos-micro --agent claude-codeAre you the author of Paidagogos Micro?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/neotherapper-paidagogos-micro)---
name: paidagogos-micro
description: >
Produces one focused lesson for a single, already-scoped concept — invoked by
the paidagogos router after its scope check, or directly via
/paidagogos:micro. Generates a structured lesson page (standard topics) or a
live interactive page with sliders and visualisations (math, physics,
geometry, statistics). Use for a
concrete single concept such as "CSS flexbox", "async/await", "SQL JOINs", or
"derivatives". For a bare or broad learning request ("teach me X", "explain
X", "I want to learn X"), the paidagogos router handles scope first and then
routes here.
license: MIT
metadata:
version: "0.2.0"
author: Georgios Pilitsoglou
---
# paidagogos:micro
> Paths in this skill are relative to the folder that contains this SKILL.md. Resolve them to absolute paths before reading a file or running a script.
Generates a SurfaceSpec JSON file that visual-kit renders in the browser. Two modes: **standard** (structured lesson page) and **interactive** (live HTML with sliders/canvas/SVG). The chat response is always a short URL-only confirmation — no lesson content in chat, unless `visual-kit` is unavailable (then the text fallback in **Error handling** applies).
---
## Pre-flight checks
Run all three checks before generating anything. Do not skip.
### Check 1 — Server running
Read `<workspace>/.visual-kit/server/state/server-info`.
- If `status` is `"running"`: extract `port`, carry it forward.
- Otherwise, auto-start — do NOT ask the user:
1. Run `visual-kit serve --project-dir <workspace>` as a background Bash command (`run_in_background: true`).
2. Poll the state file every 500 ms for up to 10 s until `status` equals `"running"`.
3. Extract `port` and continue.
4. If timeout elapses: halt. See **Error handling → Server failed to auto-start**.
### Check 2 — Expertise level
Detect level in order:
1. Inline statement — "I'm a beginner / advanced" → use it
2. Nothing stated → default to `intermediate`
`{level}` must be `"beginner"`, `"intermediate"`, or `"advanced"`. Anything else: halt and ask.
### Check 3 — Topic classification
Classify before reading any files — it determines the entire pipeline.
**`interactive`** when the topic is:
- A math concept that benefits from visual manipulation: equations, geometry, transformations, functions, calculus (limits, derivatives, integrals), statistics distributions
- A physics or chemistry concept with a parametric relationship (Ohm's law, projectile motion, gas laws)
- Anything the user described as "interactive", "with sliders", "show me visually", "animate", or "plot"
**`standard`** for everything else: programming, languages, history, processes, best practices, tools, frameworks, design patterns.
When uncertain, default to `standard`.
Store as `{mode}`.
---
## Standard pipeline (`{mode}` = `"standard"`)
### S1 — Read reference files
Read all three before generating content. Do not rely on memory from prior sessions.
1. `references/lesson-schema.md` — canonical `Lesson` SurfaceSpec schema, field rules, valid example
2. `references/teaching-guide.md` — content rules per section, level guidelines, quiz rules
3. `references/vault-integration.md` — vault lookup contract for `resources[]`
### S2 — Vault lookup
Attempt to source `resources[]` from the nikai Knowledge Vault following `references/vault-integration.md` exactly. If it fails for any reason, continue silently — see **Error handling → Vault lookup fails**.
### S3 — Generate lesson SurfaceSpec
Generate a JSON object conforming to `vk://schemas/lesson.v1.json` and applying all rules from `references/lesson-schema.md` and `references/teaching-guide.md`. Those files are authoritative — do not improvise field shapes.
Minimum required sections: `concept`, `why`, `code` (or prose equivalent), `mistakes`, `generate`, `quiz`, `resources`, `next`.
### S4 — Validate
Before writing, verify:
- `surface` = `"lesson"`, `version` = `1`
- All required sections present: `concept`, `why`, `code` (or prose equivalent), `mistakes`, `generate`, `quiz`, `resources`, `next`
- `mistakes.items` has 2–3 entries
- `quiz.items` has exactly 3 entries, one of each: `multiple_choice`, `fill_blank`, `explain`
- `resources.items` has at least 1 entry with `type: "docs"`
- `estimated_minutes` is between 1 and 60
Any failure: halt, do not write. See **Error handling → Schema validation failed**.
### S5 — Write and respond
Slug: topic → lowercase, hyphens, strip non-alphanumeric. Example: `"CSS Flexbox"` → `css-flexbox`.
Write to `<workspace>/.paidagogos/content/<slug>.json`, pretty-printed, 2-space indent.
Respond with:
```
Lesson ready: {topic} ({level})
→ Open http://localhost:{port}/p/paidagogos/{slug}
Estimated time: {estimated_minutes} minutes
When you're ready: {next}
```
---
## Interactive pipeline (`{mode}` = `"interactive"`)
Skip reference file reads and vault lookup — they do not apply.
### I1 — Generate free-interactive SurfaceSpec
Generate a JSON object conforming to `vk://schemas/free-interactive.v1.json`:
```json
{
"surface": "free-interactive",
"version": 1,
"title": "<topic> — interactive",
"html": "<full standalone HTML document>"
}
```
The `html` value must be a complete, self-contained HTML document:
- Inline CSS and vanilla JS only — no external CDN dependencies
- Interactive controls (sliders, inputs, buttons) wired to live output (Canvas, SVG, or DOM updates)
- The concept in action — not a static diagram
- Brief explanatory text describing what the controls do
- Clean layout; no chat-style prose
Validate: `surface` = `"free-interactive"`, `version` = `1`, `html` is non-empty.
### I2 — Write and respond
Slug: same rule as standard mode, but append `-interactive`. Example: `"(a+b)²"` → `ab2-interactive`.
Write to `<workspace>/.paidagogos/content/<slug>.json`.
Respond with:
```
Interactive lesson ready: {topic}
→ Open http://localhost:{port}/p/paidagogos/{slug}
```
---
## Notes (both modes)
- If the browser is already open to this URL, it auto-reloads via SSE when the file is overwritten. On a new topic the user must open it manually.
- Never include lesson content, quiz answers, or resource links in the chat response. All content lives in the browser page, except in the text fallback (see **Error handling**).
---
## Error handling
| Condition | User message | Action |
|---|---|---|
| Server failed to auto-start, or `visual-kit` not on PATH | *(no halt)* | Text fallback: present the lesson as Markdown in chat, following the section order in `references/lesson-schema.md`, and tell the user visual rendering needs the `visual-kit` binary (Claude Code plugin or repo clone). If the binary exists but failed to start, also report the actual error from the background process. |
| Schema validation failed | `"Lesson generation failed. Try a more specific topic."` | Halt. Do not write the file. |
| Content write fails | `"Could not write lesson file. Check visual-kit is running."` | Halt. The server is running, so this is a genuine write error; do not present content in chat. |
| Vault lookup fails | *(no message)* | Continue. Use AI-suggested resources for `resources[]`. |
Show error messages verbatim. No apologies, no extra suggestions. (End of file - total 169 lines)
Files in this skill
- SKILL.md
- references/lesson-schema.md
- references/teaching-guide.md
- references/vault-integration.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.