← Back to curriculum

Module 7 — GenAI & LLMs

Building AI-automated workflows

Use coding agents effectively — Claude Code, skills, subagents, and cowork patterns for generating code, docs, and repeatable workflows.

~75 min read + exercises

Building AI-automated workflows

Before we begin

Modern AI engineering is not only “call an API once.” Teams use coding agents to generate code, documents, and repeatable workflows — with guardrails.

Cowork with an agent: you set goals and review; the agent edits files, runs commands, and iterates.


What you will learn

  • Use Claude Code / Cursor-style agents for real project work.
  • Structure work with skills (reusable instruction packs).
  • Delegate subtasks with subagents without losing oversight.
  • Avoid common failure modes in automated workflows.

Before this lesson


Coding agents vs chat

ChatCoding agent
One-shot answerMulti-step: read repo, edit, run tests
No file accessReads/writes project files
You paste contextAgent gathers context via search

Claude Code, Cursor Agent, and similar tools wrap an LLM with tools: file read/write, terminal, search, sometimes browser.


Skills

A skill is a markdown instruction file the agent loads for a task class — e.g. “create a PR”, “write an eval suite”, “add an MDX lesson”.

Why skills matter:

  • Consistency — same checklist every time.
  • Onboarding — junior devs get senior patterns baked in.
  • Safety — skill can require tests, forbid force-push, etc.

Store skills in your repo or editor config; reference them explicitly in the prompt: “Follow the create-lesson skill.”


Subagents

Subagents run focused child tasks (explore codebase, run CI, security review) and return a summary to the parent agent.

PatternUse when
Explore subagentLarge repo; need file map before editing
Shell subagentLong test runs without blocking main thread
Review subagentSecond opinion on diff before merge

Rule: parent agent keeps the goal; subagents get narrow prompts with clear deliverables.


Cowork patterns that work

  1. Small scope per turn — “Add RAG reranking to retrieve.ts” beats “build entire app”.
  2. Verify in the loop — agent runs npm test or npm run build after edits.
  3. Human review on merge — agent opens PR; you read diff.
  4. Version control always — never let agent work only in ephemeral chat.

What to automate first

Good candidatesPoor candidates
Boilerplate CRUD, tests, docsAmbiguous product strategy
Refactors with clear testsSecurity-critical crypto without review
Data migration scriptsOne-off creative marketing without brand guide

Connect to Module 8

Lesson 6 here is you using agents as a developer. Module 8 teaches building agents into your product (tools, MCP, multi-agent).


What's next

Lesson 7 — Fine-tuning vs RAG