Week 1 · Lesson 02

Structured skill

A skill is a capability with a contract — not a vibe. Pure functions: no DB, no Instagram.

Time · ½ day
Learn
  • Tools as contracts (Zod / JSON Schema)
  • Skill purity: return artifacts, don’t own side effects
  • Validate → retry once → fail loudly
Build
  1. content_planning({ topic }) → { hook, angle, format, ... }
  2. Use structured output from the model adapter
  3. Unit-test: invalid shape is rejected
Checkpoint

Given a topic, you always get parseable JSON or a clear error — never free-form mush you hand-parse with regex.

Four notes
  • What problem does this layer solve?
  • What is allowed to call it?
  • What must it never do?
  • How do I observe and test it?