Class: SwarmSDK::V3::Skills::Manifest

Inherits:
Object
  • Object
show all
Defined in:
lib/swarm_sdk/v3/skills/manifest.rb

Overview

Immutable value object for parsed SKILL.md frontmatter

Represents a single discovered skill with its metadata. Created by Loader.scan from SKILL.md files found on disk.

Examples:

manifest = Manifest.new(
  name: "pdf-processing",
  description: "Extract text and tables from PDF files",
  location: "/path/to/pdf-processing/SKILL.md",
)
manifest.name        #=> "pdf-processing"
manifest.description #=> "Extract text and tables from PDF files"
manifest.location    #=> "/path/to/pdf-processing/SKILL.md"
manifest.frozen?     #=> true

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description:, location:) ⇒ Manifest

Create a new skill manifest

Parameters:

  • name (String)

    Skill name

  • description (String)

    Skill description

  • location (String)

    Absolute path to SKILL.md



36
37
38
39
40
41
# File 'lib/swarm_sdk/v3/skills/manifest.rb', line 36

def initialize(name:, description:, location:)
  @name = name
  @description = description
  @location = location
  freeze
end

Instance Attribute Details

#descriptionString (readonly)

Returns Skill description from frontmatter.

Returns:

  • (String)

    Skill description from frontmatter



26
27
28
# File 'lib/swarm_sdk/v3/skills/manifest.rb', line 26

def description
  @description
end

#locationString (readonly)

Returns Absolute path to the SKILL.md file.

Returns:

  • (String)

    Absolute path to the SKILL.md file



29
30
31
# File 'lib/swarm_sdk/v3/skills/manifest.rb', line 29

def location
  @location
end

#nameString (readonly)

Returns Skill name from frontmatter.

Returns:

  • (String)

    Skill name from frontmatter



23
24
25
# File 'lib/swarm_sdk/v3/skills/manifest.rb', line 23

def name
  @name
end