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 Type
    Method
    Description
    Instructional body.
    Short "what/when to use" summary.
    Provenance metadata (author, origin, trigger keyword, etc.) and content lineage.
    Canonical name; unique across the SkillRegistry.
    static String
    Body-only rendering used wherever an admitted skill appears inside a message's content (the per-message SkillBlock path): [Skill: <name>] header followed by the instructional body.
    static String
    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 Skills description.
    • body

      Prompt body()
      Instructional body. The main text the LLM reads when the skill is admitted.
    • resources

      Map<String,Prompt> resources()
      Named sub-prompts referenced from the body (examples, checklists, worked solutions).
    • suggestedTools

      List<String> suggestedTools()
      Tool names the skill expects to have available. Unresolved names surface as a warning.
    • metadata

      SkillMetadata metadata()
      Provenance metadata (author, origin, trigger keyword, etc.) and content lineage.
    • renderBody

      static String renderBody(Skill skill)
      Body-only rendering used wherever an admitted skill appears inside a message's content (the per-message SkillBlock path): [Skill: <name>] header followed by the instructional body. This is the canonical in-conversation skill text; every model-facing rendering routes through here or renderForSystemPrompt(Skill), never a client's own concatenation (the header-only [Skill: <name>] placeholder in OutgoingMessage.getRawContent is log/estimate text, not model input).
    • renderForSystemPrompt

      static String renderForSystemPrompt(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. 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.