ask-skills 0.5.0 → 0.5.2

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: e6436a6d7b9f9dd7ad96d06b446caa7eee713de9823664046a249ace15253eca
4
+ data.tar.gz: e0b1872fccd18cfe3ade452a2082579c9e0d380679255072a26e64f288ede241
5
5
  SHA512:
6
- metadata.gz: bb36fe31efde8c3757ee9dcd0be2b33e66dc105f5acc484432b1fd0217a6892032fdf5ded0a90fc7038e796398bb926a417cf877bea6cc46b6064296a524c649
7
- data.tar.gz: 1e254bdaac3a75287aea4167f0d7a32781619e4836496809634cbc16244d35d18183782280c0476ca0853b00726ae4b46e445abddbc36098cf56c412477a59a8
6
+ metadata.gz: 299aa11f1f6ce8e9f7bdfcbe5104cb9b30279da474ac4216162ef85350308ac2bc5c82f266a612e978d09e7986f3bf72d6f5edd8f4e2b91218157e82d1bfb60a
7
+ data.tar.gz: 52b174942a932c0327993be99fb95484762db31594c6cc1a7c4888e82953c8df26ec678787a2c2b56a0f0b11808a5e2004b49cfb40b77a13c3ba000b8ebca407
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.2"
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.2
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.6.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.6.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
@@ -97,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
112
  - !ruby/object:Gem::Version
98
113
  version: '0'
99
114
  requirements: []
100
- rubygems_version: 4.0.3
115
+ rubygems_version: 4.0.18
101
116
  specification_version: 4
102
117
  summary: Skill discovery and management for the ask-rb ecosystem
103
118
  test_files: []