---
title: "15 — Agent Skills — From Bloated Prompts to Just-in-Time Knowledge"
uid: agent-skills
tags: ["llm", "tools", "ai", "prompting", "roadmap:frontend", "agent-skills"]
excerpt: "A skill moves knowledge from 'always in the prompt' to 'loaded only when a task needs it' — shrinking the context window and sharpening accuracy."
date: 2026-08-12T18:35:10+0000
source: https://www.aveshina.my.id/en/blog/agent-skills
---

"Plugins" and "tools" were how I lumped Agent Skills in with everything else and never thought about them clearly. The idea everything else hangs off: **a skill moves knowledge from "always in the prompt" to "loaded only when a task needs it"** [1].

Before that sentence means anything, I have to define two words I kept tripping over. When you use an AI coding assistant, there are two things you hand it over and over. The first is the **system prompt** — the standing instructions you give it up front ("you're a coding assistant, follow these rules, this repo's conventions are…"). The assistant re-reads that whole block on *every* turn, for *every* request. The second is the **context window** — the assistant's working memory, the finite scratch space it can "see" at once. Everything you send — the system prompt, your question, the files it read — has to fit inside that window, and space in it is limited.

A skill is a way to stop spending that limited space on knowledge you rarely use. Instead of leaving every how-to in the prompt forever, you park each how-to in its own little folder, and the assistant pulls in only the folder it needs, at the moment it needs it. Load it when the task shows up, not before. That single shift — from crammed-in-context to just-in-time — is the whole point.

Here's the contrast, drawn out — the same assistant, two strategies for delivering the same know-how:

```figure
<svg viewBox="0 0 740 320" xmlns="http://www.w3.org/2000/svg" class="my-6 w-full max-w-2xl" role="img" aria-label="Two strategies for giving an AI assistant domain knowledge. Left strategy, labelled Always in context: one giant System Prompt box stuffed with every how-to (deploy, tests, query database, run migrations), glowing red, always loaded, bloating the window. Right strategy, labelled Just-in-time (Skills): a row of small dormant skill folders, each holding instructions plus optional scripts and resources; a task arrives and only the matching skill lights up and is loaded into context.">
  <defs>
    <marker id="sarrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
      <path d="M0,0 L10,5 L0,10 z" fill="#64748b"/>
    </marker>
  </defs>
  <g font-family="ui-sans-serif, system-ui, sans-serif" text-rendering="geometricPrecision">

    <!-- Column headers -->
    <g text-anchor="middle">
      <text x="150" y="22" font-size="12" font-weight="700" fill="#7f1d1d">ALWAYS IN CONTEXT</text>
      <text x="150" y="37" font-size="10" fill="#64748b">the giant-prompt strategy</text>
      <text x="540" y="22" font-size="12" font-weight="700" fill="#1e1b4b">JUST-IN-TIME · SKILLS</text>
      <text x="540" y="37" font-size="10" fill="#64748b">load only what the task needs</text>
    </g>

    <!-- LEFT: one stuffed system prompt -->
    <rect x="40" y="58" width="220" height="220" rx="10" fill="#fecaca" stroke="#dc2626" stroke-width="1.8"/>
    <text x="150" y="84" font-size="13" font-weight="700" fill="#7f1d1d" text-anchor="middle">System Prompt</text>
    <text x="150" y="102" font-size="10" fill="#7f1d1d" text-anchor="middle">(sent on EVERY turn)</text>
    <g font-size="10.5" fill="#7f1d1d">
      <text x="56" y="130">▸ how to deploy</text>
      <text x="56" y="150">▸ how to run tests</text>
      <text x="56" y="170">▸ how to query the DB</text>
      <text x="56" y="190">▸ how to run migrations</text>
      <text x="56" y="210">▸ codebase conventions</text>
      <text x="56" y="230">▸ lint / format rules</text>
      <text x="56" y="250" font-style="italic" opacity="0.7">… + 40 more pages …</text>
    </g>
    <text x="150" y="272" font-size="10" fill="#7f1d1d" text-anchor="middle" font-weight="700">heavy · always paid for</text>

    <!-- RIGHT: dormant skills row -->
    <g>
      <rect x="330" y="120" width="84" height="56" rx="8" fill="#fef9c3" stroke="#ca8a04" stroke-width="1.5"/>
      <text x="372" y="144" font-size="10" font-weight="700" fill="#422006" text-anchor="middle">deploy</text>
      <text x="372" y="160" font-size="9" fill="#64748b" text-anchor="middle">dormant</text>

      <rect x="426" y="120" width="84" height="56" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.8"/>
      <text x="468" y="144" font-size="10" font-weight="700" fill="#052e16" text-anchor="middle">tests</text>
      <text x="468" y="160" font-size="9" fill="#052e16" text-anchor="middle">✦ loaded now</text>

      <rect x="522" y="120" width="84" height="56" rx="8" fill="#e0e7ff" stroke="#6366f1" stroke-width="1.5"/>
      <text x="564" y="144" font-size="10" font-weight="700" fill="#1e1b4b" text-anchor="middle">migrate</text>
      <text x="564" y="160" font-size="9" fill="#64748b" text-anchor="middle">dormant</text>

      <rect x="618" y="120" width="84" height="56" rx="8" fill="#fce7f3" stroke="#db2777" stroke-width="1.5"/>
      <text x="660" y="144" font-size="10" font-weight="700" fill="#500724" text-anchor="middle">query-db</text>
      <text x="660" y="160" font-size="9" fill="#64748b" text-anchor="middle">dormant</text>
    </g>

    <!-- task arrives -->
    <text x="540" y="92" font-size="10.5" fill="#475569" text-anchor="middle">task: "run the test suite"</text>
    <path d="M540,100 L468,118" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#sarrow)"/>

    <!-- unfolded skill into context -->
    <rect x="380" y="210" width="320" height="62" rx="8" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.4" stroke-dasharray="4 3"/>
    <text x="540" y="232" font-size="11" font-weight="700" fill="#1e1b4b" text-anchor="middle">tests skill unfolded → context</text>
    <text x="540" y="250" font-size="10" fill="#475569" text-anchor="middle">instructions · optional scripts · resources</text>
    <text x="540" y="266" font-size="10" fill="#475569" text-anchor="middle" font-style="italic">only this one is paid for</text>

    <!-- contrast arrow -->
    <path d="M270,168 L324,168" fill="none" stroke="#64748b" stroke-width="1.5" marker-end="url(#sarrow)"/>
    <text x="297" y="160" font-size="9.5" fill="#475569" text-anchor="middle">replaces</text>
  </g>
</svg>
```

That figure is the same idea in two pictures. On the left, my old habit: cram every convention into the system prompt so the assistant "knows" it on every turn — deploy steps, test commands, lint rules, forty more pages. On the right, the same knowledge lives in small folders, asleep, and only the one matching the current task ("run the test suite") wakes up and unfolds into context. Same assistant, same knowledge — different storage.

## What a skill actually is

Now we can look at the folder itself. Strip a skill down and it's a packaged capability [1][2] — a folder holding three things:

- **Instructions** — the how-to, written as prose a model can follow ("to run the e2e suite, first build the fixtures, then…").
- **Optional scripts** — runnable files the instructions can call (scripts/run-tests.sh), so the model doesn't have to reinvent the steps each time.
- **Optional resources** — supporting files: a code snippet, a config template, a schema, a reference doc.

The important word is *packaged*. A skill is not a new ability the model invents on the spot. It's the model reading instructions and running scripts that somebody wrote down ahead of time. The model gets good at the task because the *author* already did the thinking once and stored it in the folder. It's the same move as writing good documentation for a human — except the reader is an LLM, and the docs can actually run.

This is the layer the roadmap.sh summary points at: skills let an assistant "call upon these capabilities when needed, instead of relying solely on internal knowledge" [3]. That phrasing mattered to me — *instead of*. It's not the model getting smarter; it's the model deferring to a loaded expertise it didn't have to carry around.

## How a skill gets loaded — progressive disclosure

The design idea that makes skills cheap has a name: **progressive disclosure**. The name is just a fancy way of saying "reveal a little bit always, and the rest only when it's needed." It happens in two stages, in this order:

1. **The description, always.** Every skill ships with a short one- or two-line summary of what it's for. That description is the *only* part the assistant keeps in view permanently. It's how the assistant knows the skill exists and when to reach for it. The rest of the body isn't loaded.
2. **The body, on demand.** Only when the assistant decides a task matches the description does it load the full skill — the instructions, the scripts, the resources — into the context window for that turn.

Now do the cost math. Say I have twenty skills. The always-on cost is twenty short descriptions — a few hundred tokens. A **token** is roughly a chunk of text the model is billed by; think of it as a coin you spend for every bit of the window you fill. Twenty descriptions cost a few hundred coins, not twenty full how-to documents. The expensive knowledge only shows up on the turn it's used, and when that turn ends it's gone, so it doesn't sit in the window and bloat the next task. Each task pays only for what it pulls in.

## Why this beats one giant prompt

I used to think the "right" way to make an assistant reliable was to write the world's most exhaustive system prompt — every convention, every gotcha, every deploy step, all crammed in so nothing could go wrong. The model that clicked is why that backfires:

- **Context isn't free.** Every token in the system prompt is sent on *every* turn. A 30-page prompt costs the same on a "fix this typo" turn as on a "deploy the service" turn. Skills let me pay for the deploy expertise only when I'm deploying.
- **Attention is finite.** A model buried under unrelated instructions genuinely gets worse at the task in front of it — the relevant signal is diluted by everything else [2]. Stuffing the prompt "to be safe" makes the assistant *less* reliable, not more.
- **Updates get harder.** One giant prompt is one giant file everyone edits. Skills are independent folders — I can fix the test skill without touching the deploy skill, and the two don't fight for attention.

So the giant prompt is the wrong data structure. It treats all knowledge as equally important on every turn, which is almost never true. Skills encode the right priority: most knowledge is irrelevant to most tasks, so it shouldn't be in context most of the time.

## Where I see this in the wild

This isn't abstract — the pattern shows up concretely in the tooling I already use. **Claude Code and Agent skills** are the canonical instance: a skill is a directory with a SKILL.md (the instructions, front-matter description, optional scripts), and Claude loads it only when a task matches [1][4]. The deeplearning.ai course frames the same idea as the universal design — capabilities packaged as instructions-plus-scripts that any compliant agent can invoke, not something tied to one vendor [2]. Even on the frontend specifically, roadmap.sh lists skills alongside MCP as the two layers that let an assistant *do* things in a repo instead of just talk about them [3].

The unifying thread: every one of these treats the skill as a *deferred* capability. The assistant isn't smarter in the abstract — it's smarter at the specific task, because it just pulled in the right instructions.

## How I use this

The habit these notes left me with is a small reframing. When I catch myself drafting another paragraph into the system prompt "just in case," I stop and ask: *is this relevant to every single task, or just some?* If it's just some — and it almost always is — it doesn't belong in the prompt. It belongs in a skill, with a one-line description that's always present and a body that loads only when the task shows up.

That one question is why skills ever felt like a separate concept instead of "more prompt engineering." They're a different storage strategy for the same knowledge — and the storage strategy is the whole reason it works.

## References

[1] Anthropic, "Agent Skills," Anthropic Docs, 2025. [Online]. Available: [https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills](https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills)

[2] DeepLearning.AI, "Agent Skills with Anthropic," Short Courses, 2025. [Online]. Available: [https://www.deeplearning.ai/short-courses/agent-skills-with-anthropic/](https://www.deeplearning.ai/short-courses/agent-skills-with-anthropic/)

[3] roadmap.sh, "Frontend Roadmap — Skills," 2025. [Online]. Available: [https://roadmap.sh/frontend/skills](https://roadmap.sh/frontend/skills)

[4] Anthropic, "Engineering Blog — Agent Skills," 2025. [Online]. Available: [https://www.anthropic.com/engineering](https://www.anthropic.com/engineering)

```quiz
Q: What is a skill, in its simplest form?
- A new capability the model invents at runtime
- A packaged folder of instructions, optional scripts, and optional resources the model reads on demand
correct: 1
explain: A skill is a packaged capability — the author did the thinking once into instructions and scripts. The model loads and follows them, it doesn't invent them.

Q: Under progressive disclosure, what part of every skill stays in context all the time?
- The full instructions body
- The short description only
- The bundled scripts
correct: 1
explain: Only the one- or two-line description is always present, so the model knows the skill exists. The full body loads only when a task matches that description.

Q: Why does a giant system prompt make an assistant *less* reliable, not more?
- It doesn't — more instructions always help
- Attention is finite; unrelated instructions dilute the signal relevant to the current task
correct: 1
explain: Every extra token competes for attention. Stuffing the prompt "to be safe" dilutes the model's focus on the task in front of it, on top of being paid for on every turn.

Q: A skill's instructions + scripts get sent on…
- every turn, regardless of task
- only the turn where a task matches the skill's description
correct: 1
explain: The expensive body is loaded just-in-time. The always-on cost is just the short description; the full skill appears only when the task needs it.

Q: Which reframing best captures when to prefer a skill over adding to the system prompt?
- "Is this relevant to every single task, or just some?"
- "Is this important enough to document?"
correct: 0
explain: Knowledge relevant to every task belongs in the prompt; knowledge relevant to only some tasks belongs in a skill, loaded only when those tasks appear.
```
