ask-skills 0.4.2 → 0.5.0

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: 0a4c7549f41deea19983fb7bc68b3f8b0b97779b9cb164343608209bb64f5c61
4
- data.tar.gz: 64db989863e81200f0985a45fa4c998bdff646bd9dad3f50031334baff34df62
3
+ metadata.gz: 6a8fc1e81c128476d7e6a3e5ce291213880f0d55a7261d41c7a99903e0c08431
4
+ data.tar.gz: 772dd0930f80b16fa8fb4b651245011899d5cf6406a8ad4a3a7c8002b17f435e
5
5
  SHA512:
6
- metadata.gz: 244ee5c7ac9a6b69885cc659da57409a09f314bbb2d7fc045bc15fda179f6735e6d4462ebab47500d3507271cfcdb9baa9559e5ccbad233685b70528d799db64
7
- data.tar.gz: d96732c2d1e7c966f85f8aae43caafa9ac5f8cafbdcd962c0c4dc94fdfa9d5dcf832701f70f07473f0e0e49427cc8783112a86c162438780f37c0707b6f5c1a4
6
+ metadata.gz: bb36fe31efde8c3757ee9dcd0be2b33e66dc105f5acc484432b1fd0217a6892032fdf5ded0a90fc7038e796398bb926a417cf877bea6cc46b6064296a524c649
7
+ data.tar.gz: 1e254bdaac3a75287aea4167f0d7a32781619e4836496809634cbc16244d35d18183782280c0476ca0853b00726ae4b46e445abddbc36098cf56c412477a59a8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [0.5.0] - 2026-08-02
2
+
3
+ ### Removed
4
+
5
+ - **Legacy `.agents/skills/` discovery path** — project skills now live in
6
+ `agents/shared/skills/` (or `app/agents/shared/skills/` in Rails). Move any
7
+ skills placed in `.agents/skills/` to the shared directory; nothing else
8
+ changes.
9
+
1
10
  ## [0.4.2] - 2026-07-31
2
11
 
3
12
  ### Fixed
data/README.md CHANGED
@@ -2,13 +2,11 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ask-skills.svg)](https://badge.fury.io/rb/ask-skills)
4
4
 
5
- Discover, validate, and load agent skills from project directories, user config,
6
- and installed gems. Ships built-in skills for codebase exploration and debugging
7
- methodology.
8
-
9
- A **skill** is a markdown file containing step-by-step methodology for a specific
10
- domain task. It's listed in the agent's system prompt (just name + description)
11
- and loaded on-demand when the agent decides it needs domain guidance.
5
+ Discover, validate, and load agent skills for the ask-rb ecosystem. A skill
6
+ is a markdown file with step-by-step methodology for a domain task. Skills are
7
+ listed in the agent's system prompt (name + description) and loaded on demand
8
+ when the agent decides it needs domain guidance. Ships built-in skills
9
+ (`skill.design`, `skill.compose`).
12
10
 
13
11
  ## Installation
14
12
 
@@ -16,181 +14,89 @@ and loaded on-demand when the agent decides it needs domain guidance.
16
14
  gem "ask-skills"
17
15
  ```
18
16
 
19
- Then:
17
+ ## Quick Start
20
18
 
21
19
  ```ruby
22
20
  require "ask/skills"
23
- ```
24
-
25
- ## Quick Start
26
21
 
27
- ```ruby
28
- # Discover all available skills
22
+ # Discover skills from project, user config, gems, and built-ins
29
23
  registry = Ask::Skills.discover
30
- # => Finds skills from:
31
- # - Built-in skills (skill.design, skill.compose)
32
- # - Installed gems (ask-rails, ask-github, etc.)
33
- # - .agents/skills/*/ in the project
34
- # - ~/.config/ask/skills/*/ in home dir
35
-
36
- # List available skills
37
- registry.names
38
- # => ["skill.compose", "skill.design"]
24
+ registry.names # => ["skill.compose", "skill.design", ...]
39
25
 
40
26
  # Get a skill by name
41
27
  skill = registry["skill.design"]
42
28
  skill.name # => "skill.design"
43
- skill.description # => "How to design and write effective skills for the ask-rb ecosystem"
29
+ skill.description # => "How to design and write effective skills..."
44
30
  skill.instructions # => markdown body with step-by-step methodology
45
31
 
46
- # Format for system prompt
47
- registry.format_for_prompt
48
- # => "## Available Skills\n\n- **skill.design**: How to design..."
49
-
50
- # XML format for machine parsing
51
- formatter = Ask::Skills::Formatter.new(registry)
52
- formatter.to_xml
53
- # => "<available_skills><skill><name>skill.design</name>..."
54
-
55
- # Validate skills
56
- errors = Ask::Skills::Validator.new(registry.skills.values).validate_all
32
+ # Include per-agent skills too
33
+ registry = Ask::Skills.discover(agent_dir: "agents/health_check")
57
34
  ```
58
35
 
59
- ## Priority Resolution
36
+ ## Where Skills Live
60
37
 
61
- When the same skill name exists in multiple places, priority determines which
62
- one is used. **First source wins:**
63
-
64
- | Priority | Source | Location |
65
- |----------|--------|----------|
66
- | 1 (highest) | Project-local | `.agents/skills/<name>/SKILL.md` |
67
- | 2 | User-global | `~/.config/ask/skills/<name>/SKILL.md` |
68
- | 3 | Installed gems | `Gem.find_files("ask/skills/*/SKILL.md")` |
69
- | 4 (lowest) | Built-in | Shipped with ask-skills gem |
70
-
71
- This means you can override any skill by placing a file with the same name in
72
- your project's `.agents/skills/` directory.
73
-
74
- ## Skill Directory Convention
38
+ Project skills live in `agents/shared/skills/` (or `app/agents/shared/skills/`
39
+ in Rails), per-agent skills in `agents/<name>/skills/`, user skills in
40
+ `~/.config/ask/skills/`, and gems ship skills under `ask/skills/*/SKILL.md`.
75
41
 
76
42
  ```
77
- .agents/skills/
78
- ├── db_debug/
79
- └── SKILL.md project-local skill
80
- ├── deploy/
81
- │ └── SKILL.md
82
- └── custom_check/
83
- └── SKILL.md
43
+ agents/shared/skills/
44
+ └── db_debug/
45
+ └── SKILL.md # project-shared skill
46
+
47
+ agents/health_check/skills/
48
+ └── nginx_debug/
49
+ ┗── SKILL.md # per-agent skill
84
50
 
85
51
  ~/.config/ask/skills/
86
- ├── my_workflow/
87
- └── SKILL.md user-global skill
88
- └── team_patterns/
89
- └── SKILL.md
90
-
91
- # From installed gems:
92
- ask-rails-0.2.0/lib/ask/skills/
93
- ├── rails.db_debug/SKILL.md
94
- └── rails.deploy_pipeline/SKILL.md
95
-
96
- ask-github-0.1.0/lib/ask/skills/
97
- ├── github.pr_review/SKILL.md
98
- └── github.issue_triage/SKILL.md
52
+ └── my_workflow/
53
+ └── SKILL.md # user-global skill
99
54
  ```
100
55
 
56
+ When the same skill name exists in multiple places, the first source wins:
57
+ per-agent > shared project (Rails included) > user > gems > built-in. Place a
58
+ skill with the same name in a higher-priority location to override it.
59
+
101
60
  ## Skill Format
102
61
 
103
62
  ```markdown
104
63
  ---
105
- name: rails.db_debug
106
- description: Step-by-step methodology for debugging database issues in Rails
64
+ name: db_debug
65
+ description: Step-by-step methodology for debugging database issues
66
+ tags: database, debugging
67
+ version: 1
68
+ author: your-team
69
+ always: true
107
70
  ---
108
71
 
109
- When investigating database performance issues, follow these steps:
110
-
111
- 1. **Understand the Schema** — Use ReadModel to inspect...
112
- 2. **Check Indexes** — Query pg_indexes for missing indexes...
113
- 3. **Explain Slow Queries** — Use EXPLAIN ANALYZE on...
72
+ When investigating database performance issues, follow these steps...
114
73
  ```
115
74
 
116
- ## Built-in Skills
117
-
118
- | Skill | Description |
119
- |-------|-------------|
120
- | `skill.design` | How to design and write effective skills for the ask-rb ecosystem |
121
- | `skill.compose` | How skills interact, combine, and resolve in the ask-rb ecosystem |
122
-
123
- ## API Reference
75
+ `always: true` auto-injects the full instructions into the system prompt
76
+ instead of listing the skill for on-demand loading.
124
77
 
125
- ### `Ask::Skills.discover(sources: nil)`
78
+ ## Essential API
126
79
 
127
- Returns a `Registry` with skills from all sources, in priority order.
128
- Pass `sources:` to override with custom sources.
129
-
130
- ### `Ask::Skills::Registry`
131
-
132
- | Method | Description |
133
- |--------|-------------|
134
- | `[]` | Lookup skill by name |
135
- | `names` | List all skill names |
136
- | `skills` | Hash of name → Skill |
137
- | `format_for_prompt` | Generate markdown section |
138
-
139
- ### `Ask::Skills::Skill` (Data.define)
140
-
141
- | Attribute | Description |
142
- |-----------|-------------|
143
- | `name` | Unique identifier (e.g. `rails.db_debug`) |
144
- | `description` | One-line summary for system prompt |
145
- | `instructions` | Full markdown methodology body |
146
- | `source` | File path the skill was loaded from |
147
-
148
- ### `Ask::Skills::Formatter`
149
-
150
- | Method | Description |
151
- |--------|-------------|
152
- | `to_prompt_section` | Markdown format for system prompt |
153
- | `to_xml` | XML format for machine parsing |
154
-
155
- ### `Ask::Skills::Validator`
156
-
157
- | Method | Description |
158
- |--------|-------------|
159
- | `validate_all` | Validate all skills, return errors |
160
- | `validate` | Validate a single skill |
161
-
162
- ## Custom Sources
163
-
164
- ```ruby
165
- require "ask/skills"
166
-
167
- # Custom filesystem source
168
- custom = Ask::Skills::Source::Filesystem.new(dir: "/path/to/skills")
169
- registry = Ask::Skills.discover(sources: [custom])
170
- ```
80
+ | Entry point | Purpose |
81
+ |---|---|
82
+ | `Ask::Skills.discover(agent_dir: nil, sources: nil)` | Build a `Registry` from all sources in priority order |
83
+ | `registry["name"]` | Look up a skill by name |
84
+ | `registry.names` | List all skill names |
85
+ | `registry.skills` | Hash of name to `Skill` |
86
+ | `Ask::Skills::Skill` | Data object: `name`, `description`, `instructions`, `source`, `metadata`, `siblings` (references, scripts, assets) |
87
+ | `askr skills <list\|show\|search>` | CLI (from ask-agent) for inspecting available skills |
171
88
 
172
- ## Gems That Ship Skills
89
+ ## Full documentation
173
90
 
174
- | Gem | Planned Skills |
175
- |---|---|
176
- | `ask-skills` (built-in) | skill.design, skill.compose |
177
- | `ask-rails` | rails.db_debug, rails.route_trouble, rails.deploy_pipeline |
178
- | `ask-github` | github.use_github |
179
- | `ask-slack` | slack.use_slack |
180
- | `ask-notion` | notion.use_notion |
181
- | `ask-linear` | linear.use_linear |
182
- | `ask-honeybadger` | honeybadger.use_honeybadger |
183
- | `ask-sentry` | sentry.use_sentry |
184
- | `ask-solid_errors` | solid_errors.use_solid_errors |
185
- | `ask-tools-shell` | shell.patterns |
186
- | `ask-llm-providers` | providers.model_select |
91
+ The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs.
92
+ https://ask-rb.github.io/ask-docs/core/skills covers ask-skills in depth,
93
+ including custom sources, the validator, and formatting for system prompts.
94
+ API reference: https://ask-rb.github.io/ask-docs/reference/api.
187
95
 
188
96
  ## Development
189
97
 
190
- ```bash
191
98
  bundle install
192
99
  bundle exec rake test
193
- ```
194
100
 
195
101
  ## License
196
102
 
@@ -11,11 +11,12 @@ multiple places, the first source wins:
11
11
  1. **Built-in** (shipped with ask-skills gem) — lowest priority
12
12
  2. **Installed gems** (ask-rails, ask-github, etc.)
13
13
  3. **User-global** (`~/.config/ask/skills/`)
14
- 4. **Project-local** (`.agents/skills/` in the project) — highest priority
14
+ 4. **Shared project** (`agents/shared/skills/`, or `app/agents/shared/skills/` in Rails)
15
+ 5. **Per-agent** (`agents/<name>/skills/`) — highest priority
15
16
 
16
17
  This means you can override any skill by placing a file with the same name in
17
- your project's `.agents/skills/` directory. Or provide personal defaults in
18
- `~/.config/ask/skills/`.
18
+ `agents/shared/skills/` (or a per-agent `agents/<name>/skills/`). Or provide
19
+ personal defaults in `~/.config/ask/skills/`.
19
20
 
20
21
  ## How Skills Appear in the System Prompt
21
22
 
@@ -1,5 +1,5 @@
1
1
  module Ask
2
2
  module Skills
3
- VERSION = "0.4.2"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
data/lib/ask/skills.rb CHANGED
@@ -28,7 +28,6 @@ module Ask
28
28
  end
29
29
 
30
30
  # Default sources when no custom sources or agent directory given.
31
- # Legacy `.agents/skills/` is kept for backward compatibility.
32
31
  def default_sources
33
32
  build_source_list
34
33
  end
@@ -103,7 +102,7 @@ module Ask
103
102
  private
104
103
 
105
104
  # Build the prioritized source list.
106
- # Order: per-agent → shared project → legacy → user → gems → built-in
105
+ # Order: per-agent → shared project → user → gems → built-in
107
106
  def build_source_list(agent_dir: nil)
108
107
  sources = []
109
108
 
@@ -117,9 +116,6 @@ module Ask
117
116
  sources << Source::Filesystem.new(project_dir: "agents/shared/skills")
118
117
  sources << Source::Filesystem.new(project_dir: "app/agents/shared/skills")
119
118
 
120
- # Legacy project skills (backward compat)
121
- sources << Source::Filesystem.new(project_dir: ".agents/skills")
122
-
123
119
  # User-global skills
124
120
  sources << Source::Filesystem.new(user_dir: "~/.config/ask/skills")
125
121
 
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.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto