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
| Chat | Coding agent |
|---|---|
| One-shot answer | Multi-step: read repo, edit, run tests |
| No file access | Reads/writes project files |
| You paste context | Agent 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.
| Pattern | Use when |
|---|---|
| Explore subagent | Large repo; need file map before editing |
| Shell subagent | Long test runs without blocking main thread |
| Review subagent | Second opinion on diff before merge |
Rule: parent agent keeps the goal; subagents get narrow prompts with clear deliverables.
Cowork patterns that work
- Small scope per turn — “Add RAG reranking to
retrieve.ts” beats “build entire app”. - Verify in the loop — agent runs
npm testornpm run buildafter edits. - Human review on merge — agent opens PR; you read diff.
- Version control always — never let agent work only in ephemeral chat.
What to automate first
| Good candidates | Poor candidates |
|---|---|
| Boilerplate CRUD, tests, docs | Ambiguous product strategy |
| Refactors with clear tests | Security-critical crypto without review |
| Data migration scripts | One-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).