ai-agent-config 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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Universal Global Skills & Workflows for AI Coding Assistants
4
4
 
5
- [![npm version](https://badge.fury.io/js/@dongitran%2Fai-agent-config.svg)](https://www.npmjs.com/package/@dongitran/ai-agent-config)
5
+ [![npm version](https://badge.fury.io/js/ai-agent-config.svg)](https://www.npmjs.com/package/ai-agent-config)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
8
  Install a curated collection of AI agent skills from [github.com/dongitran/ai-agent-config](https://github.com/dongitran/ai-agent-config) to your global configuration.
@@ -42,7 +42,7 @@ Install a curated collection of AI agent skills from [github.com/dongitran/ai-ag
42
42
 
43
43
  ```bash
44
44
  # Install the CLI globally
45
- npm install -g @dongitran/ai-agent-config
45
+ npm install -g ai-agent-config
46
46
 
47
47
  # Sync skills from repository
48
48
  ai-agent sync
package/bin/cli.js CHANGED
@@ -181,17 +181,31 @@ function install(args) {
181
181
  try {
182
182
  const result = installer.install(options);
183
183
 
184
- if (result.skillsCount > 0) {
185
- console.log(`\n✓ Installed ${result.skillsCount} skill(s) to ${result.platformsCount} platform(s)\n`);
184
+ if (result.skillsCount > 0 || result.workflowsCount > 0) {
185
+ const parts = [];
186
+ if (result.skillsCount > 0) parts.push(`${result.skillsCount} skill(s)`);
187
+ if (result.workflowsCount > 0) parts.push(`${result.workflowsCount} workflow(s)`);
188
+
189
+ console.log(`\n✓ Installed ${parts.join(", ")} to ${result.platformsCount} platform(s)\n`);
186
190
  result.details.forEach((d) => {
187
- console.log(` ${d.platform}: ${d.path}`);
188
- d.skills.forEach((s) => {
189
- const status = s.skipped > 0 ? `(${s.copied} new, ${s.skipped} skipped)` : "";
190
- console.log(` • ${s.name} ${status}`);
191
- });
191
+ console.log(` ${d.platform}:`);
192
+ if (d.skills.length > 0) {
193
+ console.log(` Skills: ${d.skillsPath}`);
194
+ d.skills.forEach((s) => {
195
+ const status = s.skipped > 0 ? `(${s.copied} new, ${s.skipped} skipped)` : "";
196
+ console.log(` • ${s.name} ${status}`);
197
+ });
198
+ }
199
+ if (d.workflows.length > 0) {
200
+ console.log(` Workflows: ${d.workflowsPath}`);
201
+ d.workflows.forEach((w) => {
202
+ const status = w.skipped > 0 ? "(skipped)" : "";
203
+ console.log(` • ${w.name} ${status}`);
204
+ });
205
+ }
192
206
  });
193
207
  } else {
194
- console.log("\n⚠️ No skills installed.");
208
+ console.log("\n⚠️ No skills or workflows installed.");
195
209
  }
196
210
  } catch (error) {
197
211
  console.error(`\n❌ Installation failed: ${error.message}`);
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * AI Agent Config
3
3
  * Universal Global Skills & Workflows for AI Coding Assistants
4
4
  *
5
- * @module @dongitran/ai-agent-config
5
+ * @module ai-agent-config
6
6
  */
7
7
 
8
8
  const platforms = require("./scripts/platforms");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agent-config",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Universal Global Skills & Workflows for AI Coding Assistants (Claude Code, Antigravity, Cursor)",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -108,14 +108,23 @@ function getAvailableWorkflows() {
108
108
  }
109
109
 
110
110
  /**
111
- * Install skills to a specific platform
111
+ * Install skills and workflows to a specific platform
112
112
  */
113
113
  function installToPlatform(platform, options = {}) {
114
114
  const { force = false, skill = null } = options;
115
115
 
116
116
  const skillsPath = platforms.ensureSkillsDir(platform);
117
- const results = { platform: platform.name, path: skillsPath, skills: [] };
117
+ const workflowsPath = platforms.ensureWorkflowsDir(platform);
118
+
119
+ const results = {
120
+ platform: platform.name,
121
+ skillsPath: skillsPath,
122
+ workflowsPath: workflowsPath,
123
+ skills: [],
124
+ workflows: [],
125
+ };
118
126
 
127
+ // Install skills
119
128
  let skillsToInstall = getAvailableSkills();
120
129
 
121
130
  if (skill) {
@@ -136,6 +145,23 @@ function installToPlatform(platform, options = {}) {
136
145
  });
137
146
  }
138
147
 
148
+ // Install workflows (if platform supports it)
149
+ if (workflowsPath && fs.existsSync(REPO_WORKFLOWS_DIR)) {
150
+ const workflowFiles = fs.readdirSync(REPO_WORKFLOWS_DIR).filter((f) => f.endsWith(".md"));
151
+
152
+ for (const wfFile of workflowFiles) {
153
+ const srcPath = path.join(REPO_WORKFLOWS_DIR, wfFile);
154
+ const destPath = path.join(workflowsPath, wfFile);
155
+
156
+ if (fs.existsSync(destPath) && !force) {
157
+ results.workflows.push({ name: wfFile.replace(".md", ""), skipped: 1, copied: 0 });
158
+ } else {
159
+ fs.copyFileSync(srcPath, destPath);
160
+ results.workflows.push({ name: wfFile.replace(".md", ""), skipped: 0, copied: 1 });
161
+ }
162
+ }
163
+ }
164
+
139
165
  return results;
140
166
  }
141
167
 
@@ -181,12 +207,14 @@ function install(options = {}) {
181
207
 
182
208
  const details = [];
183
209
  let totalSkills = 0;
210
+ let totalWorkflows = 0;
184
211
 
185
212
  for (const platformObj of targetPlatforms) {
186
213
  try {
187
214
  const result = installToPlatform(platformObj, { force, skill });
188
215
  details.push(result);
189
216
  totalSkills += result.skills.length;
217
+ totalWorkflows += result.workflows.length;
190
218
  } catch (error) {
191
219
  console.error(` Failed to install to ${platformObj.name}: ${error.message}`);
192
220
  }
@@ -194,6 +222,7 @@ function install(options = {}) {
194
222
 
195
223
  return {
196
224
  skillsCount: totalSkills,
225
+ workflowsCount: totalWorkflows,
197
226
  platformsCount: details.length,
198
227
  details,
199
228
  };
@@ -164,6 +164,22 @@ function ensureSkillsDir(platform) {
164
164
  return skillsPath;
165
165
  }
166
166
 
167
+ /**
168
+ * Ensure workflows directory exists for a platform
169
+ * @param {Object} platform - Platform object
170
+ * @returns {string|null} Workflows path or null if not supported
171
+ */
172
+ function ensureWorkflowsDir(platform) {
173
+ if (!platform.workflowsPath) {
174
+ return null;
175
+ }
176
+ const workflowsPath = platform.workflowsPath;
177
+ if (!fs.existsSync(workflowsPath)) {
178
+ fs.mkdirSync(workflowsPath, { recursive: true });
179
+ }
180
+ return workflowsPath;
181
+ }
182
+
167
183
  /**
168
184
  * Get all supported platform names
169
185
  * @returns {Array} Array of platform names
@@ -177,6 +193,7 @@ module.exports = {
177
193
  detectAll,
178
194
  getByName,
179
195
  ensureSkillsDir,
196
+ ensureWorkflowsDir,
180
197
  getAllNames,
181
198
  HOME,
182
199
  };