PrepGenAICerts

Skills as a Complementary Memory-Adjacent Pattern

Advanced

Recognize agent patterns and abstraction frameworks · Difficulty 3/5

0%
skillsmemorysubagentspermission-inheritancemessages-api

Explanation

A Different Cost Profile Than Memory or Always-Loaded Context

The previous concept's Memory pattern -- a scratchpad file or external store the agent reads and writes -- persists *state* across sessions. A Skill solves an adjacent but distinct problem: it persists *know-how*, and it does so with a cost profile unlike either memory or an always-loaded instruction file. A Skill is reusable markdown -- a SKILL.md file with YAML frontmatter (at minimum a name and a description) plus an instructions body below the frontmatter. On every single turn, Claude scans the name and description of each Skill it has access to, checks them against what the current task actually needs, and only pulls the *full* instruction body into context on a match. If nothing matches, the instructions never enter the context window at all.

That load-on-demand behavior is the whole point, and it's what separates a Skill from something like a CLAUDE.md file: a CLAUDE.md-style always-loaded file is resident in every conversation turn regardless of task, paying a fixed context tax on every single session whether or not it's relevant. A Skill pays almost nothing (just the name and description) until the moment it's actually needed, then pays the full cost only for that turn. For agent construction specifically, this makes Skills a lever for packaging reusable procedural knowledge -- a report-formatting convention, a specialized review checklist -- without inflating the context budget of every session that doesn't need it.

Skills on the Messages API

Skills are usable directly on the Messages API (beta), not just through Claude Code or the Agent SDK. Using them this way requires two beta headers together: code-execution-2025-08-25 and skills-2025-10-02. Invoked this way, a Skill executes *inside that code-execution container* rather than anywhere in your own application's runtime -- a real distinction, since it changes what the Skill can safely assume about available tools and filesystem access. It's running inside Anthropic's sandbox, not your process.

The Sharp, Testable Asymmetry: Subagents Inherit Permissions, Not Skills

Here is the detail worth calling out on its own, because it cuts against intuition: subagents do not automatically inherit Skills from a parent session. Each Subagent starts with a clean context -- if a Subagent needs a Skill to do its job, that Skill must be explicitly listed in the Subagent's own configuration; it is never assumed to carry over from the parent just because the parent had it loaded.

But subagents do inherit the parent session's permission and tool-access context -- permission scope is not reset at delegation. So the same delegation boundary treats two adjacent things completely differently: Skills reset to a clean slate, permissions carry forward unchanged. A Subagent wired up to do a task that depends on a specific Skill will silently lack it unless you register that Skill against the Subagent directly -- while that same Subagent inherits whatever permission scope the parent already had, for better or worse.

Common exam traps

  • Assuming a Subagent automatically has access to whatever Skills its parent session had loaded. It does not -- Skills must be explicitly registered per Subagent.
  • Assuming the inheritance rule is symmetric (either everything carries over, or nothing does). It isn't: permissions carry over at delegation, Skills do not. This asymmetry is exactly what gets tested.
  • Treating a Skill as functionally the same as an always-loaded CLAUDE.md-style file. A Skill's whole design point is loading on demand when the description matches, not being resident in every turn.
  • Forgetting that Messages API Skills usage requires *both* beta headers together (code-execution-2025-08-25 and skills-2025-10-02), and that the Skill then executes inside the code-execution container rather than your own application's environment.

Key Takeaways

  • A Skill is reusable markdown (SKILL.md, with YAML frontmatter carrying at minimum name and description) that Claude loads into context only when its description matches the current task -- unlike an always-loaded file, it isn't resident on every turn
  • This load-on-demand behavior gives Skills a distinct cost profile from both persisted memory (state across sessions) and always-loaded context -- Skills package reusable know-how without a fixed per-session tax
  • Using Skills on the Messages API (beta) requires both the code-execution-2025-08-25 and skills-2025-10-02 beta headers together, and the Skill then runs inside the code-execution container
  • Subagents do NOT automatically inherit Skills from a parent session -- each subagent starts with a clean context and needs any required Skill explicitly listed in its own configuration
  • Subagents DO inherit the parent session's permission and tool-access scope at delegation -- this asymmetry (permissions carry over, Skills do not) is a sharp, testable distinction

Glossary Terms

Skills (Claude Code)

Reusable markdown instruction files with YAML frontmatter that define custom slash commands in Claude Code. Invoked with /skill-name. Frontmatter configures: description (for trigger matching), allowed-tools (tool restrictions), and context (fork for isolation). Stored in .claude/skills/.

Skill Frontmatter

YAML configuration at the top of a Claude Code skill file (SKILL.md) that controls how the skill is triggered and executed. Key fields: 'description' (natural language trigger for automatic activation), 'allowed-tools' (whitelist of permitted tools), 'context' (fork/current/none).

Subagent

A Claude instance spawned by an orchestrator to handle one bounded subtask in complete context isolation. Each subagent starts with a fresh context window — the orchestrator's history is never inherited — and is invoked via the [Task tool](/glossary/task-tool). The subagent runs its own full [Agentic Loop](/glossary/agentic-loop), then returns a single structured result to the orchestrator.

Least Privilege (Tool Access)

A security principle applied to agent tool design: give each agent and subagent only the minimum tools required to complete its specific task. Reduces blast radius if an agent is compromised or makes an error. Implemented via AgentDefinition tool lists and skill allowed-tools.

Context Compression

The practice of actively reducing a conversation's token footprint so it fits within the model's context window without silent truncation. Encompasses multiple strategies — rolling window eviction, progressive summarization, external storage with retrieval, and prompt caching — each with different loss profiles and complexity trade-offs. Understanding this menu of options, and knowing what must never be compressed, is a core Domain 5 skill.

Related Concepts

PrepGenAICerts.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.