@empjs/skill 1.0.5
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 +255 -0
- package/bin/eskill.mjs +2 -0
- package/dist/index.cjs +1063 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1036 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# @empjs/skill
|
|
2
|
+
|
|
3
|
+
Unified CLI tool for managing AI agent skills across Claude Code, Cursor, Windsurf, and more.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ✅ **Unified Storage**: All skills stored in `~/.emp-agent/skills/`
|
|
8
|
+
- ✅ **Multi-Agent Support**: Auto-detect and link to Claude Code, Cursor, Windsurf, Cline, Gemini, Copilot
|
|
9
|
+
- ✅ **Symlink Distribution**: Skills symlinked to each AI agent's directory
|
|
10
|
+
- ✅ **Dev Mode**: Local development with instant updates
|
|
11
|
+
- ✅ **NPM Integration**: Install from public NPM registry or Git URL
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install CLI globally (choose your package manager)
|
|
17
|
+
|
|
18
|
+
# Using pnpm (recommended)
|
|
19
|
+
pnpm add -g @empjs/skill
|
|
20
|
+
|
|
21
|
+
# Using npm
|
|
22
|
+
npm install -g @empjs/skill
|
|
23
|
+
|
|
24
|
+
# Using yarn
|
|
25
|
+
yarn global add @empjs/skill
|
|
26
|
+
|
|
27
|
+
# Using bun
|
|
28
|
+
bun install -g @empjs/skill
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Install a Skill
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Install from NPM (auto-detect all agents)
|
|
37
|
+
eskill install <skill-name>
|
|
38
|
+
|
|
39
|
+
# Install from Git URL
|
|
40
|
+
eskill install https://github.com/owner/repo/tree/main/path
|
|
41
|
+
|
|
42
|
+
# Install for specific agent
|
|
43
|
+
eskill install <skill-name> --agent claude
|
|
44
|
+
eskill install <skill-name> --agent cursor
|
|
45
|
+
|
|
46
|
+
# Force reinstall
|
|
47
|
+
eskill install <skill-name> --force
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Dev Mode (Local Development)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Link from local directory (for skill developers)
|
|
54
|
+
cd path/to/your-skill
|
|
55
|
+
eskill install . --link
|
|
56
|
+
|
|
57
|
+
# Changes to source files will reflect immediately!
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### List Installed Skills
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Show all installed skills
|
|
64
|
+
eskill list
|
|
65
|
+
|
|
66
|
+
# Output example:
|
|
67
|
+
# 📦 skill-name (v1.0.0)
|
|
68
|
+
# → Linked to: Claude Code, Cursor, Windsurf
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Supported AI Agents
|
|
72
|
+
|
|
73
|
+
The CLI automatically detects and links to:
|
|
74
|
+
|
|
75
|
+
- **Claude Code** - `~/.claude/skills/`
|
|
76
|
+
- **Cursor** - `~/.cursor/skills/`
|
|
77
|
+
- **Windsurf** - `~/.windsurf/skills/`
|
|
78
|
+
- **Cline** - `~/.cline/skills/`
|
|
79
|
+
- **Gemini Code** - `~/.gemini/skills/`
|
|
80
|
+
- **GitHub Copilot** - `~/.copilot/skills/`
|
|
81
|
+
|
|
82
|
+
## Directory Structure
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
~/.emp-agent/
|
|
86
|
+
├── skills/ # Unified storage
|
|
87
|
+
│ └── skill-name/ # Skill content
|
|
88
|
+
│ ├── SKILL.md
|
|
89
|
+
│ └── references/
|
|
90
|
+
├── config.json
|
|
91
|
+
└── cache/
|
|
92
|
+
|
|
93
|
+
# Symlinks to AI agents
|
|
94
|
+
~/.claude/skills/skill-name -> ~/.emp-agent/skills/skill-name
|
|
95
|
+
~/.cursor/skills/skill-name -> ~/.emp-agent/skills/skill-name
|
|
96
|
+
~/.windsurf/skills/skill-name -> ~/.emp-agent/skills/skill-name
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Options
|
|
100
|
+
|
|
101
|
+
### Install Options
|
|
102
|
+
|
|
103
|
+
- `-a, --agent <name>` - Install for specific agent (claude, cursor, windsurf, all)
|
|
104
|
+
- `-l, --link` - Dev mode: symlink from local directory
|
|
105
|
+
- `-f, --force` - Force reinstall if already exists
|
|
106
|
+
|
|
107
|
+
## Examples
|
|
108
|
+
|
|
109
|
+
### Team Member (First Time)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# 1. Install CLI (choose your package manager)
|
|
113
|
+
pnpm add -g @empjs/skill
|
|
114
|
+
# or
|
|
115
|
+
npm install -g @empjs/skill
|
|
116
|
+
# or
|
|
117
|
+
yarn global add @empjs/skill
|
|
118
|
+
# or
|
|
119
|
+
bun install -g @empjs/skill
|
|
120
|
+
|
|
121
|
+
# 2. Install skill
|
|
122
|
+
eskill install <skill-name>
|
|
123
|
+
|
|
124
|
+
# ✅ Auto-detects and links to all installed AI agents
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Skill Developer
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# 1. Navigate to skill package
|
|
131
|
+
cd path/to/your-skill
|
|
132
|
+
|
|
133
|
+
# 2. Link for development
|
|
134
|
+
eskill install . --link
|
|
135
|
+
|
|
136
|
+
# 3. Edit files - changes reflect immediately!
|
|
137
|
+
vim SKILL.md
|
|
138
|
+
|
|
139
|
+
# 4. Verify
|
|
140
|
+
eskill list
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Install for Specific Agent Only
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Only install to Cursor
|
|
147
|
+
eskill install <skill-name> --agent cursor
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Clone repo
|
|
154
|
+
git clone <repository-url>
|
|
155
|
+
cd emp-skill
|
|
156
|
+
|
|
157
|
+
# Install dependencies
|
|
158
|
+
pnpm install
|
|
159
|
+
|
|
160
|
+
# Build
|
|
161
|
+
pnpm build
|
|
162
|
+
|
|
163
|
+
# Test locally
|
|
164
|
+
node bin/eskill.mjs list
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Publishing
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Build
|
|
171
|
+
pnpm build
|
|
172
|
+
|
|
173
|
+
# Publish to NPM
|
|
174
|
+
pnpm publish
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Troubleshooting
|
|
178
|
+
|
|
179
|
+
### Permission Denied Error (EACCES)
|
|
180
|
+
|
|
181
|
+
If you encounter `EACCES: permission denied` when installing skills, this is because npm is trying to access system directories. Here are solutions:
|
|
182
|
+
|
|
183
|
+
#### Solution 1: Configure npm to use user directory (Recommended)
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# 1. Create npm global directory
|
|
187
|
+
mkdir -p ~/.npm-global
|
|
188
|
+
|
|
189
|
+
# 2. Configure npm
|
|
190
|
+
npm config set prefix '~/.npm-global'
|
|
191
|
+
|
|
192
|
+
# 3. Add to PATH (add to ~/.zshrc or ~/.bash_profile)
|
|
193
|
+
export PATH=~/.npm-global/bin:$PATH
|
|
194
|
+
|
|
195
|
+
# 4. Reload shell
|
|
196
|
+
source ~/.zshrc # or source ~/.bash_profile
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### Solution 2: Use NVM (Node Version Manager)
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Install NVM
|
|
203
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
|
204
|
+
|
|
205
|
+
# Reload shell
|
|
206
|
+
source ~/.zshrc
|
|
207
|
+
|
|
208
|
+
# Install Node.js (automatically handles npm paths)
|
|
209
|
+
nvm install --lts
|
|
210
|
+
nvm use --lts
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
#### Solution 3: Fix system directory permissions (Requires sudo)
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
sudo chown -R $(whoami) /usr/local/lib/node_modules
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Note:** System updates may reset these permissions.
|
|
220
|
+
|
|
221
|
+
### No agents detected
|
|
222
|
+
|
|
223
|
+
If you see "No AI agents detected", ensure you have at least one of the supported agents installed:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Check if directories exist
|
|
227
|
+
ls ~/.claude/skills # Claude Code
|
|
228
|
+
ls ~/.cursor/skills # Cursor
|
|
229
|
+
ls ~/.windsurf/skills # Windsurf
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Permission denied
|
|
233
|
+
|
|
234
|
+
If you get permission errors when creating symlinks:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# On macOS, grant Full Disk Access to Terminal
|
|
238
|
+
# System Preferences → Security & Privacy → Privacy → Full Disk Access
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Skill not updating
|
|
242
|
+
|
|
243
|
+
If using dev mode (`--link`) and changes aren't reflecting:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Verify symlink
|
|
247
|
+
ls -la ~/.emp-agent/skills/
|
|
248
|
+
ls -la ~/.claude/skills/
|
|
249
|
+
|
|
250
|
+
# Should show symlink arrows (->)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## License
|
|
254
|
+
|
|
255
|
+
MIT License - EMP Team
|
package/bin/eskill.mjs
ADDED