class Riffer::Skills::Adapter
Base class defining the interface for skill adapters.
A skill adapter encapsulates the provider-specific catalog rendering for skills — how the available-skills section appears in the system prompt.
Subclass and override render_catalog. The activation tool is set at construction time and is exposed via skill_activate_tool for use in rendered output.
See Riffer::Skills::MarkdownAdapter for the default implementation. See Riffer::Skills::XmlAdapter for the Anthropic/Claude variant.
Attributes
The activation tool class for this adapter.
Public Class Methods
Source
# File lib/riffer/skills/adapter.rb, line 27 def initialize(skill_activate_tool:) @skill_activate_tool = skill_activate_tool end
Creates a new adapter.
skill_activate_tool-
the activation tool class — referenced by name in the rendered catalog so the LLM knows which tool to call.
Public Instance Methods
Source
# File lib/riffer/skills/adapter.rb, line 39 def render_catalog(skills) raise NotImplementedError, "#{self.class} must implement #render_catalog" end
Renders a skill catalog section for the system prompt.
- skills
-
array of Frontmatter objects to render.
Raises NotImplementedError if not implemented by subclass.