Interview's MateAI Engineering
Interview's Mate

AI Engineering

LLMs, RAG, agents & evals

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
AI Engineering topics
Lesson 50/ 160
03. AI Agents

Agent Skills

Packaged capabilities (prompts, tools, scripts) agents can load for specialized tasks.

IntermediateSkill Packs · Specialization3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidHands-onQuiz (3)Practice

In plain words

A skill is a ready-made how-to folder the AI opens only when it's doing that kind of job.

Think of it like…

A reference library next to a skilled assistant: the catalogue (names and descriptions) is always on the desk, and when a task arrives the assistant pulls the relevant binder (instructions, templates, scripts) off the shelf instead of memorising every binder.

Where you’ve seen it

A finance team packages a quarterly-report skill: a SKILL.md describing the required sections and tone, an Excel template, a Python script that checks totals reconcile, and a style guide. When a user asks for the Q3 board pack, the agent matches the description, loads the instructions, fills the template, runs the reconciliation script and reports any mismatch. A second skill, brand-slides, is also installed but never loaded for this task, so it costs only its 40-word description in context.

Words you’ll hear

Skill
A folder of instructions, scripts and resources with metadata describing when to use it.
Progressive disclosure
Loading information in stages: metadata always, instructions when triggered, resources when needed.
Skill description
The short text the model uses to decide whether a skill is relevant.
Bundled scripts
Executable code in a skill that the agent runs for deterministic steps.

Visual diagram

Loading interactive diagram

Theory & deep dive

Anatomy and how skills are used

A typical skill is a directory: SKILL.md (front-matter with name and description, then instructions in Markdown), plus optional files such as templates/, reference.md, and scripts/. At startup the agent harness reads only the name and description of each available skill and adds them to the system prompt. When a user request matches a description, the agent reads the full SKILL.md; instructions can point to further files that the agent reads only if the task needs them, or to scripts it executes (their code needn't enter the context, only their output).

This keeps the context small while allowing very large bodies of procedural knowledge. It also encourages good structure: instructions should be task-focused and imperative, separate concerns into files (a form-filling guide vs a validation guide), and include a few concrete examples. Skills complement other mechanisms: MCP servers provide tool access, system prompts set general behaviour, and retrieval supplies facts; skills provide how to do a recurring job well.

A minimal SKILL.md

--- name: quarterly-report description: Build the quarterly board report from finance exports. Use when asked for QBR, board pack or quarterly numbers. --- followed by steps: 1. Read templates/report.xlsx. 2. Fill sections in order. 3. Run scripts/check_totals.py and report mismatches.

Key takeaway: Metadata always loaded; instructions and files loaded on demand; scripts do deterministic work.

Writing good skills and keeping them safe

Write the description for matching: say what the skill does and when to use it, with the words users actually say ("QBR", "board pack"). Keep SKILL.md concise and put detailed material in referenced files. Prefer scripts for steps that must be exact (calculations, validations, file conversions), since code is deterministic and cheaper than asking the model to redo them. Test with realistic prompts: does the right skill trigger, does it not trigger for unrelated tasks, and does the output meet your checklist? Iterate on the description when skills fire too rarely or too often, and keep skills small and single-purpose rather than creating one giant skill.

Skills are executable instructions, sometimes with code, so treat them like software dependencies: review the contents, restrict them to trusted sources, give scripts only the permissions they need (sandboxing, no network by default), version them, and monitor what they do. A malicious or sloppy skill can exfiltrate data or take harmful actions just like a compromised tool. Organisations typically manage a catalogue of vetted skills, with owners, change review and usage logging.

A trigger test list

Should trigger: "prepare the Q3 board pack", "make the quarterly numbers deck". Should not trigger: "summarise this PDF", "write a birthday message". Run these against the agent and adjust the description until both columns behave.

Key takeaway: Match-focused descriptions, small single-purpose skills, scripts for exact steps, and supply-chain care.

How it works, step by step

Step 1 of 4
Author

1. Identify a recurring task

Pick a task people repeat with clear steps and quality criteria, such as report building or code review.

quarterly board pack
Key numbers at this step
Repeat
often enough

When to use it & trade-offs

What it is

An agent skill is a packaged capability an agent can load on demand: a folder containing instructions (when and how to do a task), optional scripts or tools, and reference files or templates, with a short name and description that tells the agent when the skill is relevant. Anthropic's Agent Skills use a SKILL.md file with that metadata plus supporting files; other ecosystems offer similar "skill packs". The key mechanism is progressive disclosure: only the brief description sits in context all the time, and the full instructions and resources are loaded when the task calls for them.

Why it matters: Stuffing every procedure into the system prompt wastes context and confuses the model, while hand-building a custom agent per task doesn't scale. Skills let you give a general agent specialised know-how (company report formatting, a data-cleaning routine, a code-review checklist) that is versioned, shareable and loaded only when needed. They bridge the gap between a generic model and your organisation's way of working.

When to reach for it

  • Company-specific document and report formats
  • Repeatable analysis or review procedures
  • Packaging scripts the agent should run exactly

When to avoid or be careful

  • One giant skill covering many tasks
  • Vague descriptions like "helps with documents"
  • Installing unreviewed skills that include scripts

Ways to give an agent know-how

Skills (on-demand packages)
Best for: Recurring specialised procedures

Strengths: Context-efficient; reusable; versioned.

Watch out: Needs good descriptions; code needs vetting.

Long system prompt
Best for: A single focused assistant

Strengths: Simple.

Watch out: Wastes context; hard to maintain for many tasks.

Fine-tuning
Best for: Stable behaviours at high volume

Strengths: Short prompts at run time.

Watch out: Data, training cost and slow iteration.

Interview signals & numbers to know

When this topic comes up

  • “How do we teach the agent our process?”
  • “The system prompt is too long”
  • “What's progressive disclosure?”
  • Skills vs tools vs prompts
  • Skill supply-chain risk

Benchmarks & rules of thumb

≈ 40 words -
context cost of an unused skill's description
3 levels -
metadata, instructions, resources
1 purpose -
per skill

Common mistakes & follow-ups

Common interview mistakes

  • Writing a description so vague the skill triggers for unrelated tasks.
  • Asking the model to recompute totals instead of bundling a script.
  • Running an unreviewed third-party skill's script with full permissions.

Likely interviewer follow-ups

  • How are skills different from tools and prompts?
  • How would you test whether a skill triggers correctly?
  • What security concerns come with skills that include scripts?
Interview tip: Explain skills as "procedures loaded on demand". The phrase captures both the context saving and the reuse benefit.
Loading hands-on exercise

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Agent Skills with generative AI interview Q&A and hands-on practice.

Open Generative AI Q&A →Tech Learn Q&A
Previous topic
MCP Clients
Next topic
Multi-agent Handoffs