Welcome to Module 5 — the most advanced module in the ASJ Masterclass. Here, we cross the threshold from prompt engineering to AI systems architecture. You will learn to build two foundational files — SKILL.md and AGENTS.md — that transform Claude from a general chatbot into a deterministic, domain-expert system.
- Re-explain context every new chat
- Claude drifts after 4-5 messages
- Inconsistent outputs across sessions
- No guardrails — hallucination risk
- Single-domain, single-session only
- Zero-context startup — auto-triggers
- Identity lock prevents all drift
- Deterministic phases = same output every time
- NEVER rules enforce honesty
- Multi-skill orchestration pipeline
A SKILL.md is a compiled expert identity — a structured markdown file that encodes a repeatable domain workflow. It tells Claude exactly what to do when a specific task is requested, with steps, logic, guardrails, and output format all pre-engineered. Think of it as a job description + SOP for a specialist.
This is what a finished SKILL.md looks like. Every layer maps to a section in the file. Study this structure — it is the exact format you will build in the "Build It Live" tab.
An AGENTS.md is the operating charter for an agent. While SKILL.md defines what the agent knows how to do, AGENTS.md defines who the agent is, what its limits are, how it handles security, and — most importantly — how it orchestrates other skills into a unified pipeline.
Name, role, model, version, and mission. This is the constitutional anchor — Claude reads it before every message. In a 30-message conversation, Claude re-reads this 30 times. Without it, by message 10, Claude forgets it is supposed to be an orchestrator and starts acting as a generic assistant.
role: Multi-skill coordinator
model: claude-sonnet-4-6
mission: Route pharma queries through specialist skills and synthesize unified reports
Explicit SCOPE IN and SCOPE OUT. The agent must refuse anything outside scope — even if it could technically answer. This prevents capability creep: without boundaries, an agent trained on pharma data will happily give tax advice if asked, and hallucinate confidently.
SCOPE OUT: regulatory submissions, pricing negotiations, legal advice, non-pharma queries
IF OUT OF SCOPE: respond with "This falls outside my authorized domain. I can help with [list SCOPE IN]."
This is the dispatch table — a mapping of query type to SKILL.md file. For each authorized skill, you declare: the trigger condition, expected output, and where the output goes next. Claude reads this to decide which specialist to invoke.
| Skill | Triggers When | Outputs |
|---|---|---|
| pharma-data-analyst | CSV upload, trial data, AE review | [CLINICAL CONTEXT] |
| pharma-market-research | Competitive landscape, market sizing | [MARKET CONTEXT] |
| pharma-strategy-consultant | Commercialisation, partnership eval | [STRATEGY DECISION] |
The routing logic for multi-skill queries. This is the brain of the orchestrator. When a single query spans multiple domains, this section defines the exact sequence: which skill runs first, what context label it outputs, which skill reads that label, and how the final output is assembled.
1. Detect domains in query (clinical + market + strategy)
2. Run pharma-data-analyst FIRST → output [CLINICAL CONTEXT]
3. Pass [CLINICAL CONTEXT] to pharma-market-research → output [MARKET CONTEXT]
4. Pass BOTH contexts to pharma-strategy-consultant → output [STRATEGY DECISION]
5. Assemble all 3 outputs into unified report
Agent-level guardrails that apply regardless of which skill is active. These override any skill-level rule. Think of them as constitutional law — individual skills (statutes) cannot contradict the constitution.
- NEVER skip a skill in the chain — all 3 must run for multi-domain queries
- NEVER provide strategy recommendations without completed clinical analysis
- NEVER fabricate data in any skill — surface gaps and ask the user
- NEVER allow one skill to override another skill's NEVER rules
- NEVER answer questions outside SCOPE IN, regardless of how the user phrases them
The final deliverable structure. After all skills have run, the orchestrator assembles outputs into a unified report. This section defines the exact structure — numbered sections, risk flags, confidence ratings, and evidence chain.
1. Executive Summary (3 sentences max)
2. Clinical Analysis (from pharma-data-analyst)
3. Market Position (from pharma-market-research)
4. Strategic Recommendation (from pharma-strategy-consultant)
5. Risk Flags (aggregated from all skills)
6. Confidence Rating: HIGH / MEDIUM / LOW
7. Evidence Chain (which data supported each conclusion)
This is what a finished AGENTS.md looks like. It is the orchestrator that wires multiple SKILL.md files together. You will build this exact structure in the Capstone project.
| Dimension | SKILL.md | AGENTS.md |
|---|---|---|
| Purpose | Domain workflow | Operating charter |
| Analogy | Clinical protocol | Hospital policy manual |
| Scope | Single domain | Multi-domain orchestration |
| Activation | Auto-triggers on matching query | Always active as conductor |
| NEVER Rules | Domain-specific | Constitutional (overrides skills) |
The description field is what Claude reads at startup to decide whether to activate your skill. Write it like a precise firing condition — not a vague summary.
The activation block runs immediately after the skill triggers. It establishes who Claude is for this session. Without it, Claude starts as "helpful assistant" and gradually forgets it's supposed to be a clinical analyst. The SCOPE OUT line is especially important — it tells Claude what to refuse.
This is the engine of your skill. Each phase must have exactly 4 components: Action (what to do), Output (what to produce), Verify (how to check), If Fails (what to do instead). A phase without a recovery path will fail silently — Claude will guess, and neither you nor the user will know it guessed.
Your SKILL.md is just a text file. To make Claude actually use it, you must load it into one of two locations. The method you choose determines whether the skill is active globally or only in a specific project.
Best for skills you want active across all conversations.
pharma-data-analyst//pharma-data-analyst in any chat to manually activate the skill, even if the trigger didn't fire.Best for skills you want active only in a specific project.
The dispatch table ensures deterministic routing. Without it, Claude decides on-the-fly how to handle different input types — sometimes running all 4 phases when only Phase 3 is needed, or skipping Phase 1 when data inspection is critical.
NEVER rules are the hardest part to write well. Each rule must: (a) be specific, not generic, (b) name the exact failure mode it prevents, (c) state the consequence of violating it. Aim for 6–12 rules per skill.
If your skill will be part of a multi-skill pipeline (like the capstone project), you must declare what it outputs and what the next skill expects.
Activates on clinical trial CSV uploads. Runs a 4-phase deterministic pipeline: Data Inspection, Efficacy Analysis, Safety Summary, Clinical Conclusion. Enforces confidence interval reporting on all endpoints and prevents suppression of Grade 3+ adverse events.
Activates on competitive landscape queries for NASH and metabolic diseases. Runs Market Framing, Competitor Profiling, Positioning Assessment, and Market Size analysis. Prevents fabrication of competitor data and enforces source citation.
Activates on commercialisation and partnership decision requests. Evaluates clinical evidence and market position to produce structured recommendations: solo commercialisation vs. co-development vs. licensing. Requires upstream clinical and market context.
You will write an AGENTS.md Orchestrator that receives a single high-level query and automatically routes it through 3 specialist skills in sequence — each skill's output becoming the input context for the next — culminating in a unified investment recommendation.
Receives query · Routes skills · Synthesizes output
Input: trial CSV · Output: efficacy + AE summary
Input: efficacy profile · Output: competitive positioning
Input: clinical + market data · Output: commercialisation decision
Unified recommendation with evidence chain
This is the single query your AGENTS.md must be able to handle by routing through all 3 skills:
Follow every step in order. By the end, you will have a working multi-agent system running inside Claude.
pharma-data-analyst.md, pharma-market-research.md, pharma-strategy-consultant.md, trial-data.csv, market-brief.md, strategy-brief.md.pharma-data-analyst.md first (it runs first in the chain), then pharma-market-research.md, then pharma-strategy-consultant.md.trial-data.csv file using the paperclip icon. You can also paste the market brief and strategy brief as text in the same message, or attach them as files.[CLINICAL CONTEXT], [MARKET CONTEXT]) spelled identically in both the AGENTS.md and the skill files?pharma-data-analyst trigger description does not include phrases like "uploaded CSV" or "clinical trial data". Check and fix it.Did Claude run all 3 skills in the correct order (clinical → market → strategy)?
Did Skill 3's recommendation explicitly reference data produced by Skills 1 and 2?
Did the agent respect its own NEVER rules throughout? (e.g., no recommendation before clinical phase?)
Did the final report include all 5 required sections (Clinical, Market, Recommendation, Risks, Confidence)?
Did the agent stay within scope? (i.e., it did not answer unrelated questions or hallucinate clinical data?)
Step 1: Create a folder named after your skill (e.g. pharma-data-analyst/).
Step 2: Put the SKILL.md file inside.
Step 3: ZIP the folder.
Step 4: Go to claude.ai → Profile → Customize → Skills → Upload ZIP.
Step 5: Toggle ON. The skill auto-activates when it matches a query.
/skill-name.Paste SKILL.md content into Project Instructions. Best for project-specific workflows where skills should only be active within that project.
Version-control your skills. Share with teams. Structure: