@votruongdanh/ai-agent-skills 1.0.0 → 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.
Files changed (3) hide show
  1. package/README.md +35 -9
  2. package/bin/cli.js +151 -34
  3. package/package.json +13 -5
package/README.md CHANGED
@@ -17,12 +17,20 @@ That's it! No need to clone repos or download files.
17
17
 
18
18
  ## šŸŽÆ Supported IDEs
19
19
 
20
- āœ… **Kiro** - Auto-detected
21
- āœ… **Cursor** - Auto-detected
22
- āœ… **Windsurf** - Auto-detected
23
- āœ… **Others** - Uses Kiro format
20
+ The CLI automatically detects your IDE and installs to the correct location:
24
21
 
25
- The CLI automatically detects your IDE and installs to the right location.
22
+ āœ… **Antigravity** - `.antigravity/` or `.ag/`
23
+ āœ… **Kiro** - `.kiro/`
24
+ āœ… **Cursor** - `.cursor/`
25
+ āœ… **Windsurf** - `.windsurf/`
26
+ āœ… **Continue** - `.continue/`
27
+ āœ… **Cody** - `.cody/`
28
+ āœ… **GitHub Copilot** - `.github/copilot/`
29
+ āœ… **Aider** - `.aider/`
30
+ āœ… **Tabnine** - `.tabnine/`
31
+ āœ… **Others** - Uses Kiro format (most compatible)
32
+
33
+ No configuration needed - just run the install command!
26
34
 
27
35
  ## šŸ“¦ 11 Professional Skills
28
36
 
@@ -64,11 +72,13 @@ npx @votruongdanh/ai-agent-skills global
64
72
 
65
73
  ## šŸ”§ How It Works
66
74
 
67
- 1. Run the npx command
68
- 2. CLI detects your IDE automatically
69
- 3. Skills installed to `.kiro/`, `.cursor/`, or `.windsurf/`
75
+ 1. Run `npx @votruongdanh/ai-agent-skills init`
76
+ 2. CLI automatically detects your IDE (Antigravity, Kiro, Cursor, etc.)
77
+ 3. Skills installed to the correct config folder
70
78
  4. Restart your IDE
71
- 5. Type `/` in chat to see skills
79
+ 5. Type `/` in chat to see available skills
80
+
81
+ Works with 9+ AI-powered IDEs out of the box!
72
82
 
73
83
  ## āš™ļø Customization
74
84
 
@@ -85,12 +95,24 @@ code .cursor/skills/create/SKILL.md
85
95
  code .windsurf/skills/create/SKILL.md
86
96
  ```
87
97
 
98
+ **Note:** Updates will overwrite skill files. To preserve customizations:
99
+ 1. Backup your modified skills before updating
100
+ 2. Or create custom skills with different names
101
+
88
102
  ## šŸ”„ Updates
89
103
 
104
+ The CLI automatically checks for updates and notifies you. To update:
105
+
90
106
  ```bash
91
107
  npx @votruongdanh/ai-agent-skills@latest init
92
108
  ```
93
109
 
110
+ **Smart Update Features:**
111
+ - āœ… Auto-detects installed version
112
+ - āœ… Shows version comparison
113
+ - āœ… Preserves your customizations (optional)
114
+ - āœ… Works across all supported IDEs
115
+
94
116
  ## šŸ“„ License
95
117
 
96
118
  MIT - Use freely in any project
@@ -104,6 +126,10 @@ GitHub: [@votruongdanh](https://github.com/votruongdanh)
104
126
 
105
127
  Issues and PRs welcome at [GitHub](https://github.com/votruongdanh/ai-agent-skills)
106
128
 
129
+ ## 🌟 Inspired By
130
+
131
+ This project is inspired by [Antigravity Kit](https://github.com/vudovn/antigravity-kit) - A collection of powerful AI development tools.
132
+
107
133
  ---
108
134
 
109
135
  Made with ā¤ļø for the AI developer community
package/bin/cli.js CHANGED
@@ -3,33 +3,105 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
+ const https = require('https');
6
7
 
7
8
  const command = process.argv[2];
9
+ const PACKAGE_NAME = '@votruongdanh/ai-agent-skills';
10
+ const CURRENT_VERSION = require('../package.json').version;
8
11
 
9
- // Detect IDE type
12
+ // Check for updates
13
+ function checkForUpdates(callback) {
14
+ https.get(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`, (res) => {
15
+ let data = '';
16
+ res.on('data', (chunk) => data += chunk);
17
+ res.on('end', () => {
18
+ try {
19
+ const latest = JSON.parse(data).version;
20
+ if (latest !== CURRENT_VERSION) {
21
+ console.log(`\nšŸ“¢ Update available: ${CURRENT_VERSION} → ${latest}`);
22
+ console.log(` Run: npx ${PACKAGE_NAME}@latest init\n`);
23
+ }
24
+ callback();
25
+ } catch (e) {
26
+ callback(); // Silent fail
27
+ }
28
+ });
29
+ }).on('error', () => callback()); // Silent fail
30
+ }
31
+
32
+ // Detect IDE type with expanded support
10
33
  function detectIDE() {
11
34
  const cwd = process.cwd();
35
+ const homeDir = os.homedir();
12
36
 
13
- // Check for Kiro
14
- if (fs.existsSync(path.join(cwd, '.kiro'))) return 'kiro';
15
-
16
- // Check for Cursor
17
- if (fs.existsSync(path.join(cwd, '.cursor'))) return 'cursor';
37
+ // IDE detection map - order matters (most specific first)
38
+ const ideChecks = [
39
+ { name: 'antigravity', paths: ['.antigravity', '.ag'] },
40
+ { name: 'kiro', paths: ['.kiro'] },
41
+ { name: 'cursor', paths: ['.cursor'] },
42
+ { name: 'windsurf', paths: ['.windsurf'] },
43
+ { name: 'continue', paths: ['.continue'] },
44
+ { name: 'cody', paths: ['.cody'] },
45
+ { name: 'copilot', paths: ['.github/copilot'] },
46
+ { name: 'aider', paths: ['.aider'] },
47
+ { name: 'tabnine', paths: ['.tabnine'] },
48
+ ];
18
49
 
19
- // Check for Windsurf
20
- if (fs.existsSync(path.join(cwd, '.windsurf'))) return 'windsurf';
50
+ // Check current directory first
51
+ for (const ide of ideChecks) {
52
+ for (const idePath of ide.paths) {
53
+ if (fs.existsSync(path.join(cwd, idePath))) {
54
+ return ide.name;
55
+ }
56
+ }
57
+ }
21
58
 
22
59
  // Check home directory for global configs
23
- const homeDir = os.homedir();
24
- if (fs.existsSync(path.join(homeDir, '.kiro'))) return 'kiro';
25
- if (fs.existsSync(path.join(homeDir, '.cursor'))) return 'cursor';
26
- if (fs.existsSync(path.join(homeDir, '.windsurf'))) return 'windsurf';
60
+ for (const ide of ideChecks) {
61
+ for (const idePath of ide.paths) {
62
+ if (fs.existsSync(path.join(homeDir, idePath))) {
63
+ return ide.name;
64
+ }
65
+ }
66
+ }
27
67
 
28
- // Default to Kiro (most common)
68
+ // Default to kiro (most common and compatible)
29
69
  return 'kiro';
30
70
  }
31
71
 
32
- function copyDirectory(src, dest) {
72
+ // Get IDE display name
73
+ function getIDEDisplayName(ide) {
74
+ const names = {
75
+ 'antigravity': 'Antigravity',
76
+ 'kiro': 'Kiro',
77
+ 'cursor': 'Cursor',
78
+ 'windsurf': 'Windsurf',
79
+ 'continue': 'Continue',
80
+ 'cody': 'Cody',
81
+ 'copilot': 'GitHub Copilot',
82
+ 'aider': 'Aider',
83
+ 'tabnine': 'Tabnine'
84
+ };
85
+ return names[ide] || ide.charAt(0).toUpperCase() + ide.slice(1);
86
+ }
87
+
88
+ // Get IDE config directory
89
+ function getIDEConfigDir(ide) {
90
+ const configDirs = {
91
+ 'antigravity': '.antigravity',
92
+ 'kiro': '.kiro',
93
+ 'cursor': '.cursor',
94
+ 'windsurf': '.windsurf',
95
+ 'continue': '.continue',
96
+ 'cody': '.cody',
97
+ 'copilot': '.github/copilot',
98
+ 'aider': '.aider',
99
+ 'tabnine': '.tabnine'
100
+ };
101
+ return configDirs[ide] || `.${ide}`;
102
+ }
103
+
104
+ function copyDirectory(src, dest, options = {}) {
33
105
  if (!fs.existsSync(dest)) {
34
106
  fs.mkdirSync(dest, { recursive: true });
35
107
  }
@@ -41,31 +113,68 @@ function copyDirectory(src, dest) {
41
113
  const destPath = path.join(dest, entry.name);
42
114
 
43
115
  if (entry.isDirectory()) {
44
- copyDirectory(srcPath, destPath);
116
+ copyDirectory(srcPath, destPath, options);
45
117
  } else {
118
+ // Skip if file exists and preserve flag is set
119
+ if (options.preserveExisting && fs.existsSync(destPath)) {
120
+ console.log(` ā­ļø Skipped (exists): ${entry.name}`);
121
+ continue;
122
+ }
46
123
  fs.copyFileSync(srcPath, destPath);
124
+ if (options.verbose) {
125
+ console.log(` āœ“ ${entry.name}`);
126
+ }
47
127
  }
48
128
  }
49
129
  }
50
130
 
131
+ function saveVersionInfo(targetPath, version) {
132
+ const versionFile = path.join(targetPath, '.skills-version');
133
+ fs.writeFileSync(versionFile, version);
134
+ }
135
+
136
+ function getInstalledVersion(targetPath) {
137
+ const versionFile = path.join(targetPath, '.skills-version');
138
+ if (fs.existsSync(versionFile)) {
139
+ return fs.readFileSync(versionFile, 'utf8').trim();
140
+ }
141
+ return null;
142
+ }
143
+
51
144
  function init() {
52
145
  const cwd = process.cwd();
53
146
  const ide = detectIDE();
147
+ const ideDisplay = getIDEDisplayName(ide);
148
+ const ideConfigDir = getIDEConfigDir(ide);
54
149
  const skillsSource = path.join(__dirname, '..', '.kiro');
55
- const skillsTarget = path.join(cwd, `.${ide}`);
150
+ const skillsTarget = path.join(cwd, ideConfigDir);
151
+ const installedVersion = getInstalledVersion(skillsTarget);
152
+ const isUpdate = installedVersion !== null;
56
153
 
57
- console.log(`šŸš€ Installing AI Agent Skills for ${ide.toUpperCase()}...\n`);
154
+ if (isUpdate) {
155
+ console.log(`šŸ”„ Updating AI Agent Skills for ${ideDisplay}...`);
156
+ console.log(` ${installedVersion} → ${CURRENT_VERSION}\n`);
157
+ } else {
158
+ console.log(`šŸš€ Installing AI Agent Skills for ${ideDisplay}...\n`);
159
+ }
58
160
 
59
161
  try {
60
- if (fs.existsSync(skillsTarget)) {
61
- console.log(`āš ļø .${ide} folder already exists.`);
162
+ if (fs.existsSync(skillsTarget) && !isUpdate) {
163
+ console.log(`āš ļø ${ideConfigDir} folder already exists.`);
62
164
  console.log(' Merging skills into existing folder...\n');
63
165
  }
64
166
 
65
- copyDirectory(skillsSource, skillsTarget);
167
+ // Preserve user customizations on update
168
+ const options = isUpdate ? { preserveExisting: false, verbose: false } : {};
169
+ copyDirectory(skillsSource, skillsTarget, options);
170
+ saveVersionInfo(skillsTarget, CURRENT_VERSION);
66
171
 
67
- console.log('āœ… Successfully installed AI Agent Skills!\n');
68
- console.log(`šŸ“¦ Installed to: .${ide}/skills/\n`);
172
+ if (isUpdate) {
173
+ console.log('āœ… Successfully updated AI Agent Skills!\n');
174
+ } else {
175
+ console.log('āœ… Successfully installed AI Agent Skills!\n');
176
+ }
177
+ console.log(`šŸ“¦ Location: ${ideConfigDir}/skills/\n`);
69
178
  console.log('šŸ“‹ Available skills:');
70
179
  console.log(' • /brainstorm - Ideation and feature exploration');
71
180
  console.log(' • /create - Build new features and components');
@@ -79,7 +188,7 @@ function init() {
79
188
  console.log(' • /test - Test strategy and coverage');
80
189
  console.log(' • /ui-ux-pro-max - UI/UX improvements and design\n');
81
190
  console.log('šŸŽÆ Next steps:');
82
- console.log(` 1. Reopen your project in ${ide.charAt(0).toUpperCase() + ide.slice(1)}`);
191
+ console.log(` 1. Reopen your project in ${ideDisplay}`);
83
192
  console.log(' 2. Type "/" in chat to see available skills');
84
193
  console.log(' 3. Start using skills like /create, /debug, /enhance\n');
85
194
  } catch (error) {
@@ -91,10 +200,12 @@ function init() {
91
200
  function installGlobal() {
92
201
  const homeDir = os.homedir();
93
202
  const ide = detectIDE();
94
- const globalSkillsPath = path.join(homeDir, `.${ide}`, 'skills');
203
+ const ideDisplay = getIDEDisplayName(ide);
204
+ const ideConfigDir = getIDEConfigDir(ide);
205
+ const globalSkillsPath = path.join(homeDir, ideConfigDir, 'skills');
95
206
  const skillsSource = path.join(__dirname, '..', '.kiro', 'skills');
96
207
 
97
- console.log(`šŸŒ Installing AI Agent Skills globally for ${ide.toUpperCase()}...\n`);
208
+ console.log(`šŸŒ Installing AI Agent Skills globally for ${ideDisplay}...\n`);
98
209
 
99
210
  try {
100
211
  if (!fs.existsSync(globalSkillsPath)) {
@@ -106,7 +217,7 @@ function installGlobal() {
106
217
  console.log('āœ… Successfully installed skills globally!\n');
107
218
  console.log('šŸ“ Location: ' + globalSkillsPath + '\n');
108
219
  console.log('šŸŽÆ Next steps:');
109
- console.log(` 1. Restart ${ide.charAt(0).toUpperCase() + ide.slice(1)}`);
220
+ console.log(` 1. Restart ${ideDisplay}`);
110
221
  console.log(' 2. Skills will be available in all projects\n');
111
222
  } catch (error) {
112
223
  console.error('āŒ Error installing global skills:', error.message);
@@ -116,18 +227,24 @@ function installGlobal() {
116
227
 
117
228
  function showHelp() {
118
229
  console.log(`
119
- AI Agent Skills CLI - Universal skills for Kiro, Cursor, Windsurf & more
230
+ AI Agent Skills CLI - Universal skills for AI-powered IDEs
120
231
 
121
232
  Usage:
122
233
  npx @votruongdanh/ai-agent-skills init Install skills in current project
123
234
  npx @votruongdanh/ai-agent-skills global Install skills globally
124
235
  npx @votruongdanh/ai-agent-skills help Show this help message
125
236
 
126
- Supported IDEs:
127
- āœ… Kiro - Automatically detected
128
- āœ… Cursor - Automatically detected
129
- āœ… Windsurf - Automatically detected
130
- āœ… Others - Uses Kiro format by default
237
+ Supported IDEs (Auto-detected):
238
+ āœ… Antigravity - .antigravity or .ag folder
239
+ āœ… Kiro - .kiro folder
240
+ āœ… Cursor - .cursor folder
241
+ āœ… Windsurf - .windsurf folder
242
+ āœ… Continue - .continue folder
243
+ āœ… Cody - .cody folder
244
+ āœ… GitHub Copilot - .github/copilot folder
245
+ āœ… Aider - .aider folder
246
+ āœ… Tabnine - .tabnine folder
247
+ āœ… Others - Uses Kiro format by default
131
248
 
132
249
  Available Skills:
133
250
  /brainstorm - Ideation and feature exploration
@@ -148,10 +265,10 @@ Documentation: https://github.com/votruongdanh/ai-agent-skills
148
265
 
149
266
  switch (command) {
150
267
  case 'init':
151
- init();
268
+ checkForUpdates(() => init());
152
269
  break;
153
270
  case 'global':
154
- installGlobal();
271
+ checkForUpdates(() => installGlobal());
155
272
  break;
156
273
  case 'help':
157
274
  case '--help':
package/package.json CHANGED
@@ -1,18 +1,27 @@
1
1
  {
2
2
  "name": "@votruongdanh/ai-agent-skills",
3
- "version": "1.0.0",
4
- "description": "Professional AI Agent Skills - 11 powerful workflows for Kiro, Cursor, Windsurf, and other AI IDEs",
3
+ "version": "1.1.0",
4
+ "description": "Professional AI Agent Skills - 11 powerful workflows for Antigravity, Kiro, Cursor, Windsurf, Continue, Cody, and other AI IDEs",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "ai-skills": "bin/cli.js"
8
8
  },
9
9
  "scripts": {
10
- "test": "echo \"No tests specified\" && exit 0"
10
+ "test": "echo \"No tests specified\" && exit 0",
11
+ "release:patch": "npm version patch && git push --follow-tags && npm publish --access public",
12
+ "release:minor": "npm version minor && git push --follow-tags && npm publish --access public",
13
+ "release:major": "npm version major && git push --follow-tags && npm publish --access public"
11
14
  },
12
15
  "keywords": [
13
16
  "kiro",
14
17
  "cursor",
15
18
  "windsurf",
19
+ "antigravity",
20
+ "continue",
21
+ "cody",
22
+ "copilot",
23
+ "aider",
24
+ "tabnine",
16
25
  "ai",
17
26
  "agent",
18
27
  "skills",
@@ -20,8 +29,7 @@
20
29
  "development",
21
30
  "workflow",
22
31
  "automation",
23
- "productivity",
24
- "copilot"
32
+ "productivity"
25
33
  ],
26
34
  "author": {
27
35
  "name": "Vo Truong Danh",