I kept catching the same UX mistakes during product review. Misaligned CTAs, unclear hierarchy, buttons that looked clickable but weren't. I'd explain the fix, the team would nod, and two weeks later I'd see the same patterns.

So I built Mira. She's a product psychology agent - a markdown file trained on every design principle, usability heuristic, and psychology framework I'd internalized over the past decade. I fed her my notes, my references, my critique patterns.

And honestly? Her output was better than mine. More consistent, more thorough, and she never forgot the principles I'd only half-remember under deadline pressure.

I had made myself redundant at my own skill.

In Part 1 I covered Claude Code itself: CLAUDE.md, MCP, and the mental model. This is where it gets practical--how to actually build the agents, skills, and rules that make the system work.

The Mental Model

An AI agent is a markdown file that tells a language model who it is, what it can do, and what steps to follow. A job description for an AI teammate.

Here's how I think about it. The whole system runs on three building blocks:

🤖 Subagents are specialized AI assistants defined as .md files in .claude/agents/. Each one has a name, a description Claude reads to decide when to delegate, and a system prompt that defines its behavior. You can restrict which tools it uses, which model it runs on, and even give it persistent memory across sessions.

Skills are reusable instructions packaged as SKILL.md files inside .claude/skills/<skill-name>/. They extend what Claude can do. You can invoke them with /skill-name as a slash command, or Claude loads them automatically when relevant. Think of them as SOPs that any agent (or you) can trigger.

🧠 Memory is how the system stays consistent. CLAUDE.md files contain project-wide instructions (brand voice, workflows, rules). .claude/rules/*.md files let you organize instructions by topic. And Claude's auto memory builds up institutional knowledge over time. Update one file and every agent's output changes.

Setting Up From Scratch

I'll walk through this using Claude Code as the runtime, but the pattern works with any LLM that can read files. OpenClaw, Cursor, even ChatGPT with file uploads.

By the way! At the end I’ll just share a prompt you can run to set things up for you but this explains what is happening

Step 1: Create the Folder Structure

This takes 30 seconds:

your-project/
├── .claude/
│   ├── agents/        # One .md file per subagent
│   ├── skills/        # One folder per skill, each with SKILL.md
│   ├── rules/         # Modular project instructions
│   └── CLAUDE.md      # Project-level instructions (alternative location)
├── CLAUDE.md          # Project-level instructions
└── ... your code

You don't need a package manager or a build step. The .claude/ directory is where Claude Code looks for agents, skills, and rules. CLAUDE.md at the project root (or inside .claude/) is your master instruction file.

Step 2: Write Your Master Instruction File

This is the most important file in the system. CLAUDE.md tells Claude Code how to behave in your workspace. It's loaded into context at the start of every session.

Mine includes:

  • Brand voice: sentence length, tone, formatting, words to avoid

  • Compliance rules, including claims that must never be made

  • Key project architecture and conventions

  • Frequently used commands (build, test, deploy)

  • Tool integrations for Notion, Figma, PostHog via MCP

You can also organize instructions into separate files using .claude/rules/. Each .md file in that directory is automatically loaded:

.claude/rules/
├── brand-voice.md      # Tone, style, dos and don'ts
├── compliance.md       # What you can and can't say
└── code-conventions.md # How we write code here

This is way cleaner than cramming everything into one giant CLAUDE.md. Each rule file stays focused on one topic, and you can scope rules to specific file paths using YAML frontmatter.

The fastest way to bootstrap it? Run /init inside Claude Code. It generates a starter CLAUDE.md based on your codebase.

Step 3: Create Your First Subagent

Pick the task you repeat most. For us it was ad copy, so our first agent was Maya.

Subagent files live in .claude/agents/ and use YAML frontmatter for configuration, followed by the system prompt in markdown. Here's the actual structure:

---
name: maya
description: Senior ad creative strategist. Use when creating ad campaigns, writing ad copy, or generating creative briefs.
tools: Read, Grep, Glob, Bash
model: sonnet
---

You are Maya, a senior ad creative strategist.

Before generating anything, read the project's CLAUDE.md and
.claude/rules/ files for brand voice and compliance rules.

Your workflow:
1. Ask for target audience + pain point + awareness stage
2. Research the pain point
3. Generate 30 ad concepts across awareness stages
4. Write designer-ready briefs for the top 10
5. Run compliance check (RED/YELLOW/GREEN) on every claim

Never make unsubstantiated health claims. Flag anything that
needs medical review.

The description field is the key. Claude reads it to decide when to delegate to this subagent. When I type "create Meta ad concepts for women 35-42 experiencing brain fog," Claude sees that Maya's description mentions ad campaigns and delegates to her automatically.

You can also use the /agents command inside Claude Code to create subagents interactively. It walks you through the setup, lets you pick tools and a model, and even generates the system prompt from a description you give it.

Just type /agents and click create new agent - it will walk you through everything

The first time I watched it generate Maya's entire persona from a paragraph of instructions, I just sat there for a second. It felt like describing a colleague and watching them materialize.

Also when you call the agent, ensure you use the AGENT not the .md file. It will look something like the above

It should look like this when you use an agent. Colors may differ

Step 4: Add Your Rules and Reference Docs

This is what makes agents actually useful instead of generic. Rules files are the shared brain.

.claude/rules/
├── brand-voice.md         # Tone, style, dos and don'ts
├── personas.md            # Target audience profiles
├── compliance-rules.md    # What you can and can't say
├── product-info.md        # Features, pricing, positioning
└── competitor-intel.md    # What others are doing

Every agent reads from CLAUDE.md and .claude/rules/ automatically. Update one file and every agent's output changes. It's like onboarding a new employee instantly across your entire team.

You can also scope rules to specific file paths. Put this at the top of a rule file and it only applies when Claude is working on matching files:

---
paths:
  - "src/marketing/**/*.md"
---

Same approach as before. Describe the vibe, let Claude write it:

Create .claude/rules/brand-voice.md for our brand. We're a health tech company. Tone is confident but not arrogant, conversational but intelligent. We have a point of view and we back it up. Every piece of content should leave the reader with something actionable.
Short paragraphs, bold key phrases, em dashes over parentheses.
We never say "leverage" or "synergy." Plain language, always.

You'll edit it after. But the first draft gets you most of the way.

Step 5: Build a Skill

Skills are reusable instructions that any agent (or you) can invoke. Each skill lives in its own folder under .claude/skills/ with a SKILL.md file as the entrypoint.

.claude/skills/
└── testimonial-extraction/
    ├── SKILL.md           # Main instructions (required)
    └── examples/
        └── sample.md      # Example output

Here's what the SKILL.md looks like:

---
name: testimonial-extraction
description: Extract social proof from Reddit, forums, and review sites. Use when any agent needs testimonials or user quotes.
---

When invoked, search Reddit, forums, and review sites for the
product or topic. Extract direct quotes with specific outcomes.
Categorise by pain point, result, and emotional tone. Score each
quote 1-10 on specificity and believability. Output as a table
with the quote, source, pain point, score, and usage rights.

The description tells Claude when to use this skill automatically. Or you can invoke it directly by typing /testimonial-extraction in Claude Code.

Maya can use this skill, and so can Ella, and so can any future agent. Write once, reuse forever.

Step 6: Connect External Tools (Optional)

If you're using Claude Code, you can connect tools via MCP (Model Context Protocol). Configure them in .claude/mcp.json:

{
  "mcpServers": {
    "notion": { "type": "http", "url": "<https://mcp.notion.com/mcp>" },
    "figma": { "type": "http", "url": "<https://mcp.figma.com/mcp>" }
  }
}

This lets agents read and write to Notion, pull Figma designs, query PostHog--all through natural language. You can also restrict which MCP servers a specific subagent can access by listing them in its frontmatter.

What my /mcp shows me when I do it.
Ask claude to help you with MCPs or search them online

How Agents Chain Together

I type: "Create Meta ad concepts for women 35-42 experiencing brain fog." Claude sees the task matches Maya's description and delegates to her.

  1. Maya reads CLAUDE.md and the rules files for brand voice, personas, and compliance

  2. Maya runs Reddit research through the /testimonial-extraction skill

  3. Maya generates 30 ad concepts across awareness stages

  4. I pick my top 10

  5. Maya writes designer-ready briefs with copy

  6. Vera runs compliance check, RED/YELLOW/GREEN flags on every claim

  7. I get 10 compliant, ready-to-ship ad briefs

This now takes minutes instead of hours

Mira does something similar for design reviews. She reads our UX principles, cross-references against psychology frameworks, and flags issues I might miss at 11pm on a Tuesday.

Another one: "Ella, write emails for all 6 lifecycle stages." I describe the full sequence and she works through each stage. Done in about an hour.

The Compounding Part

Once you set up the system, you just talk to it. You say "Maya, create a campaign" and it works. You say "Marcus, review this for medical accuracy" and it works.

And it compounds. Every time someone builds a new agent or writes a new skill, the whole team gets smarter. One person solves a problem once, and every future conversation benefits from it.

We started with 3 agents, then 7, then 15, now 20. Each one started because someone kept hitting the same problem and decided to solve it once.

One agent creates video ads end-to-end from a single brief. Another rebuilt our entire Linear workflow from templates.

Getting Started

You don't have to create any of those files manually. Open Claude Code in an empty folder and paste this:

I want to set up an AI agent system in this directory.

1. Create this folder structure:
   - .claude/agents/ (one .md file per subagent)
   - .claude/skills/ (one folder per skill, each with SKILL.md)
   - .claude/rules/ (modular project instructions)
   - CLAUDE.md (master project instruction file)

2. In CLAUDE.md, set up:
   - Brand voice and formatting rules
   - Key project conventions
   - Compliance rules for [YOUR INDUSTRY]

3. Create my first subagent in .claude/agents/:
   [DESCRIBE YOUR AGENT HERE - role, tools it needs, its workflow]
   Use YAML frontmatter with name, description, tools, and model fields.

4. Create starter rules in .claude/rules/ for:
   [YOUR BRAND/PRODUCT INFO - brand voice, compliance, product details]

5. Create one skill in .claude/skills/ that the agent should use for:
   [COMMON TASK - use YAML frontmatter with name and description]

Make all files detailed and production-ready.
I want to be able to use this immediately.

Replace the bracketed parts with your specifics. Claude scaffolds the whole system in about 60 seconds. Then you just start talking to your agent.

The Rest of This Series

Part 1: Getting Comfortable with Claude Code CLAUDE.md, MCP, and the mental model for working with AI in your terminal

Part 3: How I Built My AI Chief of Staff → the 24/7 agent that monitors Slack, reads my calendar, tracks revenue, and sends me briefings every morning. (COMING SOON)

There's a running bet between Max (our CEO) and I that we'll never need to hire employee number 100.

It started as a joke. It's getting less funny. (in a good way)

Until next time,

Ajay

🧠 Ajay’s Resource Bank

A few tools and collections I’ve built (or obsessively curated) over the years:

  • 100+ Mental Models
    Mental shortcuts and thinking tools I’ve refined over the past decade. These have evolved as I’ve gained experience — pruned, updated, and battle-tested.

  • 100+ Questions
    If you want better answers, ask better questions. These are the ones I keep returning to — for strategy, reflection, and unlocking stuck conversations.

  • Startup OS
    A lightweight operating system I built for running startups. I’m currently adapting it for growth teams as I scale Superpower — thinking about publishing it soon.

  • Remote Games & Activities
    Fun team-building exercises and games (many made in Canva) that actually work. Good for offsites, Zoom fatigue, or breaking the ice with distributed teams.

Ajay’s “would recommend” List

These are tools and services I use personally and professionally — and recommend without hesitation:

  • Athyna – Offshore Hiring Done Right
    I personally have worked with assistants overseas and built offshore teams. Most people get this wrong by assuming you have to go the lowest cost for automated work. Try hiring high quality, strategic people for a fraction of the cost instead.

  • Superpower – It starts with a 100+ lab tests
    I joined Superpower as Head of Growth, but I originally came on to fix my health. In return, I got a full diagnostic panel, a tailored action plan, and ongoing support that finally gave me clarity after years of flying blind.

Keep Reading