R407 · Agent principles and patterns › Agent interaction protocols

Always, at startup: the context cost the skills docs deny

Read the original

agent-skillscontext-engineeringharnessvendorclaim-checking

What the Agent Skills documentation says a skill costs before any task arrives — and the sentence on the same page that contradicts it

Summary

Agent Skills are folders: a SKILL.md file with YAML frontmatter, optionally bundled with reference markdown, scripts and templates. The format is almost trivially simple, which is why most write-ups stop at describing it. The parts worth reading carefully are the loading model, the field constraints, and the per-surface runtime table — because the format is portable and the runtime is not, and because the vendor documentation contradicts itself about what installing a skill costs.

This note is written from the vendor's own engineering post and platform documentation. A provenance detail matters: the engineering post is dated October 16, 2025, with a recorded modification in October 2026. The platform documentation carries no date and is where the current numbers live. Community "close readings" published in late 2026 are therefore readings of year-old material plus a revision, and should be checked against the docs page rather than treated as current.

The loading model, with the documented figures

Progressive disclosure in three levels, from the documentation's own table:

LevelWhat loadsWhenCost
1name and description from frontmatterAlways (at startup)~100 tokens per Skill
2The SKILL.md bodyWhen triggeredUnder 5k tokens
3+Bundled resourcesAs neededNone until accessed

Level 1 metadata is loaded at startup and included in the system prompt. The engineering post states the same mechanism without numbers: at startup the agent pre-loads the name and description of every installed skill into its system prompt. Level 2 is read with bash when the skill triggers. Level 3 covers reference files, which enter context only when read, and scripts, which run through bash so that "only their output enters context."

The contradiction

The same documentation page states that "you can install many Skills without context penalty" and, in the table covering the same always-loaded metadata, "~100 tokens per Skill." Both cannot be true as written. The ~100 figure is the one to plan against, with the caveat that it is an approximation in a table rather than a measurement.

Arithmetic that follows, and that neither source states: a bundle of 85 skills — and bundles that size exist in the wild — costs roughly 8,500 tokens of system prompt in every session, before any task arrives, whether or not a single skill fires. At the documented ceiling of 1,024 characters per description, worst case is several times that.

The cost is small per skill and linear in the number installed. That is precisely the regime where "no context penalty" stops being true: nobody notices at five skills and everybody notices at two hundred. Teams installing skill bundles should measure their own startup system prompt rather than trust the reassurance, and should treat the installed-skill count as a budget line rather than as free.

Field constraints

Every skill requires a SKILL.md with YAML frontmatter. Two required fields:

Optional bundled files: further markdown reference documents, a scripts/ directory, reference material and templates. There is no stated maximum on the number of skills, skill size, file count or nesting depth; the docs say there is "no practical limit on bundled content" and the engineering post calls bundled context "effectively unbounded." Read together with the ~100-tokens-per-skill line, the unbounded dimension is the one that is genuinely free, and the bounded one is the one described as free.

One small internal discrepancy: an image caption in the engineering post describes the frontmatter as containing "a file name and description" while its body and the documentation both say name.

Triggering

The description is what a request is matched against to decide whether a skill fires. Triggering is automatic: once a skill is available in the environment it is used when relevant to the request.

Neither page documents explicit invocation by name. That is a real gap rather than an omission in this note, and it compounds a previously recorded one: slash-style invocation of a skill in chat is likewise undocumented. Seen from the format's side, the position is that a skill author's only lever on reliability is the description text — there is no documented way for a user to force a skill to run, and no documented way for an author to register an invocation name.

The guidance that follows is a single rule: the description must say both what the skill does and when to use it. The documentation's example makes the "when" clause concrete by enumerating triggers — file types the skill handles and words a user might say. An author optimising for reliability is therefore writing retrieval keys, not prose.

Scripts, and why they beat instructions

Skills can include code for the model to execute as tools at its discretion. Scripts run with bash, "providing deterministic operations without loading their code into context" — the script's code never enters the context window, only its output consumes tokens.

The argument in the engineering post's own terms: sorting a list by token generation is far more expensive than running a sorting algorithm, and many applications require deterministic reliability that only code can provide. Its worked example is a pre-written script extracting form fields from a PDF — neither the script nor the PDF enters context, and because the code is deterministic the workflow is repeatable.

One authoring point is easy to miss and causes real failures: "It should be clear whether Claude should run scripts directly or read them into context as reference." The same file can serve either purpose, and the skill text has to say which. A reference implementation the model executes, or an executable the model paraphrases, are both plausible misreadings of an unlabelled script.

Runtime differs per surface, and that is where portability breaks

From the documentation's runtime-constraints section:

SurfaceNetworkPackagesCustom skills
APINoneNo runtime installation; pre-installed onlyUploaded via a skills endpoint; sandboxed container; code execution tool required; shared workspace-wide
Coding agent (CLI)FullGlobal installation discouragedFilesystem-based, personal or project directory; can ship in plugins
Consumer chatFull, partial or none, depending on settings—Uploaded as zip on paid tiers with code execution enabled
Managed agents——Attached in the agent's skills array, or loaded from a mounted repository

Two lines deserve to be pulled out. Pre-built document skills (presentation, spreadsheet, word-processing, PDF) are not available in the coding agent — a surprising asymmetry, since that is the surface with full network access and a filesystem. And "Custom Skills do not sync across surfaces": the same author's skill must be installed separately in each place, by a different mechanism each time.

The practical consequence is the one a community title captured well: skills are folders, and the harness decides whether they work. A skill whose script needs the network runs in one surface and fails in another with no change to the skill, and nothing in the format lets the skill declare that dependency. Anyone distributing skills should state the runtime requirements in prose, because the format has no field for them.

A minor inconsistency between the two sources: the engineering post lists the agent SDK among supported surfaces; the documentation's "where skills work" section does not mention it.

Security and retention

Both pages are direct about the threat model. Use skills only from trusted sources; audit bundled files; skills that fetch data from external URLs pose particular risk. The sentence that generalizes furthest: "Even trustworthy Skills can be compromised if their external dependencies change over time." A skill is a supply-chain artifact, and a vetted-once skill that pulls from a URL is not vetted.

The engineering post adds that a malicious skill may introduce vulnerabilities or direct the model to exfiltrate data.

One compliance fact that does not appear in any community write-up seen so far: Agent Skills is not covered by zero-data-retention arrangements. Organizations that selected ZDR as a condition of deployment need to know that before distributing skills internally.

Neither page provides an explicit list of authoring antipatterns. The engineering post's advice is to start from evaluation rather than upfront anticipation, and to iterate with the model to discover what context is actually needed — which is sound but leaves authors without a checklist.

For practitioners

Sources

Outside what this note covers: the linked skill-authoring best-practices page.

Connections

See R407 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.