Interface Skill
- All Known Implementing Classes:
TextSkill
public interface Skill
Structured bundle of prompt content admitted into a thinker's conversation as a unit.
A Skill comprises a name, a short description (what/when to use), a body (the instructions themselves), a named collection of resources (sub-prompts referenced by the body, e.g. examples, worked solutions, checklists), a list of tool names the skill expects to exist in the thinker's registry, and provenance metadata.
Each contained Prompt is a first-class framework object: guardrailed,
hashable, substitutable. The Skill layer composes them; no implementation-level raw
strings escape this abstraction.
- Since:
- 0.1 (2026-04-21)
- Author:
- Andrey Santrosyan
-
Method Summary
Modifier and TypeMethodDescriptionbody()Instructional body.Short "what/when to use" summary.metadata()Provenance metadata (author, origin, trigger keyword, etc.) and content lineage.name()Canonical name; unique across the SkillRegistry.static StringrenderBody(Skill skill) Body-only rendering used wherever an admitted skill appears inside a message's content (the per-messageSkillBlockpath):[Skill: <name>]header followed by the instructional body.static StringrenderForSystemPrompt(Skill skill) System-prefix rendering used when a skill is laid into the stable system context: the[Skill: <name>]header, the short description (only when present, separated by a blank line), then the body.Named sub-prompts referenced from the body (examples, checklists, worked solutions).Tool names the skill expects to have available.
-
Method Details
-
name
String name()Canonical name; unique across the SkillRegistry. Pattern:<domain>.<skill-name>. -
description
Prompt description()Short "what/when to use" summary. Matches Anthropic's Skillsdescription. -
body
Prompt body()Instructional body. The main text the LLM reads when the skill is admitted. -
resources
-
suggestedTools
-
metadata
SkillMetadata metadata()Provenance metadata (author, origin, trigger keyword, etc.) and content lineage. -
renderBody
Body-only rendering used wherever an admitted skill appears inside a message's content (the per-messageSkillBlockpath):[Skill: <name>]header followed by the instructional body. This is the canonical in-conversation skill text; every model-facing rendering routes through here orrenderForSystemPrompt(Skill), never a client's own concatenation (the header-only[Skill: <name>]placeholder inOutgoingMessage.getRawContentis log/estimate text, not model input). -
renderForSystemPrompt
System-prefix rendering used when a skill is laid into the stable system context: the[Skill: <name>]header, the short description (only when present, separated by a blank line), then the body. Byte-for-byte the shape the provider system-block loops emit, so it must stay stable - it sits inside the cached prefix and any drift invalidates the cache.
-