Module: Brute::Prompts::Skills

Defined in:
lib/brute/prompts/skills.rb

Class Method Summary collapse

Class Method Details

.call(ctx) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/brute/prompts/skills.rb', line 6

def self.call(ctx)
  cwd = ctx[:cwd] || Dir.pwd
  skills = Skill.all(cwd: cwd)
  return nil if skills.empty?

  listing = Skill.fmt(skills)

  <<~TXT
    Skills provide specialized instructions and workflows for specific tasks.
    When a task matches a skill's description, load the skill to get detailed guidance.

    #{listing}
  TXT
end