Class: AgentSkills::Generator
- Inherits:
-
Object
- Object
- AgentSkills::Generator
- Defined in:
- lib/agent_skills/generator.rb
Constant Summary collapse
- SKILL_TEMPLATE =
"---\nname: %<name>s\ndescription: %<description>s\n---\n\n# %<title>s\n\n## Instructions\n\n[Add step-by-step instructions here]\n\n## Examples\n\n### Input\n[Example input]\n\n### Output\n[Expected output]\n\n## Guidelines\n\n- [Add guidelines here]\n"
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(path:, name:, description:, **options) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(path:, name:, description:, **options) ⇒ Generator
Returns a new instance of Generator.
34 35 36 37 38 39 |
# File 'lib/agent_skills/generator.rb', line 34 def initialize(path:, name:, description:, **) @path = path @name = name @description = description = end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
32 33 34 |
# File 'lib/agent_skills/generator.rb', line 32 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/agent_skills/generator.rb', line 32 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
32 33 34 |
# File 'lib/agent_skills/generator.rb', line 32 def end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
32 33 34 |
# File 'lib/agent_skills/generator.rb', line 32 def path @path end |
Class Method Details
.create(path:, name:, description:, **options) ⇒ Object
41 42 43 |
# File 'lib/agent_skills/generator.rb', line 41 def self.create(path:, name:, description:, **) new(path: path, name: name, description: description, **).create end |
Instance Method Details
#create ⇒ Object
45 46 47 48 49 50 |
# File 'lib/agent_skills/generator.rb', line 45 def create validate_inputs! create_directories create_skill_md skill_path end |