ma-agents 1.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.
- package/CONTRIBUTING.md +96 -0
- package/LICENSE +20 -0
- package/QUICK_START.md +148 -0
- package/README.md +420 -0
- package/bin/cli.js +198 -0
- package/examples/programmatic-usage.js +62 -0
- package/index.js +20 -0
- package/lib/agents.js +131 -0
- package/lib/installer.js +120 -0
- package/package.json +35 -0
- package/skills/README.md +312 -0
- package/skills/code-review/claude-code.md +64 -0
- package/skills/code-review/cline.md +55 -0
- package/skills/code-review/generic.md +39 -0
- package/skills/code-review/skill.json +7 -0
- package/skills/commit-message/generic.md +75 -0
- package/skills/commit-message/skill.json +7 -0
- package/skills/create-hardened-docker-skill/README.md +85 -0
- package/skills/create-hardened-docker-skill/SKILL.md +638 -0
- package/skills/create-hardened-docker-skill/scripts/create-all.sh +489 -0
- package/skills/create-hardened-docker-skill/skill.json +7 -0
- package/skills/git-workflow-skill/README.md +135 -0
- package/skills/git-workflow-skill/SKILL.md +182 -0
- package/skills/git-workflow-skill/hooks/commit-msg +61 -0
- package/skills/git-workflow-skill/hooks/pre-commit +38 -0
- package/skills/git-workflow-skill/hooks/prepare-commit-msg +56 -0
- package/skills/git-workflow-skill/scripts/finish-feature.sh +192 -0
- package/skills/git-workflow-skill/scripts/install-hooks.sh +55 -0
- package/skills/git-workflow-skill/scripts/start-feature.sh +110 -0
- package/skills/git-workflow-skill/scripts/validate-workflow.sh +229 -0
- package/skills/git-workflow-skill/skill.json +7 -0
- package/skills/js-ts-security-skill/README.md +28 -0
- package/skills/js-ts-security-skill/SKILL.md +64 -0
- package/skills/js-ts-security-skill/scripts/verify-security.sh +136 -0
- package/skills/js-ts-security-skill/skill.json +7 -0
- package/skills/skill-creator/claude-code.md +66 -0
- package/skills/skill-creator/generic.md +197 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +208 -0
- package/skills/skill-creator/scripts/package_skill.py +99 -0
- package/skills/skill-creator/scripts/quick_validate.py +113 -0
- package/skills/skill-creator/skill.json +8 -0
- package/skills/test-generator/claude-code.md +103 -0
- package/skills/test-generator/cline.md +69 -0
- package/skills/test-generator/generic.md +61 -0
- package/skills/test-generator/skill.json +7 -0
- package/skills/vercel-react-best-practices/claude-code.md +80 -0
- package/skills/vercel-react-best-practices/generic.md +105 -0
- package/skills/vercel-react-best-practices/skill.json +8 -0
- package/skills/verify-hardened-docker-skill/README.md +85 -0
- package/skills/verify-hardened-docker-skill/SKILL.md +443 -0
- package/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +439 -0
- package/skills/verify-hardened-docker-skill/skill.json +7 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Contributing to AI Agent Skills
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
|
|
4
|
+
|
|
5
|
+
## Ways to Contribute
|
|
6
|
+
|
|
7
|
+
1. **Add New Skills** - Create useful skills for AI agents
|
|
8
|
+
2. **Add Agent Support** - Add support for new AI coding agents
|
|
9
|
+
3. **Improve Documentation** - Enhance README and guides
|
|
10
|
+
4. **Fix Bugs** - Report and fix issues
|
|
11
|
+
5. **Suggest Features** - Propose new features
|
|
12
|
+
|
|
13
|
+
## Getting Started
|
|
14
|
+
|
|
15
|
+
### Setup Development Environment
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Clone the repository
|
|
19
|
+
git clone <repository-url>
|
|
20
|
+
cd ai-agent-skills
|
|
21
|
+
|
|
22
|
+
# Install dependencies
|
|
23
|
+
npm install
|
|
24
|
+
|
|
25
|
+
# Test the CLI
|
|
26
|
+
node bin/cli.js
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Adding a New Skill
|
|
30
|
+
|
|
31
|
+
1. Create a directory in `skills/` with your skill name (kebab-case)
|
|
32
|
+
2. Add `skill.json` with metadata
|
|
33
|
+
3. Create at least `generic.md` template
|
|
34
|
+
4. Optionally create agent-specific templates
|
|
35
|
+
5. Test your skill with multiple agents
|
|
36
|
+
|
|
37
|
+
See [README.md](README.md#how-to-add-a-new-skill) for detailed instructions.
|
|
38
|
+
|
|
39
|
+
## Adding a New Agent
|
|
40
|
+
|
|
41
|
+
1. Edit `lib/agents.js`
|
|
42
|
+
2. Add your agent configuration to the `agents` array
|
|
43
|
+
3. Test installation with existing skills
|
|
44
|
+
|
|
45
|
+
See [README.md](README.md#how-to-add-a-new-agent) for detailed instructions.
|
|
46
|
+
|
|
47
|
+
## Code Style
|
|
48
|
+
|
|
49
|
+
- Use 2 spaces for indentation
|
|
50
|
+
- Follow existing code structure
|
|
51
|
+
- Add comments for complex logic
|
|
52
|
+
- Keep functions focused and small
|
|
53
|
+
|
|
54
|
+
## Testing
|
|
55
|
+
|
|
56
|
+
Before submitting:
|
|
57
|
+
|
|
58
|
+
1. Test the CLI works: `node bin/cli.js`
|
|
59
|
+
2. Test skill installation for multiple agents
|
|
60
|
+
3. Verify all paths work on your OS
|
|
61
|
+
4. Check that new skills appear in the list
|
|
62
|
+
|
|
63
|
+
## Submitting Changes
|
|
64
|
+
|
|
65
|
+
1. Fork the repository
|
|
66
|
+
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
67
|
+
3. Make your changes
|
|
68
|
+
4. Commit with clear messages: `git commit -m "feat: add new skill"`
|
|
69
|
+
5. Push to your fork: `git push origin feature/my-feature`
|
|
70
|
+
6. Open a Pull Request
|
|
71
|
+
|
|
72
|
+
## Pull Request Guidelines
|
|
73
|
+
|
|
74
|
+
- Provide clear description of changes
|
|
75
|
+
- Reference any related issues
|
|
76
|
+
- Include testing steps
|
|
77
|
+
- Update documentation if needed
|
|
78
|
+
|
|
79
|
+
## Skill Quality Guidelines
|
|
80
|
+
|
|
81
|
+
When contributing skills:
|
|
82
|
+
|
|
83
|
+
- **Clear Instructions**: Provide step-by-step guidance for the AI
|
|
84
|
+
- **Good Examples**: Include example interactions
|
|
85
|
+
- **Appropriate Scope**: Skill should have a focused purpose
|
|
86
|
+
- **Well-Documented**: Include usage instructions
|
|
87
|
+
- **Tested**: Verify it works with at least one agent
|
|
88
|
+
|
|
89
|
+
## Questions?
|
|
90
|
+
|
|
91
|
+
Feel free to open an issue for:
|
|
92
|
+
- Questions about contributing
|
|
93
|
+
- Clarification on guidelines
|
|
94
|
+
- Feature discussions
|
|
95
|
+
|
|
96
|
+
Thank you for contributing!
|
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AI Agent Skills
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/QUICK_START.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get started with AI Agent Skills in 2 minutes!
|
|
4
|
+
|
|
5
|
+
## Installation (Users)
|
|
6
|
+
|
|
7
|
+
No installation needed! Just run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx ai-agent-skills
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Using the CLI
|
|
14
|
+
|
|
15
|
+
1. **Run the tool:**
|
|
16
|
+
```bash
|
|
17
|
+
npx ai-agent-skills
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. **Select "Install a skill"**
|
|
21
|
+
|
|
22
|
+
3. **Choose a skill:**
|
|
23
|
+
- Code Review
|
|
24
|
+
- Test Generator
|
|
25
|
+
- Commit Message Generator
|
|
26
|
+
|
|
27
|
+
4. **Select your AI agents:**
|
|
28
|
+
- Claude Code
|
|
29
|
+
- Gemini
|
|
30
|
+
- Copilot
|
|
31
|
+
- Kilocode
|
|
32
|
+
- Cline
|
|
33
|
+
- Cursor
|
|
34
|
+
|
|
35
|
+
5. **Choose installation path:**
|
|
36
|
+
- Press Enter for default path
|
|
37
|
+
- Or type a custom path
|
|
38
|
+
|
|
39
|
+
6. **Done!** The skill is now available in your selected agents.
|
|
40
|
+
|
|
41
|
+
## Quick Examples
|
|
42
|
+
|
|
43
|
+
### List all available skills
|
|
44
|
+
```bash
|
|
45
|
+
npx ai-agent-skills
|
|
46
|
+
# Select: List available skills
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### List supported agents
|
|
50
|
+
```bash
|
|
51
|
+
npx ai-agent-skills
|
|
52
|
+
# Select: List supported agents
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Install a skill
|
|
56
|
+
```bash
|
|
57
|
+
npx ai-agent-skills
|
|
58
|
+
# Select: Install a skill
|
|
59
|
+
# Choose: code-review
|
|
60
|
+
# Select agents: claude-code, cline
|
|
61
|
+
# Path: (press Enter for default)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Using Installed Skills
|
|
65
|
+
|
|
66
|
+
After installation, use the skills in your AI agent:
|
|
67
|
+
|
|
68
|
+
**Claude Code:**
|
|
69
|
+
```bash
|
|
70
|
+
claude-code
|
|
71
|
+
> /code-review
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Other Agents:**
|
|
75
|
+
Check your agent's documentation for how to invoke custom skills or prompts.
|
|
76
|
+
|
|
77
|
+
## Development Quick Start
|
|
78
|
+
|
|
79
|
+
Want to add your own skills or agents?
|
|
80
|
+
|
|
81
|
+
### Add a Skill (5 minutes)
|
|
82
|
+
|
|
83
|
+
1. Create directory:
|
|
84
|
+
```bash
|
|
85
|
+
mkdir skills/my-skill
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
2. Create `skill.json`:
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"name": "My Skill",
|
|
92
|
+
"description": "What it does",
|
|
93
|
+
"version": "1.0.0",
|
|
94
|
+
"author": "You",
|
|
95
|
+
"tags": ["tag1"]
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
3. Create `generic.md`:
|
|
100
|
+
```markdown
|
|
101
|
+
# My Skill
|
|
102
|
+
|
|
103
|
+
Instructions for the AI agent...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
4. Test it:
|
|
107
|
+
```bash
|
|
108
|
+
node bin/cli.js
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Add an Agent (3 minutes)
|
|
112
|
+
|
|
113
|
+
1. Edit `lib/agents.js`
|
|
114
|
+
|
|
115
|
+
2. Add to `agents` array:
|
|
116
|
+
```javascript
|
|
117
|
+
{
|
|
118
|
+
id: 'my-agent',
|
|
119
|
+
name: 'My Agent',
|
|
120
|
+
description: 'My AI Agent',
|
|
121
|
+
getSkillsPath: () => {
|
|
122
|
+
// Return path based on OS
|
|
123
|
+
},
|
|
124
|
+
fileExtension: '.md',
|
|
125
|
+
template: 'generic'
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
3. Test it:
|
|
130
|
+
```bash
|
|
131
|
+
node bin/cli.js
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Need Help?
|
|
135
|
+
|
|
136
|
+
- Read the full [README.md](README.md)
|
|
137
|
+
- Check [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
138
|
+
- See [examples/](examples/) for code examples
|
|
139
|
+
- Open an issue on GitHub
|
|
140
|
+
|
|
141
|
+
## What's Next?
|
|
142
|
+
|
|
143
|
+
- Browse existing skills in `skills/`
|
|
144
|
+
- Read detailed guides in [README.md](README.md)
|
|
145
|
+
- Contribute your own skills!
|
|
146
|
+
- Add support for your favorite AI agent
|
|
147
|
+
|
|
148
|
+
Happy coding with AI agents! 🤖
|
package/README.md
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# AI Agent Skills
|
|
2
|
+
|
|
3
|
+
A universal NPX tool to install skills for AI coding agents including Claude Code, Gemini, Copilot, Kilocode, Cline, and Cursor.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
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
|
|
12
|
+
|
|
13
|
+
## Supported Agents
|
|
14
|
+
|
|
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
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
No installation required! Use directly with NPX:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx ai-agent-skills
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
### Interactive Mode
|
|
33
|
+
|
|
34
|
+
Simply run the command and follow the prompts:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx ai-agent-skills
|
|
38
|
+
```
|
|
39
|
+
|
|
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)
|
|
45
|
+
|
|
46
|
+
### Available Skills
|
|
47
|
+
|
|
48
|
+
The package comes with example skills:
|
|
49
|
+
|
|
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
|
|
53
|
+
|
|
54
|
+
## Project Structure
|
|
55
|
+
|
|
56
|
+
```
|
|
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
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## How to Add a New Skill
|
|
80
|
+
|
|
81
|
+
Adding a new skill is straightforward. Follow these steps:
|
|
82
|
+
|
|
83
|
+
### 1. Create Skill Directory
|
|
84
|
+
|
|
85
|
+
Create a new directory under `skills/` with your skill name (use kebab-case):
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
mkdir skills/my-awesome-skill
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 2. Create Skill Metadata
|
|
92
|
+
|
|
93
|
+
Create a `skill.json` file in your skill directory:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"name": "My Awesome Skill",
|
|
98
|
+
"description": "Brief description of what this skill does",
|
|
99
|
+
"version": "1.0.0",
|
|
100
|
+
"author": "Your Name",
|
|
101
|
+
"tags": ["tag1", "tag2", "tag3"]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
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
|
|
113
|
+
|
|
114
|
+
Create at least one template file. You can create:
|
|
115
|
+
|
|
116
|
+
#### Generic Template (recommended)
|
|
117
|
+
`generic.md` - Works for all agents
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
# My Awesome Skill
|
|
121
|
+
|
|
122
|
+
Brief description of the skill.
|
|
123
|
+
|
|
124
|
+
## Instructions
|
|
125
|
+
|
|
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
|
|
153
|
+
|
|
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
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 5. Test Your Skill
|
|
173
|
+
|
|
174
|
+
After creating your skill, test it:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
npx ai-agent-skills
|
|
178
|
+
# Select "List available skills" to verify it appears
|
|
179
|
+
# Then install it to test
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Example: Creating a "Documentation Generator" Skill
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# 1. Create directory
|
|
186
|
+
mkdir skills/doc-generator
|
|
187
|
+
|
|
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
|
|
225
|
+
|
|
226
|
+
## Example
|
|
227
|
+
|
|
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
|
|
242
|
+
```
|
|
243
|
+
|
|
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
|
|
249
|
+
|
|
250
|
+
Edit [lib/agents.js](lib/agents.js)
|
|
251
|
+
|
|
252
|
+
### 2. Add Agent Object
|
|
253
|
+
|
|
254
|
+
Add a new agent object to the `agents` array:
|
|
255
|
+
|
|
256
|
+
```javascript
|
|
257
|
+
{
|
|
258
|
+
id: 'my-agent',
|
|
259
|
+
name: 'My Agent',
|
|
260
|
+
description: 'Brief description of the agent',
|
|
261
|
+
getSkillsPath: () => {
|
|
262
|
+
const platform = os.platform();
|
|
263
|
+
if (platform === 'win32') {
|
|
264
|
+
return path.join(os.homedir(), 'AppData', 'Roaming', 'MyAgent', 'skills');
|
|
265
|
+
} else if (platform === 'darwin') {
|
|
266
|
+
return path.join(os.homedir(), 'Library', 'Application Support', 'MyAgent', 'skills');
|
|
267
|
+
} else {
|
|
268
|
+
return path.join(os.homedir(), '.config', 'my-agent', 'skills');
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
fileExtension: '.md',
|
|
272
|
+
template: 'my-agent'
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
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
|
|
310
|
+
|
|
311
|
+
To find where your agent stores skills:
|
|
312
|
+
|
|
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:
|
|
363
|
+
|
|
364
|
+
```
|
|
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
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Development
|
|
373
|
+
|
|
374
|
+
### Setup
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
# Clone the repository
|
|
378
|
+
git clone <your-repo-url>
|
|
379
|
+
cd ai-agent-skills
|
|
380
|
+
|
|
381
|
+
# Install dependencies
|
|
382
|
+
npm install
|
|
383
|
+
|
|
384
|
+
# Test locally
|
|
385
|
+
node bin/cli.js
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Publishing
|
|
389
|
+
|
|
390
|
+
To publish to NPM:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
# Login to NPM
|
|
394
|
+
npm login
|
|
395
|
+
|
|
396
|
+
# Publish
|
|
397
|
+
npm publish
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
After publishing, users can run:
|
|
401
|
+
```bash
|
|
402
|
+
npx ai-agent-skills
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
## Contributing
|
|
406
|
+
|
|
407
|
+
Contributions are welcome! Please feel free to submit:
|
|
408
|
+
|
|
409
|
+
- New skills
|
|
410
|
+
- Support for additional agents
|
|
411
|
+
- Bug fixes
|
|
412
|
+
- Documentation improvements
|
|
413
|
+
|
|
414
|
+
## License
|
|
415
|
+
|
|
416
|
+
MIT
|
|
417
|
+
|
|
418
|
+
## Support
|
|
419
|
+
|
|
420
|
+
For issues or questions, please open an issue on the GitHub repository.
|