Module 3 • Lesson 945 mins

Skills - Guiding AI with Expert Rules and Procedures

The 3 core components of enterprise Skills, Progressive Disclosure 3-tier loading architecture, and the boundary separating Skills from RAG.

Distinguishing RAG (Facts/Data) vs. Skills (Workflows/Rules)
The 3 core components of a Skill (Trigger, Sequential SOP, Negative Constraints)
Progressive Disclosure architecture and production Skill refactoring

Skills - Guiding AI with Expert Rules and Procedures

RAG solves missing information via retrieval. However, factual knowledge alone does not ensure correct execution - models can still format answers incorrectly, skip verification checks, or overstep operational authority. Skills (Expert SOPs) provide the standardized operating playbooks governing how AI executes tasks.

1. Why AI Fails Even With Complete Information

Consider a new hire who has memorized all product manuals but lacks operational training:

  • Responds verbosely, curtly, or with inconsistent tone.
  • Forgets to collect order IDs or evidence photos before resolving issues.
  • Arbitrarily promises compensation exceeding company policies.

PM Insight: A Skill is an operational playbook pinned to the AI's desk, ensuring the model activates the right SOP and executes each step systematically.

2. The 3 Core Components of a Skill

  1. Trigger Condition: Defines the precise user scenario or intent that activates this playbook.
  2. Sequential SOP Rules: Mandatory execution steps (Step 1: Empathy; Step 2: Verification; Step 3: Resolution).
  3. Negative Constraints: Red-line guardrails specifying what the AI must NEVER do under any circumstance.

Anatomy of an Enterprise Skill Card

A Skill functions like a complete Standard Operating Procedure (SOP) with 4 distinct blocks to govern AI execution.

Click each component to inspect its implementation and product rationale:

01. Trigger

Trigger Condition

Explicitly defines the exact scenario or intent that activates this operational playbook.

WHEN: Customer message reports wrong item received, missing dishes, or food spillage during delivery.
Why PMs must require this component: Prevents AI from inappropriately triggering refund flows for regular inquiries or general greetings.
Omitting any of these 4 components degrades a Skill into a loose prompt, causing operational failures at scale.

3. Progressive Disclosure: Scaling to Hundreds of Skills Without Context Overflow

Stuffing 50 full skills into the System Prompt consumes >45,000 tokens per turn (1 token ≈ ¾ of an English word - 45,000 tokens is roughly a short novel). Progressive Disclosure solves this via a 3-tier loading architecture:

  • Tier 0 (Always-Active Metadata ~300 tokens): AI carries only the Name + 2-sentence description for all 50 skills.
  • Tier 1 (Active SOP ~800 tokens): When a user message triggers a specific skill, AI pulls only that single SOP into context.
  • Tier 2 (Conditional Annex ~400 tokens): Specialized annexes (e.g., B2B bulk policies) load only if an edge branch is taken.

Progressive Disclosure Architecture in Skills

Instead of stuffing 50 SOP handbooks into the context window, AI carries lightweight metadata and unpacks details only when triggered.

Token Budget Comparison with 50 Enterprise Skills:
Stuffing all 50 full Skills into Context45.000 tokens / call
Using Progressive Disclosure (3-Tier Load)1.500 tokens / call
96% Token Savings Per Turn
EcoCart Production Scenario: Customer writes: "The smartwatch glass is scratched right out of the box, I want a replacement."
Click each tier to inspect how context is dynamically revealed:

Tier 0: Always-Active Metadata Catalog

Token Cost: ~300 tokens (for all 50 skills)

At startup, the AI only holds the Name + 2-sentence description for each of the 50 skills. Zero full procedural text is loaded.

Minh họa thực tế tại EcoCart:

AI views the skill index: `tech-cosmetic-exchange` (Tech cosmetic defect replacement), `refund-fraud-triage` (Fraud inspection), `bulk-order-invoice` (B2B Invoicing)...

Ghi nhớ cho PM: Skill descriptions must be meticulously drafted because they are the ONLY information the model sees during routing decisions.
Progressive disclosure scales to hundreds of specialized skills while keeping baseline token costs minimal.

Benefit: Keeps baseline token costs flat (~1,500 tokens instead of 45,000 tokens), enabling unlimited skill scaling.

4. Defining the Boundary: RAG vs. Skills in Production

CriteriaRAG (Knowledge)Skills (Workflow)
Core RoleSupplies Information / FactsEnforces Workflows / Procedures
Core Question"What data does AI need to know?""What steps and formats must AI follow?"
Update MethodIngest files into vector databaseEdit or refine procedural SOPs
AnalogyReference handbook lookupStandard Operating Procedure manual

Defining the Boundary: RAG vs Skills in Production

RAG solves 'What factual knowledge does AI need?', while Skills solve 'What workflow procedure must AI follow?'.

RAG (Retrieval-Augmented Generation)

Supplies FACTS & KNOWLEDGE

Example: Extracting 5,000mAh battery capacity and 12-month warranty terms from a technical datasheet.

Skills (Expert SOPs)

Enforces WORKFLOWS & RULES

Example: Enforcing a 100-word intro, exactly 3 bullet points, and a ban on unverified health claims.

Interactive Exercise: Is this product requirement handled by RAG, Skills, or Both?
Responsible Component:Handled by RAG

This is objective factual data stored in manufacturer datasheets. RAG is required to retrieve the exact technical specs.

In production, RAG supplies factual ingredients while Skills provide the structured operational mold.

5. PM Case Study: Converting a Vague Prompt into a Production Skill

Loose Prompt: "If a customer complains, apologize and offer a replacement." (Prone to failure: unauthorized vouchers, missing order IDs).