Module: Clacky::Agent::SkillAutoCreator

Included in:
Clacky::Agent
Defined in:
lib/clacky/agent/skill_auto_creator.rb

Overview

Scenario 1: Auto-create new skills from complex task patterns.

After completing a complex task (high iteration count, no existing skill used), forks a subagent to analyze if the workflow is reusable and worth capturing as a new skill.

If the LLM determines it’s valuable, it invokes skill-creator in “quick mode” to generate a new skill automatically.

Constant Summary collapse

DEFAULT_AUTO_CREATE_THRESHOLD =

Default minimum iterations to consider auto-creating a skill. This counts iterations within the current task only, not session-cumulative.

12

Instance Method Summary collapse

Instance Method Details

#maybe_create_skill_from_taskObject

Check if we should prompt the LLM to consider creating a new skill Called from SkillEvolution#run_skill_evolution_hooks



20
21
22
23
24
25
26
27
28
# File 'lib/clacky/agent/skill_auto_creator.rb', line 20

def maybe_create_skill_from_task
  return unless should_auto_create_skill?

  @ui&.show_info("Analyzing task for skill creation opportunity...")

  # Fork an isolated subagent to evaluate + create — does NOT touch main history
  subagent = fork_subagent
  subagent.run(build_skill_creation_prompt)
end