Runtime Behavior of Anthropic Skills

This chapter explains how the Anthropic subsystem builds its tool surface, starts the loop session, and resumes multi-turn execution through session memory.

Loop Session Execution

Anthropic Skills execute through a loop session. When the skill is invoked, the subsystem first checks whether there is an existing session for that skill in an awaiting-input state. If such a session exists, it is resumed with the new prompt. Otherwise a new loop session is started. The system prompt for that loop session is built from the raw skill body and the current project root directory.

This means the descriptor is operationalized very directly. The raw contents of SKILL.md become the behavioral prompt for the session rather than a passive metadata record. The subsystem always reports the session type as loop in its return object.

Tool Surface

The runtime tool surface is not arbitrary. It is assembled from a bounded set of internal skills, plus optional bundle-local helpers. The internal side currently attempts to expose the internal skills ask-user, read, write, edit, glob, grep, bash, and webfetch when those internal skills are available through the registry.

When the skill bundle contains scripts/, the subsystem also exposes run-script. That tool can execute a shell command in the skill directory and rewrites any referenced scripts/... path to an absolute path inside the bundle, rejecting paths that escape the folder. When the skill bundle contains resources/, the subsystem exposes get-resource. That tool reads files only from inside resources/ and returns either UTF-8 text or base64 content depending on the file contents.

Important

In the current implementation, the Anthropic subsystem exposes helper runtime surfaces for scripts/ and resources/. It does not create a comparable runtime surface for assets/.

Session Persistence

If the loop session pauses in an awaiting-input state, the subsystem stores that session in sessionMemory under a skill-specific key. When the session later completes, the stored key is removed. This makes Anthropic Skills multi-turn in the same practical sense as the other loop-based subsystems: the user can continue the same skill-level interaction across prompts without reconstructing the entire state from scratch.

Anthropic Skills run as loop sessions with a bounded helper surface and optional multi-turn persistence.