@votruongdanh/ai-agent-skills 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.
Files changed (3) hide show
  1. package/README.md +19 -0
  2. package/bin/cli.js +36 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -50,6 +50,17 @@ No configuration needed - just run the install command!
50
50
 
51
51
  ## 💡 Usage Examples
52
52
 
53
+ ```bash
54
+ # Auto-detect IDE (recommended)
55
+ npx @votruongdanh/ai-agent-skills init
56
+
57
+ # Force specific IDE
58
+ npx @votruongdanh/ai-agent-skills init --ide=antigravity
59
+ npx @votruongdanh/ai-agent-skills init --ide=cursor
60
+ npx @votruongdanh/ai-agent-skills init --ide=kiro
61
+ ```
62
+
63
+ **In your IDE:**
53
64
  ```
54
65
  /create Add user authentication with JWT
55
66
  /debug Login form not submitting on mobile
@@ -61,8 +72,14 @@ No configuration needed - just run the install command!
61
72
 
62
73
  ### Project-specific (Recommended)
63
74
  ```bash
75
+ # Auto-detect your IDE
64
76
  cd your-project
65
77
  npx @votruongdanh/ai-agent-skills init
78
+
79
+ # Or specify IDE manually
80
+ npx @votruongdanh/ai-agent-skills init --ide=antigravity
81
+ npx @votruongdanh/ai-agent-skills init --ide=cursor
82
+ npx @votruongdanh/ai-agent-skills init --ide=windsurf
66
83
  ```
67
84
 
68
85
  ### Global (All projects)
@@ -70,6 +87,8 @@ npx @votruongdanh/ai-agent-skills init
70
87
  npx @votruongdanh/ai-agent-skills global
71
88
  ```
72
89
 
90
+ **Tip:** If auto-detection doesn't work, use `--ide=<name>` to specify your IDE manually.
91
+
73
92
  ## 🔧 How It Works
74
93
 
75
94
  1. Run `npx @votruongdanh/ai-agent-skills init`
package/bin/cli.js CHANGED
@@ -6,6 +6,7 @@ const os = require('os');
6
6
  const https = require('https');
7
7
 
8
8
  const command = process.argv[2];
9
+ const ideFlag = process.argv[3]; // Support --ide=<name> flag
9
10
  const PACKAGE_NAME = '@votruongdanh/ai-agent-skills';
10
11
  const CURRENT_VERSION = require('../package.json').version;
11
12
 
@@ -29,8 +30,31 @@ function checkForUpdates(callback) {
29
30
  }).on('error', () => callback()); // Silent fail
30
31
  }
31
32
 
33
+ // Parse IDE from command line flag
34
+ function parseIDEFlag() {
35
+ const args = process.argv.slice(2);
36
+ for (const arg of args) {
37
+ if (arg.startsWith('--ide=')) {
38
+ return arg.split('=')[1].toLowerCase();
39
+ }
40
+ }
41
+ return null;
42
+ }
43
+
32
44
  // Detect IDE type with expanded support
33
45
  function detectIDE() {
46
+ // Check if user specified IDE via flag
47
+ const manualIDE = parseIDEFlag();
48
+ if (manualIDE) {
49
+ const validIDEs = ['antigravity', 'kiro', 'cursor', 'windsurf', 'continue', 'cody', 'copilot', 'aider', 'tabnine'];
50
+ if (validIDEs.includes(manualIDE)) {
51
+ console.log(`📌 Using manually specified IDE: ${getIDEDisplayName(manualIDE)}\n`);
52
+ return manualIDE;
53
+ } else {
54
+ console.log(`âš ī¸ Unknown IDE: ${manualIDE}. Auto-detecting...\n`);
55
+ }
56
+ }
57
+
34
58
  const cwd = process.cwd();
35
59
  const homeDir = os.homedir();
36
60
 
@@ -51,6 +75,7 @@ function detectIDE() {
51
75
  for (const ide of ideChecks) {
52
76
  for (const idePath of ide.paths) {
53
77
  if (fs.existsSync(path.join(cwd, idePath))) {
78
+ console.log(`🔍 Auto-detected: ${getIDEDisplayName(ide.name)} (found ${idePath}/)\n`);
54
79
  return ide.name;
55
80
  }
56
81
  }
@@ -60,12 +85,14 @@ function detectIDE() {
60
85
  for (const ide of ideChecks) {
61
86
  for (const idePath of ide.paths) {
62
87
  if (fs.existsSync(path.join(homeDir, idePath))) {
88
+ console.log(`🔍 Auto-detected: ${getIDEDisplayName(ide.name)} (found ~/${idePath}/)\n`);
63
89
  return ide.name;
64
90
  }
65
91
  }
66
92
  }
67
93
 
68
94
  // Default to kiro (most common and compatible)
95
+ console.log(`â„šī¸ No IDE detected. Using Kiro format (most compatible)\n`);
69
96
  return 'kiro';
70
97
  }
71
98
 
@@ -230,9 +257,15 @@ function showHelp() {
230
257
  AI Agent Skills CLI - Universal skills for AI-powered IDEs
231
258
 
232
259
  Usage:
233
- npx @votruongdanh/ai-agent-skills init Install skills in current project
234
- npx @votruongdanh/ai-agent-skills global Install skills globally
235
- npx @votruongdanh/ai-agent-skills help Show this help message
260
+ npx @votruongdanh/ai-agent-skills init Install skills (auto-detect IDE)
261
+ npx @votruongdanh/ai-agent-skills init --ide=<name> Install for specific IDE
262
+ npx @votruongdanh/ai-agent-skills global Install skills globally
263
+ npx @votruongdanh/ai-agent-skills help Show this help message
264
+
265
+ Examples:
266
+ npx @votruongdanh/ai-agent-skills init --ide=antigravity Force install for Antigravity
267
+ npx @votruongdanh/ai-agent-skills init --ide=cursor Force install for Cursor
268
+ npx @votruongdanh/ai-agent-skills init --ide=kiro Force install for Kiro
236
269
 
237
270
  Supported IDEs (Auto-detected):
238
271
  ✅ Antigravity - agent/skills folder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@votruongdanh/ai-agent-skills",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
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": {