ask-skills 0.4.0 → 0.4.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: 768239027d0fbaa9696f54f17dab21af118661b7d36c89969e2e8408ff75d8c0
4
- data.tar.gz: 02ac858fc1be5fa4d9ffd93909cf828d8dafb6b9d134a4aac41ba8e3dfe46f38
3
+ metadata.gz: 0a4c7549f41deea19983fb7bc68b3f8b0b97779b9cb164343608209bb64f5c61
4
+ data.tar.gz: 64db989863e81200f0985a45fa4c998bdff646bd9dad3f50031334baff34df62
5
5
  SHA512:
6
- metadata.gz: a242038997b6697ce44fcea6372bcc7ce797dc1ce510e2a5d36216256efdaa34f41d095c2909851f0db8dc2fc12137e934d826fa0cc3eb2bbc8ec1f854161045
7
- data.tar.gz: 478b061e75189527782cff6c567c37b2f629b5594e6839427536a87260fcc89cc383adc4e6db172338d33a8289d5a09b851788532aab3fd07fd8b531611786c4
6
+ metadata.gz: 244ee5c7ac9a6b69885cc659da57409a09f314bbb2d7fc045bc15fda179f6735e6d4462ebab47500d3507271cfcdb9baa9559e5ccbad233685b70528d799db64
7
+ data.tar.gz: d96732c2d1e7c966f85f8aae43caafa9ac5f8cafbdcd962c0c4dc94fdfa9d5dcf832701f70f07473f0e0e49427cc8783112a86c162438780f37c0707b6f5c1a4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.4.2] - 2026-07-31
2
+
3
+ ### Fixed
4
+
5
+ - **Skip built-in skills in gem sources discovery** — the Filesystem source
6
+ loads built-in skills shipped with the ask-skills gem separately, so the
7
+ Gems source now skips them to avoid collision warnings.
8
+
1
9
  ## [0.4.0] - 2026-07-21
2
10
 
3
11
  ### Added
@@ -19,12 +19,14 @@ module Ask
19
19
 
20
20
  def format_for_prompt
21
21
  return "" if @skills.empty?
22
- lines = ["", "## Available Skills", ""]
23
- @skills.each_value do |skill|
24
- lines << skill.to_prompt_entry
25
- end
26
- lines << ""
27
- lines.join("\n")
22
+ Formatter.new(@skills).to_prompt_section
23
+ end
24
+
25
+ # Full instructions for skills with +always: true+ in their frontmatter.
26
+ # These skills are auto-injected into the system prompt rather than
27
+ # being listed for the LLM to load on demand.
28
+ def always_active_skills
29
+ @skills.values.select { |s| s.metadata["always"] == "true" || s.metadata["always"] == true }
28
30
  end
29
31
 
30
32
  private
@@ -33,8 +35,13 @@ module Ask
33
35
  @sources.each do |source|
34
36
  source.load.each do |skill|
35
37
  next unless skill
36
- # First source wins (project overrides gems, user overrides project)
37
- @skills[skill.name] ||= skill
38
+ if @skills.key?(skill.name)
39
+ # First-wins collision: log diagnostic but keep first
40
+ warn "[ask-skills] Collision: skill '#{skill.name}' already loaded from " \
41
+ "#{@skills[skill.name].source}, skipping #{skill.source}"
42
+ else
43
+ @skills[skill.name] = skill
44
+ end
38
45
  end
39
46
  end
40
47
  end
@@ -4,8 +4,6 @@ module Ask
4
4
  module Skills
5
5
  module Source
6
6
  class Filesystem < Base
7
- SIBLING_CATEGORIES = %w[references scripts assets].freeze
8
-
9
7
  def initialize(dir: nil, project_dir: nil, user_dir: nil)
10
8
  @path = dir || project_dir || (user_dir ? File.expand_path(user_dir) : nil)
11
9
  end
@@ -8,9 +8,19 @@ module Ask
8
8
  "Gems"
9
9
  end
10
10
 
11
+ # Directory within the ask-skills gem that contains built-in skills.
12
+ # The built-in Filesystem source loads these separately, so we skip
13
+ # them here to avoid collision warnings.
14
+ BUILTIN_DIR = File.realpath(File.join(__dir__, ".."))
15
+ private_constant :BUILTIN_DIR
16
+
11
17
  def load
12
18
  skills = []
13
19
  Gem.find_files(GLOB).each do |path|
20
+ # Skip skills shipped with the ask-skills gem — they are loaded
21
+ # separately by the built-in Filesystem source.
22
+ next if File.realpath(path).start_with?(BUILTIN_DIR)
23
+
14
24
  if (skill = parse_skill(path))
15
25
  skills << skill
16
26
  end
@@ -1,5 +1,5 @@
1
1
  module Ask
2
2
  module Skills
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
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.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto