PG
Back to all posts

Skills, Sub-Agents & Workflows: Engineering with AI

Deep dive into how I structure AI agent workflows for maximum leverage.

Feb 20, 20266 min
AIAgentsEngineering

What Are Skills and Sub-Agents?

In my workflow, skills are reusable, composable units of capability — like functions in code but for AI behavior. A skill might be:

  • "Search the web for recent documentation"
  • "Generate a React component from a description"
  • "Write unit tests for this function"

Sub-agents are specialized agents that combine multiple skills to handle a domain. For example:

  • A research sub-agent has skills for web search, summarization, and comparison
  • A code sub-agent has skills for generation, review, and test writing
  • An architecture sub-agent has skills for pattern matching, trade-off analysis, and diagram generation

How I Chain Them

The power comes from chaining skills together into workflows:

Research Agent
  → Gather requirements
  → Summarize existing solutions
  → Identify gaps
  
Architecture Agent
  → Propose system design
  → Review data models
  → Suggest API contracts
  
Implementation Agent
  → Scaffold project structure
  → Generate initial code
  → Write tests
  
Review Agent
  → Audit for security
  → Check performance
  → Verify accessibility

Tool-Use Pipelines

Modern AI agents can use tools — not just generate text. I structure my agents to use:

  • File system tools — Read, write, create, and delete project files
  • Terminal tools — Run commands, install packages, execute tests
  • Web search tools — Fetch documentation, check Stack Overflow, find examples
  • API tools — Make HTTP requests, test endpoints, validate responses

Real Examples from My Projects

Forge (AI IDE)

Forge's AI agent runs up to 20 tool-call iterations in a background job, reading and writing files, running the preview, and iterating until the user's request is satisfied. It uses Inngest for durable execution, meaning if the agent crashes mid-way, it resumes exactly where it left off.

Steve (AI Brain)

Steve uses multi-agent orchestration to handle different cognitive tasks. One agent manages long-term memory (Obsidian vault), another handles active task execution, and a third provides metacognitive oversight — monitoring the quality of work and suggesting improvements.

InvGenie

While not directly an AI project, InvGenie benefits from AI-assisted development. I used agents to generate boilerplate code, write test scaffolds, and create documentation. The AI handled the repetitive parts; I focused on the architecture and business logic.

The Future

As AI agents get more capable, the role of the engineer shifts from "writing code" to "orchestrating agents who write code." The engineers who thrive will be the ones who can:

  • Structure problems for AI consumption
  • Review and validate AI output
  • Design systems that are agent-friendly
  • Build tool-use pipelines that are safe and reliable