Module 5: Claude Sub-Agents and Skills

MGMT 675: Generative AI for Finance

Kerry Back, Rice University

Sub-Agents

What Is a Sub-Agent?

When Claude Code handles a complex task, it can spin up sub-agents — separate Claude instances that work on subtasks in parallel or in sequence, then report back.

Orchestrator

  • The main Claude session you are talking to
  • Breaks the task into pieces
  • Delegates to sub-agents and synthesizes results

Sub-Agent

  • A fresh Claude instance with its own context
  • Receives a specific subtask and tools
  • Returns its result to the orchestrator

Sub-agents allow Claude to work in parallel and to keep each subtask focused — the orchestrator stays high-level while sub-agents do the detailed work.

Spontaneous Sub-Agents

Claude Code decides on its own when a task warrants sub-agents. You do not have to ask.

  • Parallel research: fetching data from multiple sources simultaneously
  • Multi-file analysis: reviewing several documents at once and comparing findings
  • Iterative workflows: one agent drafts, another critiques, another revises
  • Long computations: splitting a large dataset across agents to stay within context limits

You will see a notice when Claude spawns a sub-agent. Each sub-agent has its own tool permissions and context window, so it starts fresh — it does not inherit your conversation history.

Requesting a Sub-Agent

You can explicitly ask Claude to use a sub-agent for any task:

  • “Use a sub-agent to research competitor pricing and report back.”
  • “Spawn a sub-agent to review this code for bugs while you work on the next feature.”
  • “Use three parallel sub-agents to analyze each of these three reports, then summarize.”

This is especially useful when you want a task isolated from the main context — for example, a long web search or a large file analysis that would otherwise fill the context window.

The /critique skill in the exercise below is a worked example: it spawns three parallel sub-agents (correctness, clarity, devil’s advocate) and has the orchestrator synthesize their findings.

Claude Skills

Claude Desktop vs. Terminal Claude Code

Claude Desktop — Chat tab

  • Equivalent to claude.ai in a browser
  • Conversational interface, no filesystem access
  • Built-in document skills auto-activate
  • Custom skills uploaded as ZIP files

Claude Desktop — Code tab

  • Equivalent to the Claude Code CLI in a terminal
  • Full filesystem and tool access
  • Reads ~/.claude/skills/ for custom skills
  • Invoke skills with /skill-name

The Code tab and the terminal CLI are the same engine. Everything covered in this module applies equally to both.

Installing Claude Code (Terminal)

Use the native installer — npm is deprecated as of 2026.

macOS / Linux / WSL

curl -fsSL https://claude.ai/install.sh | bash

Windows (PowerShell)

irm https://claude.ai/install.ps1 | iex

Requires Git for Windows installed first.

Then launch from any project folder:

cd my-project
claude

The native installer auto-updates in the background and requires no Node.js. After installing, run claude doctor to verify everything is working.

Built-In Document Skills

Anthropic ships four document skills with every Claude product. No setup required.

Excel

  • Create and edit Excel workbooks
  • Uses live formulas, not hardcoded values
  • Supports charts, formatting, multiple sheets

Word

  • Create and edit Word documents
  • Professional formatting, headers, tables
  • Supports tracked changes and comments

PowerPoint

  • Create and edit PowerPoint decks
  • Slide layouts, charts, speaker notes
  • Can modify existing presentations

Desktop chat / claude.ai

  • Skills activate automatically based on your request
  • No / command needed

Claude Code (CLI or Desktop Code tab)

  • Invoke explicitly: /xlsx, /docx, /pptx
  • Or just ask — Claude invokes the right skill

Both surfaces

  • Same skill logic and output quality
  • Code tab reads ~/.claude/skills/ like the CLI

The /xlsx Skill

In Claude Code, skills are plain text files stored in ~/.claude/skills/. You can read the full /xlsx skill at:

It instructs Claude to use live Excel formulas instead of hardcoded values, specifies a standard workflow (create, format, save, recalculate, verify), and includes financial modeling standards.

Claude Desktop and claude.ai use the same skill logic, but the files are managed by Anthropic — you cannot browse them on your machine.

Pre-Installed Skills: Skill Creator

The /skill-creator skill is a guide for building your own skills.

  • Walks you through designing a new skill step by step
  • Generates the skill definition file
  • Installs the skill so it appears as a / command

We will use /skill-creator in the exercise below to build a personal task manager skill.

Custom Skills in Claude Desktop and claude.ai

The built-in document skills are always on. You can also add your own custom skills.

Desktop chat / claude.ai

  • Go to Settings → Customize → Skills
  • Click + to upload a ZIP file containing a folder with a SKILL.md file
  • Toggle custom skills on or off
  • Claude auto-invokes based on the skill’s description

Claude Code (CLI or Desktop Code tab)

  • Drop a folder with a SKILL.md into ~/.claude/skills/
  • Invoke with /skill-name or let Claude load it from context
  • Project-level skills go in .claude/skills/ inside your repo

The description in your SKILL.md tells Claude when to invoke the skill, so make it specific. Custom skills are private to your account.

Exercise: A Critique Skill

Create a /critique skill that reviews work Claude has produced by spawning three parallel reviewer agents:

Correctness

  • Factual errors, logic gaps
  • Missing assumptions
  • Math or data mistakes

Clarity

  • Structure and readability
  • Redundancy or buried points
  • Proposed rewrites

Devil’s Advocate

  • Challenge assumptions
  • Strongest counterarguments
  • Weakest reasoning

The skill should synthesize findings, present them ranked by severity, and offer to apply revisions. Ask Claude to create it.

Exercise: Critique Loop

  1. Copy a document you’ve created into your working folder (e.g., a memo, report, or exercise solution).
  2. Tell Claude: “Apply the critique skill in a loop — critique, make the recommended changes, critique again, and continue until the agents are happy.”

Exercise: Create a Tasks Skill

Use /skill-creator to build a tasks skill that manages personal and school to-do lists. The skill should:

  • Store tasks in markdown files (e.g., personal.md, school.md)
  • Add new tasks with a category and due date
  • List pending tasks when asked
  • Mark tasks as complete

Exercise: Steps

  1. Describe the task manager you want and ask Claude to create a skill for it
  2. Let Claude generate and install the skill
  3. Test it: “/tasks Add: finish DCF exercise, due Tuesday”
  4. Test it: “/tasks What’s pending?”

This should work fine without typing /skill-creator because Claude knows about the skill-creator skill via the CLAUDE.md.