Week 1 · Lesson 02
Structured skill
A skill is a capability with a contract — not a vibe. Pure functions: no DB, no Instagram.
Learn
- Tools as contracts (Zod / JSON Schema)
- Skill purity: return artifacts, don’t own side effects
- Validate → retry once → fail loudly
Build
content_planning({ topic }) → { hook, angle, format, ... }- Use structured output from the model adapter
- 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?