ma-agents 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -1,264 +1,213 @@
1
- # AI Agent Skills
1
+ # ma-agents
2
2
 
3
- A universal NPX tool to install skills for AI coding agents including Claude Code, Gemini, Copilot, Kilocode, Cline, and Cursor.
3
+ A universal NPX tool to install AI coding agent skills. Write skills once, install them across Claude Code, Gemini, Copilot, Cline, Cursor, and Kilocode.
4
4
 
5
- ## Features
5
+ ## Quick Start
6
6
 
7
- - 🤖 Support for multiple AI coding agents
8
- - 📦 Easy skill installation via NPX
9
- - 🔧 Extensible architecture for adding new agents
10
- - 📝 Simple skill creation system
11
- - 🎯 Interactive CLI for user-friendly installation
7
+ ```bash
8
+ # Interactive wizard
9
+ npx ma-agents
12
10
 
13
- ## Supported Agents
11
+ # Direct install
12
+ npx ma-agents install code-review claude-code
13
+
14
+ # Install a skill to multiple agents at once
15
+ npx ma-agents install code-review claude-code copilot cline
16
+ ```
14
17
 
15
- - **Claude Code** - Anthropic's Claude Code CLI
16
- - **Google Gemini** - Google Gemini Code Assist
17
- - **GitHub Copilot** - GitHub Copilot Agent Mode
18
- - **Kilocode** - Kilocode AI Assistant
19
- - **Cline** - Cline AI Assistant (VSCode Extension)
20
- - **Cursor** - Cursor AI Editor
18
+ ## How It Works
21
19
 
22
- ## Installation
20
+ Skills are written in a **unified generic format** and stored in this package. When you install a skill, the installer:
21
+
22
+ 1. Reads the skill's `SKILL.md` (or agent-specific template if available)
23
+ 2. Injects YAML frontmatter from `skill.json` (the single source of metadata)
24
+ 3. Copies the skill and its resources into the target agent's directory
25
+ 4. Renames resource directories to match the agent's native structure (e.g., `references/` becomes `docs/` for Cline)
26
+
27
+ ```
28
+ Generic (this repo) Installed Output
29
+ ─────────────────── ────────────────
30
+ skills/code-review/
31
+ ├── skill.json ──────────► Injected as YAML frontmatter
32
+ ├── SKILL.md ──────────► .claude/skills/code-review/SKILL.md
33
+ ├── scripts/ ──────────► .claude/skills/code-review/scripts/
34
+ └── references/ ──────────► .claude/skills/code-review/references/
35
+ ```
23
36
 
24
- No installation required! Use directly with NPX:
37
+ ## Supported Agents
25
38
 
39
+ | Agent | Project Path | Template |
40
+ |-------|-------------|----------|
41
+ | Claude Code | `.claude/skills/` | `claude-code` |
42
+ | Google Gemini | `.gemini/skills/` | `generic` |
43
+ | GitHub Copilot | `.github/copilot/skills/` | `generic` |
44
+ | Cursor | `.cursor/skills/` | `generic` |
45
+ | Cline | `.cline/skills/` | `cline` |
46
+ | Kilocode | `.kilocode/skills/` | `generic` |
47
+
48
+ ## Available Skills
49
+
50
+ | Skill | Description |
51
+ |-------|-------------|
52
+ | `code-review` | Comprehensive code reviews following industry best practices and security guidelines |
53
+ | `commit-message` | Generates conventional commit messages from code changes |
54
+ | `test-generator` | Generates comprehensive unit and integration tests |
55
+ | `git-workflow-skill` | Worktree-based feature branch workflow for parallel multi-agent development |
56
+ | `skill-creator` | Guide for creating skills that extend AI agent capabilities |
57
+ | `vercel-react-best-practices` | 57 actionable performance rules for React and Next.js projects |
58
+ | `create-hardened-docker-skill` | Creates production-ready hardened Docker configurations (CIS, OWASP, NIST) |
59
+ | `verify-hardened-docker-skill` | Security verification for Docker configurations against CIS/OWASP/NIST |
60
+ | `js-ts-security-skill` | Security verification for JS/TS codebases against OWASP Top 10 2025 |
61
+
62
+ List all skills:
26
63
  ```bash
27
- npx ai-agent-skills
64
+ npx ma-agents list
28
65
  ```
29
66
 
30
- ## Usage
67
+ ## CLI Usage
31
68
 
32
- ### Interactive Mode
69
+ ```
70
+ npx ma-agents Interactive wizard
71
+ npx ma-agents install Interactive install wizard
72
+ npx ma-agents install <skill> <agents...> Install directly
73
+ npx ma-agents list List available skills
74
+ npx ma-agents agents List supported agents
75
+ npx ma-agents help Show help
76
+ ```
33
77
 
34
- Simply run the command and follow the prompts:
78
+ ### Install Options
35
79
 
36
80
  ```bash
37
- npx ai-agent-skills
81
+ # Default: installs to project-level paths (current directory)
82
+ npx ma-agents install code-review claude-code
83
+
84
+ # Install to global/user-level paths
85
+ npx ma-agents install code-review claude-code --global
86
+
87
+ # Install to a custom directory
88
+ npx ma-agents install code-review claude-code --path ./my-skills
38
89
  ```
39
90
 
40
- You'll be able to:
41
- 1. Choose an action (install skill, list skills, list agents)
42
- 2. Select a skill to install
43
- 3. Choose which agents to install for
44
- 4. Specify a custom installation path (optional)
91
+ ### Installation Scope
45
92
 
46
- ### Available Skills
93
+ By default, skills install at **project level** (relative to where the command is run):
47
94
 
48
- The package comes with example skills:
95
+ | Agent | Project Path |
96
+ |-------|-------------|
97
+ | Claude Code | `.claude/skills/<skill-name>/SKILL.md` |
98
+ | Gemini | `.gemini/skills/<skill-name>/SKILL.md` |
99
+ | Copilot | `.github/copilot/skills/<skill-name>/SKILL.md` |
100
+ | Cursor | `.cursor/skills/<skill-name>/SKILL.md` |
101
+ | Cline | `.cline/skills/<skill-name>/SKILL.md` |
102
+ | Kilocode | `.kilocode/skills/<skill-name>/SKILL.md` |
49
103
 
50
- - **Code Review** - Comprehensive code review following best practices
51
- - **Test Generator** - Generate unit and integration tests
52
- - **Commit Message Generator** - Create conventional commit messages
104
+ Use `--global` to install to user-level directories instead.
53
105
 
54
- ## Project Structure
106
+ ## Skill Structure
107
+
108
+ Every skill follows a unified structure. See [SKILLS_STRUCTURE.md](SKILLS_STRUCTURE.md) for full documentation.
55
109
 
56
110
  ```
57
- ai-agent-skills/
58
- ├── bin/
59
- │ └── cli.js # CLI entry point
60
- ├── lib/
61
- ├── agents.js # Agent configurations
62
- │ └── installer.js # Installation logic
63
- ├── skills/
64
- ├── code-review/
65
- │ │ ├── skill.json # Skill metadata
66
- │ │ ├── claude-code.md # Claude Code template
67
- │ │ ├── generic.md # Generic template
68
- │ │ └── cline.md # Cline-specific template
69
- │ ├── test-generator/
70
- │ │ ├── skill.json
71
- │ │ └── ...
72
- │ └── commit-message/
73
- │ ├── skill.json
74
- │ └── generic.md
75
- ├── package.json
76
- └── README.md
111
+ skills/<skill-name>/
112
+ ├── skill.json # Metadata — single source of truth (required)
113
+ ├── SKILL.md # Main instructions in pure Markdown (required)
114
+ ├── claude-code.md # Claude Code-specific template (optional)
115
+ ├── cline.md # Cline-specific template (optional)
116
+ ├── generic.md # Generic template for other agents (optional)
117
+ ├── template.md # Output template for the agent (optional)
118
+ ├── scripts/ # Executable scripts (optional)
119
+ ├── references/ # Documentation and reference material (optional)
120
+ ├── examples/ # Sample outputs (optional)
121
+ ├── hooks/ # Git hooks or other hook scripts (optional)
122
+ └── assets/ # Config files, templates, resources (optional)
77
123
  ```
78
124
 
79
- ## How to Add a New Skill
125
+ ### Key Design Decisions
80
126
 
81
- Adding a new skill is straightforward. Follow these steps:
127
+ - **`skill.json` is the single source of truth** for metadata (`name`, `description`). YAML frontmatter is injected automatically at install time — you never write it in source files.
128
+ - **Template priority**: The installer looks for `<agent-template>.md` first (e.g., `claude-code.md`), then `generic.md`, then falls back to `SKILL.md`.
129
+ - **Resource mapping**: Some agents use different directory names. For example, Cline expects `docs/` instead of `references/` and `templates/` instead of `assets/`. The installer handles this mapping automatically.
82
130
 
83
- ### 1. Create Skill Directory
131
+ ## Creating a New Skill
84
132
 
85
- Create a new directory under `skills/` with your skill name (use kebab-case):
133
+ ### 1. Create the skill directory
86
134
 
87
135
  ```bash
88
- mkdir skills/my-awesome-skill
136
+ mkdir -p skills/my-skill
89
137
  ```
90
138
 
91
- ### 2. Create Skill Metadata
92
-
93
- Create a `skill.json` file in your skill directory:
139
+ ### 2. Create `skill.json`
94
140
 
95
141
  ```json
96
142
  {
97
- "name": "My Awesome Skill",
98
- "description": "Brief description of what this skill does",
143
+ "name": "My Skill",
144
+ "description": "What this skill does in one sentence",
99
145
  "version": "1.0.0",
100
146
  "author": "Your Name",
101
- "tags": ["tag1", "tag2", "tag3"]
147
+ "tags": ["category", "keywords"]
102
148
  }
103
149
  ```
104
150
 
105
- **Fields:**
106
- - `name`: Display name for the skill
107
- - `description`: Short description (shown in skill list)
108
- - `version`: Semantic version number
109
- - `author`: Your name or organization
110
- - `tags`: Array of tags for categorization
111
-
112
- ### 3. Create Skill Templates
151
+ ### 3. Create `SKILL.md`
113
152
 
114
- Create at least one template file. You can create:
115
-
116
- #### Generic Template (recommended)
117
- `generic.md` - Works for all agents
153
+ Write pure Markdown instructions. Do **not** add YAML frontmatter — the installer injects it from `skill.json`.
118
154
 
119
155
  ```markdown
120
- # My Awesome Skill
156
+ # My Skill
121
157
 
122
- Brief description of the skill.
158
+ ## Purpose
159
+ What problem this skill solves.
123
160
 
124
161
  ## Instructions
162
+ Step-by-step instructions for the agent.
125
163
 
126
- Step-by-step instructions for the AI agent...
127
-
128
- ## Examples
129
-
130
- Example interactions...
131
- ```
132
-
133
- #### Agent-Specific Templates (optional)
134
- Create specialized templates for specific agents:
135
-
136
- - `claude-code.md` - Claude Code specific
137
- - `cline.md` - Cline specific
138
- - `generic.md` - Fallback for all other agents
139
-
140
- **Template Naming Convention:**
141
- - Use the agent's `template` field from [lib/agents.js](lib/agents.js)
142
- - Add the agent's `fileExtension` (usually `.md`)
143
-
144
- ### 4. Template Content Guidelines
145
-
146
- Your skill template should include:
147
-
148
- ```markdown
149
- # Skill Name
150
-
151
- ## Description
152
- Clear explanation of what the skill does
164
+ ## Rules
165
+ Constraints the agent must follow.
153
166
 
154
- ## Usage
155
- How to invoke or use this skill
156
-
157
- ## Instructions
158
- Detailed instructions for the AI agent:
159
- 1. Step 1
160
- 2. Step 2
161
- 3. ...
162
-
163
- ## Examples
164
- Example interactions showing:
165
- - User input
166
- - Expected AI behavior
167
-
168
- ## Output Format (if applicable)
169
- Template or structure for the AI's output
167
+ ## Output Format
168
+ What the agent should produce.
170
169
  ```
171
170
 
172
- ### 5. Test Your Skill
173
-
174
- After creating your skill, test it:
171
+ ### 4. Add optional resources
175
172
 
176
173
  ```bash
177
- npx ai-agent-skills
178
- # Select "List available skills" to verify it appears
179
- # Then install it to test
174
+ mkdir -p skills/my-skill/scripts # Executable scripts
175
+ mkdir -p skills/my-skill/references # Documentation
176
+ mkdir -p skills/my-skill/examples # Sample outputs
180
177
  ```
181
178
 
182
- ### Example: Creating a "Documentation Generator" Skill
179
+ ### 5. (Optional) Create agent-specific templates
183
180
 
184
- ```bash
185
- # 1. Create directory
186
- mkdir skills/doc-generator
181
+ If a skill needs different instructions for different agents:
187
182
 
188
- # 2. Create skill.json
189
- cat > skills/doc-generator/skill.json << 'EOF'
190
- {
191
- "name": "Documentation Generator",
192
- "description": "Generate comprehensive documentation for code",
193
- "version": "1.0.0",
194
- "author": "AI Agent Skills",
195
- "tags": ["documentation", "docs", "jsdoc"]
196
- }
197
- EOF
198
-
199
- # 3. Create template
200
- cat > skills/doc-generator/generic.md << 'EOF'
201
- # Documentation Generator
202
-
203
- Generate comprehensive documentation for code including API docs, JSDoc, docstrings, etc.
204
-
205
- ## Instructions
206
-
207
- 1. Analyze the code structure
208
- 2. Identify public APIs, functions, classes
209
- 3. Generate documentation following the language's convention:
210
- - JavaScript/TypeScript: JSDoc
211
- - Python: Docstrings (Google/NumPy style)
212
- - Java: JavaDoc
213
- - C#: XML documentation
214
- 4. Include parameters, return types, examples
215
- 5. Add usage examples where helpful
216
-
217
- ## Output Format
218
-
219
- Include:
220
- - Function/method description
221
- - Parameters with types
222
- - Return value with type
223
- - Examples (if complex)
224
- - Exceptions/errors thrown
183
+ ```bash
184
+ # Claude Code gets tailored instructions
185
+ skills/my-skill/claude-code.md
225
186
 
226
- ## Example
187
+ # Cline gets its own version
188
+ skills/my-skill/cline.md
227
189
 
228
- ```javascript
229
- /**
230
- * Calculates the sum of two numbers
231
- * @param {number} a - The first number
232
- * @param {number} b - The second number
233
- * @returns {number} The sum of a and b
234
- * @example
235
- * add(2, 3) // returns 5
236
- */
237
- function add(a, b) {
238
- return a + b;
239
- }
240
- ```
241
- EOF
190
+ # All other agents use SKILL.md
242
191
  ```
243
192
 
244
- ## How to Add a New Agent
245
-
246
- Adding support for a new AI agent is simple. Follow these steps:
247
-
248
- ### 1. Open Agent Configuration
193
+ ### 6. Test
249
194
 
250
- Edit [lib/agents.js](lib/agents.js)
195
+ ```bash
196
+ npx ma-agents list # Verify it appears
197
+ npx ma-agents install my-skill claude-code # Test installation
198
+ ```
251
199
 
252
- ### 2. Add Agent Object
200
+ ## Adding a New Agent
253
201
 
254
- Add a new agent object to the `agents` array:
202
+ Edit [lib/agents.js](lib/agents.js) and add a new entry to the `agents` array:
255
203
 
256
204
  ```javascript
257
205
  {
258
206
  id: 'my-agent',
259
207
  name: 'My Agent',
260
- description: 'Brief description of the agent',
261
- getSkillsPath: () => {
208
+ description: 'My Agent Description',
209
+ getProjectPath: () => path.join(process.cwd(), '.my-agent', 'skills'),
210
+ getGlobalPath: () => {
262
211
  const platform = os.platform();
263
212
  if (platform === 'win32') {
264
213
  return path.join(os.homedir(), 'AppData', 'Roaming', 'MyAgent', 'skills');
@@ -269,152 +218,95 @@ Add a new agent object to the `agents` array:
269
218
  }
270
219
  },
271
220
  fileExtension: '.md',
272
- template: 'my-agent'
221
+ template: 'generic',
222
+ // Optional: rename resource directories to match agent's native structure
223
+ resourceMap: {
224
+ 'references': 'docs',
225
+ 'assets': 'templates'
226
+ }
273
227
  }
274
228
  ```
275
229
 
276
- ### 3. Agent Configuration Fields
277
-
278
- **Required Fields:**
279
-
280
- - `id` (string): Unique identifier (kebab-case)
281
- - Used internally and in CLI selection
282
- - Example: `'claude-code'`, `'my-agent'`
283
-
284
- - `name` (string): Display name
285
- - Shown to users in the interactive menu
286
- - Example: `'Claude Code'`, `'My Agent'`
287
-
288
- - `description` (string): Brief description
289
- - Helps users identify the agent
290
- - Example: `'Anthropic Claude Code CLI'`
291
-
292
- - `getSkillsPath` (function): Returns the default skills directory path
293
- - Must handle Windows, macOS, and Linux
294
- - Returns absolute path to where skills should be installed
295
- - Platform-specific paths:
296
- - **Windows**: `AppData/Roaming/[Agent]/skills`
297
- - **macOS**: `Library/Application Support/[Agent]/skills`
298
- - **Linux**: `.config/[agent]/skills`
299
-
300
- - `fileExtension` (string): File extension for skill files
301
- - Usually `'.md'` for markdown
302
- - Could be `'.txt'`, `'.json'`, etc. depending on agent
303
-
304
- - `template` (string): Template identifier
305
- - Used to find agent-specific skill templates
306
- - Should match template filename (e.g., `'my-agent'` → `my-agent.md`)
307
- - Falls back to `'generic'` if template doesn't exist
308
-
309
- ### 4. Finding the Skills Directory
230
+ ### Agent Configuration Fields
310
231
 
311
- To find where your agent stores skills:
232
+ | Field | Required | Description |
233
+ |-------|----------|-------------|
234
+ | `id` | Yes | Unique kebab-case identifier (used in CLI) |
235
+ | `name` | Yes | Display name shown to users |
236
+ | `description` | Yes | Brief description |
237
+ | `getProjectPath` | Yes | Returns project-level skills directory |
238
+ | `getGlobalPath` | Yes | Returns global/user-level skills directory (platform-specific) |
239
+ | `fileExtension` | Yes | File extension for skill files (usually `.md`) |
240
+ | `template` | Yes | Template ID — determines which `.md` file to look for first |
241
+ | `resourceMap` | No | Maps generic directory names to agent-specific names |
312
242
 
313
- 1. **Check agent documentation** - Look for skills, plugins, or extensions directory
314
- 2. **Check agent config** - Look in the agent's settings/configuration file
315
- 3. **Common locations:**
316
- - Windows: `%APPDATA%` or `%LOCALAPPDATA%`
317
- - macOS: `~/Library/Application Support/`
318
- - Linux: `~/.config/` or `~/.local/share/`
319
-
320
- ### 5. Test Your Agent
321
-
322
- After adding the agent configuration:
323
-
324
- ```bash
325
- npx ai-agent-skills
326
- # Select "List supported agents"
327
- # Verify your agent appears
328
- # Try installing a skill to your new agent
329
- ```
330
-
331
- ### Example: Adding "Windsurf" Agent
332
-
333
- ```javascript
334
- {
335
- id: 'windsurf',
336
- name: 'Windsurf',
337
- description: 'Windsurf AI Code Editor',
338
- getSkillsPath: () => {
339
- const platform = os.platform();
340
- if (platform === 'win32') {
341
- return path.join(os.homedir(), 'AppData', 'Roaming', 'Windsurf', 'skills');
342
- } else if (platform === 'darwin') {
343
- return path.join(os.homedir(), 'Library', 'Application Support', 'Windsurf', 'skills');
344
- } else {
345
- return path.join(os.homedir(), '.config', 'windsurf', 'skills');
346
- }
347
- },
348
- fileExtension: '.md',
349
- template: 'generic' // Use generic template
350
- }
351
- ```
352
-
353
- ## Advanced: Agent-Specific Templates
354
-
355
- If your agent has unique requirements, create agent-specific templates:
356
-
357
- 1. Set `template: 'my-agent'` in agent configuration
358
- 2. Create `my-agent.md` files in skill directories
359
- 3. The installer will use agent-specific templates when available
360
- 4. Falls back to `generic.md` if agent-specific template doesn't exist
361
-
362
- **Example:** Claude Code might need specific formatting:
243
+ ## Project Structure
363
244
 
364
245
  ```
365
- skills/code-review/
366
- ├── skill.json
367
- ├── claude-code.md # Claude-specific format
368
- ├── cline.md # Cline-specific format
369
- └── generic.md # Works for all others
246
+ ma-agents/
247
+ ├── bin/
248
+ │ └── cli.js # CLI entry point (wizard + commands)
249
+ ├── lib/
250
+ │ ├── agents.js # Agent configurations and paths
251
+ │ └── installer.js # Skill discovery, frontmatter injection, installation
252
+ ├── skills/
253
+ │ ├── code-review/ # 9 bundled skills
254
+ │ ├── commit-message/
255
+ │ ├── create-hardened-docker-skill/
256
+ │ ├── git-workflow-skill/
257
+ │ ├── js-ts-security-skill/
258
+ │ ├── skill-creator/
259
+ │ ├── test-generator/
260
+ │ ├── vercel-react-best-practices/
261
+ │ └── verify-hardened-docker-skill/
262
+ ├── SKILLS_STRUCTURE.md # Full skill authoring documentation
263
+ ├── package.json
264
+ └── README.md
370
265
  ```
371
266
 
372
267
  ## Development
373
268
 
374
- ### Setup
375
-
376
269
  ```bash
377
270
  # Clone the repository
378
- git clone <your-repo-url>
379
- cd ai-agent-skills
271
+ git clone https://github.com/mayafit/AI_Agents.git
272
+ cd AI_Agents
380
273
 
381
274
  # Install dependencies
382
275
  npm install
383
276
 
384
- # Test locally
277
+ # Run locally
385
278
  node bin/cli.js
279
+
280
+ # Test skill listing
281
+ node bin/cli.js list
282
+
283
+ # Test agents listing
284
+ node bin/cli.js agents
386
285
  ```
387
286
 
388
- ### Publishing
287
+ ## Programmatic API
389
288
 
390
- To publish to NPM:
289
+ ```javascript
290
+ const { installSkill, listSkills, listAgents } = require('ma-agents');
391
291
 
392
- ```bash
393
- # Login to NPM
394
- npm login
292
+ // List all available skills
293
+ const skills = listSkills();
395
294
 
396
- # Publish
397
- npm publish
398
- ```
295
+ // List all supported agents
296
+ const agents = listAgents();
399
297
 
400
- After publishing, users can run:
401
- ```bash
402
- npx ai-agent-skills
298
+ // Install a skill programmatically
299
+ await installSkill('code-review', ['claude-code', 'copilot'], '', 'project');
403
300
  ```
404
301
 
405
302
  ## Contributing
406
303
 
407
- Contributions are welcome! Please feel free to submit:
304
+ Contributions welcome:
408
305
 
409
- - New skills
410
- - Support for additional agents
411
- - Bug fixes
412
- - Documentation improvements
306
+ - **New skills** — Follow the structure in [SKILLS_STRUCTURE.md](SKILLS_STRUCTURE.md)
307
+ - **New agents** Add to [lib/agents.js](lib/agents.js) with both project and global paths
308
+ - **Bug fixes** and improvements
413
309
 
414
310
  ## License
415
311
 
416
312
  MIT
417
-
418
- ## Support
419
-
420
- For issues or questions, please open an issue on the GitHub repository.