agent_skills_configurations 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 944cf6ba900e530f3c4387eb66951a068d2e8747d5eea64a81ddffff9d7f97be
4
+ data.tar.gz: f7956fc899c6e618133df5e5661e7876ccab4d325e0bbc9896e84e9e3e4772a1
5
+ SHA512:
6
+ metadata.gz: ce8a8a75e7fad9ebfd596628363101b8929f5109e24b55643755d3780d2d2127510458b0c574f0df5c25fd16058879892f5cf28358cc0633e071587c79bd683e
7
+ data.tar.gz: f2da4243820e2b688e6e35b736db1920cc992688c64d6958f3db5b86d8cf14e88594eb9e70590ca6519f9f201b4bc7258e1174ea2ee00122180aa4db514135b0
data/.yardopts ADDED
@@ -0,0 +1,6 @@
1
+ --markup markdown
2
+ --plugin markdown
3
+ --output-dir doc
4
+ lib/**/*.rb
5
+ -
6
+ README.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2026-02-01
4
+
5
+ ### Added
6
+
7
+ - Initial release of AgentSkillsConfigurations
8
+ - Support for 49+ AI coding agents including Cursor, Claude Code, Codex, Windsurf, and more
9
+ - Unified API for discovering and accessing agent skill configuration paths
10
+ - Automatic path resolution for project-level and global skill directories
11
+ - Environment variable support for XDG_CONFIG_HOME, CLAUDE_CONFIG_DIR, and CODEX_HOME
12
+ - Intelligent fallback paths for global skills
13
+ - Automatic detection of installed agents
14
+ - Performance-optimized caching for agent queries
15
+ - Comprehensive documentation with YARD annotations
16
+ - Full test coverage
@@ -0,0 +1,11 @@
1
+ # The Ruby Community Conduct Guideline
2
+
3
+ This code of conduct is the one published by Ruby at https://www.ruby-lang.org/en/conduct/
4
+
5
+ This document provides community guidelines for a safe, respectful, productive, and collaborative place for any person who is willing to contribute to the Ruby community. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.).
6
+
7
+ - Participants will be tolerant of opposing views.
8
+ - Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
9
+ - When interpreting the words and actions of others, participants should always assume good intentions.
10
+ - Behaviour which can be reasonably considered harassment will not be tolerated.
11
+
data/LICENSE.txt ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2026 Lucian Ghinda
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,289 @@
1
+ # AgentSkillsConfigurations
2
+
3
+ [![Ruby](https://img.shields.io/badge/Ruby-%3E%3D_3.2.0-ruby.svg)](https://www.ruby-lang.org/)
4
+
5
+ A unified interface for discovering and accessing skill configuration paths for various AI coding agents.
6
+
7
+ AgentSkillsConfigurations provides a consistent API for working with 49+ AI coding agents including Cursor, Claude Code, Codex, Windsurf, and many more. It handles platform-specific path resolution, environment variable support, and automatic detection of installed agents.
8
+
9
+ This gem was inspired by https://github.com/vercel-labs/skills the part that takes care of the generating the paths to the configuration for each CLI agent/LLM.
10
+
11
+ If you find that any configuration is not correct please submit a PR with the fix and include there a link where to confirm that the new path is the correct one.
12
+
13
+ In case you are using an LLM point it to [doc/AgentSkillsConfigurations.md](doc/AgentSkillsConfigurations.md) which should behave like LLM.txt allowing any LLM to understand how to use this gem.
14
+
15
+ ## Features
16
+
17
+ - **Unified API**: Access 49+ AI coding agents through a single, consistent interface
18
+ - **Path Resolution**: Automatic resolution of project-level and global skill directories
19
+ - **Environment Variables**: Support for XDG_CONFIG_HOME, CLAUDE_CONFIG_DIR, CODEX_HOME, and more
20
+ - **Detection**: Automatically detect which agents are installed on your system
21
+ - **Fallbacks**: Intelligent fallback paths for global skills
22
+ - **Caching**: Performance-optimized with built-in caching
23
+
24
+ ## Installation
25
+
26
+ Add this line to your application's Gemfile:
27
+
28
+ ```ruby
29
+ gem "agent_skills_configurations"
30
+ ```
31
+
32
+ And then execute:
33
+
34
+ ```bash
35
+ bundle install
36
+ ```
37
+
38
+ Or install it yourself as:
39
+
40
+ ```bash
41
+ gem install agent_skills_configurations
42
+ ```
43
+
44
+ ## Quick Start
45
+
46
+ ```ruby
47
+ require "agent_skills_configurations"
48
+
49
+ # Find a specific agent
50
+ agent = AgentSkillsConfigurations.find("cursor")
51
+ agent.name # => "cursor"
52
+ agent.display_name # => "Cursor"
53
+ agent.skills_dir # => ".cursor/skills"
54
+ agent.global_skills_dir # => "/Users/username/.cursor/skills"
55
+
56
+ # List all detected agents
57
+ AgentSkillsConfigurations.detected.map(&:name)
58
+ # => ["cursor", "claude-code", "windsurf", ...]
59
+
60
+ # List all configured agents (49+ supported)
61
+ AgentSkillsConfigurations.all.map(&:name)
62
+ # => ["amp", "claude-code", "cursor", "codex", "windsurf", ...]
63
+ ```
64
+
65
+ ## Usage
66
+
67
+ ### Finding Agents
68
+
69
+ Get a specific agent configuration by name:
70
+
71
+ ```ruby
72
+ agent = AgentSkillsConfigurations.find("claude-code")
73
+ agent.name # => "claude-code"
74
+ agent.display_name # => "Claude Code"
75
+ agent.skills_dir # => ".claude/skills"
76
+ agent.global_skills_dir # => "/Users/username/.claude/skills"
77
+ ```
78
+
79
+ Finding an unknown agent raises an error:
80
+
81
+ ```ruby
82
+ AgentSkillsConfigurations.find("unknown-agent")
83
+ # => raises AgentSkillsConfigurations::Error: Unknown agent: unknown-agent
84
+ ```
85
+
86
+ ### Listing All Configured Agents
87
+
88
+ Get all 49+ configured agents:
89
+
90
+ ```ruby
91
+ all_agents = AgentSkillsConfigurations.all
92
+ all_agents.map(&:name)
93
+ # => ["amp", "claude-code", "cursor", "codex", "windsurf", ...]
94
+
95
+ # Iterate through all agents
96
+ AgentSkillsConfigurations.all.each do |agent|
97
+ puts "#{agent.display_name}: #{agent.skills_dir}"
98
+ end
99
+ ```
100
+
101
+ ### Detecting Installed Agents
102
+
103
+ Find which agents are detected on the current machine:
104
+
105
+ ```ruby
106
+ detected = AgentSkillsConfigurations.detected
107
+ detected.map(&:name)
108
+ # => ["cursor", "claude-code"]
109
+
110
+ # Check if a specific agent is detected
111
+ installed_names = AgentSkillsConfigurations.detected.map(&:name)
112
+ installed_names.include?("cursor") # => true
113
+ installed_names.include?("unknown") # => false
114
+ ```
115
+
116
+ Detection works by checking configured paths:
117
+
118
+ - **String paths**: Check if path exists relative to user's home directory
119
+ - **Hash with `cwd`**: Check relative to current working directory
120
+ - **Hash with `base`**: Resolve using a configured base path
121
+ - **Hash with `absolute`**: Check absolute path directly
122
+
123
+ ### Clearing Cache
124
+
125
+ Clear the cached agent lists when needed:
126
+
127
+ ```ruby
128
+ # After changing environment variables
129
+ ENV["XDG_CONFIG_HOME"] = "/new/path"
130
+ AgentSkillsConfigurations.reset!
131
+
132
+ # After agents' paths are created or removed
133
+ AgentSkillsConfigurations.reset!
134
+ detected = AgentSkillsConfigurations.detected
135
+ ```
136
+
137
+ ### Environment Variables
138
+
139
+ Global skill paths are resolved using environment variables when available, with automatic fallbacks:
140
+
141
+ ```ruby
142
+ # XDG_CONFIG_HOME for Amp, Goose, and other XDG-compliant agents
143
+ ENV["XDG_CONFIG_HOME"] = "/custom/xdg"
144
+ agent = AgentSkillsConfigurations.find("amp")
145
+ agent.global_skills_dir # => "/custom/xdg/agents/skills"
146
+
147
+ # CLAUDE_CONFIG_DIR for Claude Code and OpenCode
148
+ ENV["CLAUDE_CONFIG_DIR"] = "/custom/claude"
149
+ agent = AgentSkillsConfigurations.find("claude-code")
150
+ agent.global_skills_dir # => "/custom/claude/skills"
151
+
152
+ # CODEX_HOME for Codex
153
+ ENV["CODEX_HOME"] = "/custom/codex"
154
+ agent = AgentSkillsConfigurations.find("codex")
155
+ agent.global_skills_dir # => "/custom/codex/skills"
156
+ ```
157
+
158
+ Without environment variables, paths fall back to default locations:
159
+
160
+ ```ruby
161
+ ENV["XDG_CONFIG_HOME"] = nil
162
+ agent = AgentSkillsConfigurations.find("amp")
163
+ agent.global_skills_dir # => "/Users/username/.config/agents/skills"
164
+ ```
165
+
166
+ ### Path Resolution with Fallbacks
167
+
168
+ Some agents support multiple fallback paths for global skills. The library checks each candidate path in order and returns the first one that exists:
169
+
170
+ ```ruby
171
+ # Configuration in YAML:
172
+ # - name: moltbot
173
+ # global_skills_path: ".moltbot/skills"
174
+ # global_skills_path_fallbacks:
175
+ # - ".clawdbot/skills"
176
+ # - ".moltbot/skills"
177
+
178
+ # Resolution order:
179
+ # 1. Check ~/.moltbot/skills
180
+ # 2. Check ~/.clawdbot/skills
181
+ # 3. Check ~/.moltbot/skills (fallback)
182
+ # 4. Return first existing path, or primary path if none exist
183
+ ```
184
+
185
+ ## Supported Agents
186
+
187
+ The gem includes configuration for 49+ AI coding agents:
188
+
189
+ - Aider, Amp, Antigravity, Avante, Bolt.new, Cline
190
+ - Claude Code, CodeBuddy, Codeium, Command Code, Copilot, Codex, Crush
191
+ - DeepSeek, Droid, Fabric
192
+ - GitHub Copilot, GPT-CLI, Gemini CLI, Goose
193
+ - Junie, Kaito, Kilo, Kimi CLI, Kiro CLI, Kode
194
+ - Moltbot, MCPJam, Mux
195
+ - Neovate, OpenClaude IDE, OpenCode, OpenHands, Pochi, Perplexity, Phind
196
+ - Qoder, Qwen Code, Roo Code
197
+ - SageMaker, Tabby, Trae CN, Trae
198
+ - v0 CLI, Windsurf, Zencoder
199
+ - And more!
200
+
201
+ If you find that any configuration is not correct please submit a PR with the fix and include there a link where to confirm that the new path is the correct one.
202
+
203
+ ## Advanced Topics
204
+
205
+ ### Understanding Skill Directories
206
+
207
+ AI coding agents typically support two types of skills:
208
+
209
+ 1. **Project Skills** (`skills_dir`): These are specific to a single project and live alongside the project code. For example, a project might have a `.cursor/skills` directory containing skills tailored to that project.
210
+
211
+ 2. **Global Skills** (`global_skills_dir`): These are shared across all projects and typically live in the user's home directory. For example, `~/.cursor/skills` contains reusable skills that work with any project.
212
+
213
+ When working with skills, you typically:
214
+ - Check the project's `skills_dir` for project-specific skills
215
+ - Fall back to `global_skills_dir` for general-purpose skills
216
+ - Combine both sources to give the agent full access to available skills
217
+
218
+ ### Custom Agent Configurations
219
+
220
+ Agent configurations are defined in `lib/agent_skills_configurations/agents.yml`. To add a new agent, add an entry to the `agents` array:
221
+
222
+ ```yaml
223
+ agents:
224
+ - name: your-agent
225
+ display_name: Your Agent
226
+ skills_dir: ".your-agent/skills"
227
+ base_path: home
228
+ global_skills_path: ".your-agent/skills"
229
+ detect_paths:
230
+ - ".your-agent"
231
+ ```
232
+
233
+ ### Base Paths
234
+
235
+ Base paths are defined in the YAML configuration and support environment variables:
236
+
237
+ ```yaml
238
+ base_paths:
239
+ xdg_config:
240
+ env_var: XDG_CONFIG_HOME
241
+ fallback: ".config"
242
+ home:
243
+ env_var: ""
244
+ fallback: ""
245
+ claude_home:
246
+ env_var: CLAUDE_CONFIG_DIR
247
+ fallback: ".claude"
248
+ ```
249
+
250
+ ## Development
251
+
252
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
253
+
254
+ ```bash
255
+ # Install dependencies
256
+ bin/setup
257
+
258
+ # Run tests
259
+ rake test
260
+
261
+ # Start interactive console
262
+ bin/console
263
+ ```
264
+
265
+ To install this gem onto your local machine, run:
266
+
267
+ ```bash
268
+ bundle exec rake install
269
+ ```
270
+
271
+ ## Contributing
272
+
273
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lucianghinda/agent_skills_configurations. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/lucianghinda/agent_skills_configurations/blob/main/CODE_OF_CONDUCT.md).
274
+
275
+ ### Running Tests
276
+
277
+ Make sure all tests pass before submitting a pull request:
278
+
279
+ ```bash
280
+ rake test
281
+ ```
282
+
283
+ ## License
284
+
285
+ The gem is available as open source under the terms of the [Apache 2.0 License](https://opensource.org/license/apache-2-0).
286
+
287
+ ## Code of Conduct
288
+
289
+ Everyone interacting in the AgentSkillsConfigurations project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/lucianghinda/agent_skills_configurations/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "minitest/test_task"
5
+
6
+ Minitest::TestTask.create
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ require "yard"
13
+ YARD::Rake::YardocTask.new do |t|
14
+ t.options = ["--format", "markdown"]
15
+ end
16
+
17
+ task default: %i[test rubocop]
@@ -0,0 +1,112 @@
1
+ # Class: AgentSkillsConfigurations::Agent
2
+ **Inherits:** Data
3
+
4
+
5
+ Value object describing a configured agent and its skill locations.
6
+
7
+ An Agent represents a single AI coding agent configuration with information
8
+ about where to find project-level skills and global skills for that agent.
9
+ This is a read-only data structure returned by
10
+ {AgentSkillsConfigurations.find} and other query methods.
11
+
12
+ ## Agent Attributes
13
+
14
+ Each agent has four key attributes:
15
+
16
+ * `name` - The canonical identifier used in code (e.g., "cursor",
17
+ "claude-code")
18
+ * `display_name` - A human-friendly name for UI/display purposes (e.g.,
19
+ "Cursor", "Claude Code")
20
+ * `skills_dir` - A relative path for project-specific skills (e.g.,
21
+ ".cursor/skills")
22
+ * `global_skills_dir` - An absolute path to the user's global skill
23
+ repository
24
+
25
+ ## Understanding Skill Directories
26
+
27
+ AI coding agents typically support two types of skills:
28
+
29
+ 1. *Project Skills* ({skills_dir}): These are specific to a single project
30
+ and live alongside the project code. For example, a project might have a
31
+ `.cursor/skills` directory containing skills tailored to that project.
32
+
33
+ 2. *Global Skills* ({global_skills_dir}): These are shared across all
34
+ projects and typically live in the user's home directory. For example,
35
+ `~/.cursor/skills` contains reusable skills that work with any project.
36
+
37
+ When working with skills, you typically:
38
+
39
+ * Check the project's `skills_dir` for project-specific skills
40
+ * Fall back to `global_skills_dir` for general-purpose skills
41
+ * Combine both sources to give the agent full access to available skills
42
+
43
+ ## Accessing Agent Information
44
+
45
+ Since Agent is a Data object, all attributes are accessible via reader
46
+ methods:
47
+
48
+ agent = AgentSkillsConfigurations.find("cursor")
49
+ agent.name # => "cursor"
50
+ agent.display_name # => "Cursor"
51
+ agent.skills_dir # => ".cursor/skills"
52
+ agent.global_skills_dir # => "/Users/username/.cursor/skills"
53
+
54
+ You can also convert to a Hash:
55
+
56
+ agent.to_h
57
+ # => { name: "cursor",
58
+ # display_name: "Cursor",
59
+ # skills_dir: ".cursor/skills",
60
+ # global_skills_dir: "/Users/username/.cursor/skills" }
61
+
62
+ **@attr_reader** [String] Canonical agent name from `agents.yml`. This is the
63
+ identifier used when finding agents via {AgentSkillsConfigurations.find}.
64
+
65
+ **@attr_reader** [String] Human-friendly label for UI/display purposes.
66
+ This is the name shown to users, e.g., in menus or configuration interfaces.
67
+
68
+ **@attr_reader** [String] Relative directory where project-specific
69
+ skills live. This path is relative to the project root and should not start
70
+ with a slash (e.g., ".cursor/skills", not "/.cursor/skills").
71
+
72
+ **@attr_reader** [String] Absolute resolved path to global skills.
73
+ This path is resolved from the YAML configuration, taking into account
74
+ environment variables and fallbacks. It always begins with a slash.
75
+
76
+ **@see** [] Find an agent by name
77
+
78
+ **@see** [] Get all agents
79
+
80
+ **@see** [] Get installed agents
81
+
82
+ **@since** [] 0.1.0
83
+
84
+
85
+ # Attributes
86
+ ## display_name[RW] [](#attribute-i-display_name)
87
+ Human-friendly label for UI/display purposes. This is the name shown to users,
88
+ e.g., in menus or configuration interfaces.
89
+
90
+ **@return** [String] the current value of display_name
91
+
92
+ ## global_skills_dir[RW] [](#attribute-i-global_skills_dir)
93
+ Absolute resolved path to global skills. This path is resolved from the YAML
94
+ configuration, taking into account environment variables and fallbacks. It
95
+ always begins with a slash.
96
+
97
+ **@return** [String] the current value of global_skills_dir
98
+
99
+ ## name[RW] [](#attribute-i-name)
100
+ Canonical agent name from `agents.yml`. This is the identifier used when
101
+ finding agents via {AgentSkillsConfigurations.find}.
102
+
103
+ **@return** [String] the current value of name
104
+
105
+ ## skills_dir[RW] [](#attribute-i-skills_dir)
106
+ Relative directory where project-specific skills live. This path is relative
107
+ to the project root and should not start with a slash (e.g., ".cursor/skills",
108
+ not "/.cursor/skills").
109
+
110
+ **@return** [String] the current value of skills_dir
111
+
112
+
@@ -0,0 +1,10 @@
1
+ # Exception: AgentSkillsConfigurations::Error
2
+ **Inherits:** StandardError
3
+
4
+
5
+ Base error type for configuration lookup and loading failures.
6
+
7
+ **@since** [] 0.1.0
8
+
9
+
10
+