class Riffer::Skills::Backend
Interface for skill storage backends. Subclass and implement list_skills and read_skill for custom storage (database, S3, etc.); use Riffer::Skills::Frontmatter.parse on raw SKILL.md content.
Constants
- SKILL_FILENAME
Public Class Methods
Source
# File lib/riffer/skills/backend.rb, line 10 def initialize = nil # Returns frontmatter for all available skills; called once at the start of # generate/stream. #-- #: () -> Array[Riffer::Skills::Frontmatter] def list_skills raise NotImplementedError, "#{self.class} must implement #list_skills" end # Returns the full SKILL.md body (without frontmatter) for a skill. Raises # Riffer::ArgumentError if the skill is not found. #-- #: (String) -> String def read_skill(name) raise NotImplementedError, "#{self.class} must implement #read_skill" end end
Public Instance Methods
Source
# File lib/riffer/skills/backend.rb, line 16 def list_skills raise NotImplementedError, "#{self.class} must implement #list_skills" end
Returns frontmatter for all available skills; called once at the start of generate/stream.
Source
# File lib/riffer/skills/backend.rb, line 24 def read_skill(name) raise NotImplementedError, "#{self.class} must implement #read_skill" end
Returns the full SKILL.md body (without frontmatter) for a skill. Raises Riffer::ArgumentError if the skill is not found.