ask-skills 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a8fc1e81c128476d7e6a3e5ce291213880f0d55a7261d41c7a99903e0c08431
4
- data.tar.gz: 772dd0930f80b16fa8fb4b651245011899d5cf6406a8ad4a3a7c8002b17f435e
3
+ metadata.gz: 9f58cb080953d3d6668242ef9a23afeb53ecf5cbe110ded5129e9712c73ad4a0
4
+ data.tar.gz: 70b2e3ee9725fce113229de63f4a4f7f0028fc4433bb0cf82f9c2488f30a5c00
5
5
  SHA512:
6
- metadata.gz: bb36fe31efde8c3757ee9dcd0be2b33e66dc105f5acc484432b1fd0217a6892032fdf5ded0a90fc7038e796398bb926a417cf877bea6cc46b6064296a524c649
7
- data.tar.gz: 1e254bdaac3a75287aea4167f0d7a32781619e4836496809634cbc16244d35d18183782280c0476ca0853b00726ae4b46e445abddbc36098cf56c412477a59a8
6
+ metadata.gz: 35a85aa4833993da47e93adec5d930f26a0146d360eef97cee8ffec1d420b0ab19c6ca4009de94debf0bf5b61a1d6fa2bb819587ecd9a751d7b485f2c70ab961
7
+ data.tar.gz: 7168ecf11628dcf7e79beaffc32c56e44607a4ab57ea54cfaa867aaeb27eb8d09fb4a014b84a380f7377a29cc3061899919ec1048467029a8b54b4ba3e41b3dc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [0.5.1] - 2026-08-05
2
+
3
+ ### Added
4
+
5
+ - **`Ask::Skills::LoadSkillTool`** — the LLM-facing tool that loads a
6
+ discovered skill's full instructions on demand (progressive skill
7
+ disclosure). Moved here from ask-agent (where it was
8
+ `Ask::Agent::Skills::LoadSkillTool`) so the gem owns discovery, listing,
9
+ and loading together. The tool is an `Ask::Tool` (ask-tools) and returns
10
+ `Ask::Result` (ask-core); ask-skills now depends on ask-tools.
11
+
1
12
  ## [0.5.0] - 2026-08-02
2
13
 
3
14
  ### Removed
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ask/tools/tool"
4
+ require "ask/result"
5
+
6
+ module Ask
7
+ module Skills
8
+ # Tool that lets the LLM load a discovered skill's full instructions on
9
+ # demand. Skills are listed by name and description via progressive
10
+ # disclosure — the LLM decides which to load.
11
+ #
12
+ # Usage by the LLM: call load_skill with the skill name.
13
+ class LoadSkillTool < Ask::Tool
14
+ description "Load the full instructions for a skill by name. Use this when a listed skill seems relevant to the current task."
15
+
16
+ param :name, type: :string, desc: "Name of the skill to load (e.g., writing-guide)", required: true
17
+
18
+ def initialize(registry:)
19
+ @registry = registry
20
+ super()
21
+ end
22
+
23
+ def execute(name:)
24
+ skill = @registry&.[](name)
25
+ unless skill
26
+ available = @registry&.names&.join(", ") || "none"
27
+ return Ask::Result.failure("Skill '#{name}' not found. Available skills: #{available}")
28
+ end
29
+
30
+ # Return the full skill content so it can be injected into conversation
31
+ content = "## Skill: #{skill.name}\n#{skill.description}\n\n#{skill.instructions}"
32
+ Ask::Result.ok(data: { name: skill.name, content: content })
33
+ end
34
+
35
+ def name
36
+ "load_skill"
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,5 +1,5 @@
1
1
  module Ask
2
2
  module Skills
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
data/lib/ask/skills.rb CHANGED
@@ -8,6 +8,7 @@ module Ask
8
8
  autoload :Registry, "ask/skills/registry"
9
9
  autoload :Formatter, "ask/skills/formatter"
10
10
  autoload :Validator, "ask/skills/validator"
11
+ autoload :LoadSkillTool, "ask/skills/load_skill_tool"
11
12
 
12
13
  module Source
13
14
  autoload :Base, "ask/skills/sources/base"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-skills
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -9,6 +9,20 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ask-tools
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0.1'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0.1'
12
26
  - !ruby/object:Gem::Dependency
13
27
  name: minitest
14
28
  requirement: !ruby/object:Gem::Requirement
@@ -67,6 +81,7 @@ files:
67
81
  - lib/ask-skills.rb
68
82
  - lib/ask/skills.rb
69
83
  - lib/ask/skills/formatter.rb
84
+ - lib/ask/skills/load_skill_tool.rb
70
85
  - lib/ask/skills/registry.rb
71
86
  - lib/ask/skills/skill.compose/SKILL.md
72
87
  - lib/ask/skills/skill.design/SKILL.md