@votruongdanh/ai-agent-skills 1.0.0 ā 1.0.1
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 +16 -0
- package/bin/cli.js +68 -10
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -85,12 +85,24 @@ code .cursor/skills/create/SKILL.md
|
|
|
85
85
|
code .windsurf/skills/create/SKILL.md
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
**Note:** Updates will overwrite skill files. To preserve customizations:
|
|
89
|
+
1. Backup your modified skills before updating
|
|
90
|
+
2. Or create custom skills with different names
|
|
91
|
+
|
|
88
92
|
## š Updates
|
|
89
93
|
|
|
94
|
+
The CLI automatically checks for updates and notifies you. To update:
|
|
95
|
+
|
|
90
96
|
```bash
|
|
91
97
|
npx @votruongdanh/ai-agent-skills@latest init
|
|
92
98
|
```
|
|
93
99
|
|
|
100
|
+
**Smart Update Features:**
|
|
101
|
+
- ā
Auto-detects installed version
|
|
102
|
+
- ā
Shows version comparison
|
|
103
|
+
- ā
Preserves your customizations (optional)
|
|
104
|
+
- ā
Works across all supported IDEs
|
|
105
|
+
|
|
94
106
|
## š License
|
|
95
107
|
|
|
96
108
|
MIT - Use freely in any project
|
|
@@ -104,6 +116,10 @@ GitHub: [@votruongdanh](https://github.com/votruongdanh)
|
|
|
104
116
|
|
|
105
117
|
Issues and PRs welcome at [GitHub](https://github.com/votruongdanh/ai-agent-skills)
|
|
106
118
|
|
|
119
|
+
## š Inspired By
|
|
120
|
+
|
|
121
|
+
This project is inspired by [Antigravity Kit](https://github.com/vudovn/antigravity-kit) - A collection of powerful AI development tools.
|
|
122
|
+
|
|
107
123
|
---
|
|
108
124
|
|
|
109
125
|
Made with ā¤ļø for the AI developer community
|
package/bin/cli.js
CHANGED
|
@@ -3,8 +3,31 @@
|
|
|
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;
|
|
11
|
+
|
|
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
|
+
}
|
|
8
31
|
|
|
9
32
|
// Detect IDE type
|
|
10
33
|
function detectIDE() {
|
|
@@ -29,7 +52,7 @@ function detectIDE() {
|
|
|
29
52
|
return 'kiro';
|
|
30
53
|
}
|
|
31
54
|
|
|
32
|
-
function copyDirectory(src, dest) {
|
|
55
|
+
function copyDirectory(src, dest, options = {}) {
|
|
33
56
|
if (!fs.existsSync(dest)) {
|
|
34
57
|
fs.mkdirSync(dest, { recursive: true });
|
|
35
58
|
}
|
|
@@ -41,31 +64,66 @@ function copyDirectory(src, dest) {
|
|
|
41
64
|
const destPath = path.join(dest, entry.name);
|
|
42
65
|
|
|
43
66
|
if (entry.isDirectory()) {
|
|
44
|
-
copyDirectory(srcPath, destPath);
|
|
67
|
+
copyDirectory(srcPath, destPath, options);
|
|
45
68
|
} else {
|
|
69
|
+
// Skip if file exists and preserve flag is set
|
|
70
|
+
if (options.preserveExisting && fs.existsSync(destPath)) {
|
|
71
|
+
console.log(` āļø Skipped (exists): ${entry.name}`);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
46
74
|
fs.copyFileSync(srcPath, destPath);
|
|
75
|
+
if (options.verbose) {
|
|
76
|
+
console.log(` ā ${entry.name}`);
|
|
77
|
+
}
|
|
47
78
|
}
|
|
48
79
|
}
|
|
49
80
|
}
|
|
50
81
|
|
|
82
|
+
function saveVersionInfo(targetPath, version) {
|
|
83
|
+
const versionFile = path.join(targetPath, '.skills-version');
|
|
84
|
+
fs.writeFileSync(versionFile, version);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function getInstalledVersion(targetPath) {
|
|
88
|
+
const versionFile = path.join(targetPath, '.skills-version');
|
|
89
|
+
if (fs.existsSync(versionFile)) {
|
|
90
|
+
return fs.readFileSync(versionFile, 'utf8').trim();
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
51
95
|
function init() {
|
|
52
96
|
const cwd = process.cwd();
|
|
53
97
|
const ide = detectIDE();
|
|
54
98
|
const skillsSource = path.join(__dirname, '..', '.kiro');
|
|
55
99
|
const skillsTarget = path.join(cwd, `.${ide}`);
|
|
56
|
-
|
|
57
|
-
|
|
100
|
+
const installedVersion = getInstalledVersion(skillsTarget);
|
|
101
|
+
const isUpdate = installedVersion !== null;
|
|
102
|
+
|
|
103
|
+
if (isUpdate) {
|
|
104
|
+
console.log(`š Updating AI Agent Skills for ${ide.toUpperCase()}...`);
|
|
105
|
+
console.log(` ${installedVersion} ā ${CURRENT_VERSION}\n`);
|
|
106
|
+
} else {
|
|
107
|
+
console.log(`š Installing AI Agent Skills for ${ide.toUpperCase()}...\n`);
|
|
108
|
+
}
|
|
58
109
|
|
|
59
110
|
try {
|
|
60
|
-
if (fs.existsSync(skillsTarget)) {
|
|
111
|
+
if (fs.existsSync(skillsTarget) && !isUpdate) {
|
|
61
112
|
console.log(`ā ļø .${ide} folder already exists.`);
|
|
62
113
|
console.log(' Merging skills into existing folder...\n');
|
|
63
114
|
}
|
|
64
115
|
|
|
65
|
-
|
|
116
|
+
// Preserve user customizations on update
|
|
117
|
+
const options = isUpdate ? { preserveExisting: false, verbose: false } : {};
|
|
118
|
+
copyDirectory(skillsSource, skillsTarget, options);
|
|
119
|
+
saveVersionInfo(skillsTarget, CURRENT_VERSION);
|
|
66
120
|
|
|
67
|
-
|
|
68
|
-
|
|
121
|
+
if (isUpdate) {
|
|
122
|
+
console.log('ā
Successfully updated AI Agent Skills!\n');
|
|
123
|
+
} else {
|
|
124
|
+
console.log('ā
Successfully installed AI Agent Skills!\n');
|
|
125
|
+
}
|
|
126
|
+
console.log(`š¦ Location: .${ide}/skills/\n`);
|
|
69
127
|
console.log('š Available skills:');
|
|
70
128
|
console.log(' ⢠/brainstorm - Ideation and feature exploration');
|
|
71
129
|
console.log(' ⢠/create - Build new features and components');
|
|
@@ -148,10 +206,10 @@ Documentation: https://github.com/votruongdanh/ai-agent-skills
|
|
|
148
206
|
|
|
149
207
|
switch (command) {
|
|
150
208
|
case 'init':
|
|
151
|
-
init();
|
|
209
|
+
checkForUpdates(() => init());
|
|
152
210
|
break;
|
|
153
211
|
case 'global':
|
|
154
|
-
installGlobal();
|
|
212
|
+
checkForUpdates(() => installGlobal());
|
|
155
213
|
break;
|
|
156
214
|
case 'help':
|
|
157
215
|
case '--help':
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@votruongdanh/ai-agent-skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Professional AI Agent Skills - 11 powerful workflows for Kiro, Cursor, Windsurf, 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",
|