# "Agentic Prompt Engineering with Claude Code"
<!--
ref: @content/youtube/indy-dev-dan/2025-09-15-agentic-prompt-engineering-with-claude-code
triggers: [need for reusable prompts, complex workflows, scaling agent tasks, improving prompt consistency]
trigger_prompt: When you want to enhance your prompt design for better collaboration among stakeholders and improve the efficiency of your agents.
version: 4
updated_at: 2026-10-31T20:10:22.489Z
-->

Claude Code (Indy Dev Dan, 2025-09-15): The prompt is now the fundamental unit of engineering — in the agentic era, every prompt is written for a **stakeholder trifecta** (you, your team, and your agents), and a single well-crafted prompt can trigger hundreds of tool calls and generate hours of productive work.

IndyDevDan delivers a structured masterclass on building reusable, composable agentic prompts in Claude Code, walking through seven levels of prompt formats from ad-hoc instructions to template meta-prompts.

## Core Thesis
The prompt is now the fundamental unit of engineering — in the agentic era, every prompt is written for a **stakeholder trifecta** (you, your team, and your agents), and a single well-crafted prompt can trigger hundreds of tool calls and generate hours of productive work. Mastery comes from building a library of **composable, swappable Lego-block sections** assembled with disciplined consistency, allowing you to scale engineering impact with compute through delegation and parallel sub-agents.

## Key Insights

- **Stakeholder Trifecta**: Every prompt now has three audiences — you, your team, and your agents. Engineering for all three is the new baseline.
- **Universal section vocabulary**: Across tens of thousands of prompts, the same composable sections recur — metadata, title, purpose, variables, codebase structure, instructions, workflow, and report.
- **Three-part skeleton**: Every well-designed agentic prompt follows **Input → Workflow → Output**. Inputs and outputs serve humans for quick comprehension; the workflow serves the agent.
- **Seven Levels of Agentic Prompt Formats** (progressive capability stacking):
  1. Ad-hoc high-level prompts
  2. Workflow prompt (the foundational pillar)
  3. Control flow prompt (conditions, loops, early returns)
  4. Delegation prompt (spawns sub-agents)
  5. Agentic prompts
  6. Template meta-prompts ("the prompt that builds the prompt")
  7. (Highest tier) — most engineers thrive at levels 3–4
- **Variables are underappreciated power**: Use **dynamic variables** (`$1`, `$2`, runtime args) for inputs and **static variables** for values referenced repeatedly (e.g., output directory). Modern LLMs reliably interpret natural-language variable syntax.
- **Workflow vs. Instructions**: Workflow is the play-by-play; instructions are auxiliary surrounding info. Workflows shine in user prompts; instructions shine in system prompts.
- **Codebase Structure ≠ "read these files"**: It's a context map giving the agent a 100ft view of where files live — the workflow specifies what to actually read.
- **Delegation is the "D" in R&D context engineering**: Primary agents act as prompt engineers for sub-agents, fanning out work in parallel. Non-determinism becomes a feature when 5+ agents surface different perspectives.
- **Predictability via structured reports**: Strict report formats (success/failure, URL, markdown path) give predictive control — the gateway to outer-loop autonomous agentic coding.
- **Consistency beats complexity**: Reusing the same prompt skeleton conserves engineering cycles for both you and the agent.
- **Information-dense keywords matter**: Words like `IMPORTANT` carry real weight with models.

## Actionable Takeaways

1. **Build a personal library** of composable, battle-tested prompt sections you can swap across commands.
2. **Structure every reusable prompt** with explicit metadata → title → purpose → variables → workflow → report sections.
3. **Use static variables** for any value referenced multiple times (e.g., output directory) — change once, propagate everywhere.
4. **Add early-return guards** at the top of workflows for required arguments (e.g., halt and ask if `path_to_plan` is missing).
5. **Restrict `allowed-tools` per prompt** (e.g., build prompts to read/write/bash only) to constrain agent behavior.
6. **Use XML blocks** to mark loop start/stop inside natural-language workflows for control flow prompts.
7. **Define strict report formats** for sub-agent returns so you know exactly what comes back before kicking off the prompt.
8. **Scale with `count`**: Parameterize parallel agent fan-out with positional variables; bump from 3 → 5+ agents to multiply perspectives.
9. **Apply the coworker test**: "Could a coworker complete this top-to-bottom from the prompt alone?" If not, tighten it.
10. **Prefer direct, agent-targeted tone** ("Generate images based on…") over passive descriptions ("This command generates images").
11. **Push your skill to B-tier minimum**; aim for S-tier **template meta-prompts** to compound velocity.
12. **Only include sections you need** — composability over completeness.

## Notable Quotes

> "The prompt is now the fundamental unit of engineering."

> "We're now engineering for three audiences. You, your team, and your agents. This is the stakeholder trifecta for the age of agents."

> "One well-crafted prompt can generate tens and hundreds of hours of productive work. One bad prompt compounds failure at the same rate."

> "Consistency is the greatest weapon against confusion for both you and your agent."

> "Our primary agent is the prompt engineer for our sub agents."

> "Once you build up great agents that perform for you... the next question is how many agents can you spin up?"

> "The prompt that builds the prompt, the agent that builds the agent."

> "Invest in your prompts for the trifecta to achieve asymmetric engineering in the age of agents."

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*