Class: Riffer::Skills::MarkdownAdapter

Inherits:
Adapter
  • Object
show all
Defined in:
lib/riffer/skills/markdown_adapter.rb

Overview

Default skill adapter — renders a skill catalog as Markdown for the system prompt.

Instance Attribute Summary

Attributes inherited from Adapter

#skill_activate_tool

Instance Method Summary collapse

Methods inherited from Adapter

#initialize

Constructor Details

This class inherits a constructor from Riffer::Skills::Adapter

Instance Method Details

#render_catalog(skills) ⇒ Object

Renders a skill catalog as Markdown. – : (Array) -> String



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/riffer/skills/markdown_adapter.rb', line 10

def render_catalog(skills)
  lines = [] #: Array[String]
  lines << "## Available Skills"
  lines << ""
  lines << "When a user's request matches a skill description below, call the `#{skill_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