Class: Riffer::Skills::MarkdownAdapter
- Defined in:
- lib/riffer/skills/markdown_adapter.rb
Overview
Default Markdown skill adapter.
Renders a skill catalog as Markdown for the system prompt. Used by OpenAI, Amazon Bedrock, and other providers.
See Riffer::Skills::XmlAdapter for the Anthropic/Claude variant.
Instance Method Summary collapse
-
#render_catalog(skills) ⇒ Object
Renders a skill catalog as Markdown.
Methods inherited from Adapter
Instance Method Details
#render_catalog(skills) ⇒ Object
Renders a skill catalog as Markdown.
- skills
-
array of Frontmatter objects to render.
– : (Array) -> String
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/riffer/skills/markdown_adapter.rb', line 17 def render_catalog(skills) lines = [] lines << "## Available Skills" lines << "" lines << "When a user's request matches a skill description below, call the `#{activate_tool.name}` tool with the skill name. After activation, follow the skill's instructions." lines << "" skills.each do |skill| lines << "- **#{skill.name}**: #{skill.description}" end lines.join("\n") end |