agent-skills-standard 1.3.1 → 1.3.2

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/dist/index.js CHANGED
@@ -10,7 +10,7 @@ const program = new commander_1.Command();
10
10
  program
11
11
  .name('agent-skills-standard')
12
12
  .description('A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, Windsurf, and more.')
13
- .version('1.3.1');
13
+ .version('1.3.2');
14
14
  program
15
15
  .command('init')
16
16
  .description('Initialize a .skillsrc configuration file interactively')
@@ -140,20 +140,37 @@ async function main() {
140
140
  // Update README.md table
141
141
  const readmePath = path.join(__dirname, '../../../README.md');
142
142
  if (fs_extra_1.default.existsSync(readmePath)) {
143
- let readmeContent = fs_extra_1.default.readFileSync(readmePath, 'utf-8');
144
- for (const category of categories) {
145
- const metrics = results[category];
146
- const version = metadata.categories[category].version;
147
- // Find the row for this category (case-insensitive for emojis)
148
- // Standardizes on the format: | **ICON Category** | Key Modules | Version | Skills | Avg. Footprint |
149
- const regex = new RegExp(`(\\|\\s*\\*\\*.*${category}.*\\*\\*\\s*\\|.*\\|\\s*\`v?${version}\`\\s*\\|)\\s*\\d+\\s*\\|\\s*~?\\d+\\s*tokens\\s*\\|`, 'i');
150
- const replacement = `$1 ${metrics.totalSkills} | ~${metrics.avgTokensPerSkill} tokens |`;
151
- if (readmeContent.match(regex)) {
152
- readmeContent = readmeContent.replace(regex, replacement);
143
+ const readmeContent = fs_extra_1.default.readFileSync(readmePath, 'utf-8');
144
+ const lines = readmeContent.split('\n');
145
+ let updated = false;
146
+ for (let i = 0; i < lines.length; i++) {
147
+ const line = lines[i];
148
+ if (!line.includes('|'))
149
+ continue;
150
+ for (const category of categories) {
151
+ // Create a flexible regex: "nextjs" -> /next.*js/i to match "Next.js"
152
+ const flexibleCategory = category.split('').join('.*');
153
+ const categoryMatch = new RegExp(`\\*\\*.*${flexibleCategory}.*\\*\\*`, 'i').test(line);
154
+ if (categoryMatch) {
155
+ const metrics = results[category];
156
+ const cells = line.split('|');
157
+ if (cells.length >= 6) {
158
+ // Update Skills (index 4) and Avg. Footprint (index 5)
159
+ // Desired format: | 10 | ~503 tokens |
160
+ cells[4] = ` ${metrics.totalSkills}`.padEnd(8);
161
+ cells[5] = ` ~${metrics.avgTokensPerSkill} tokens `
162
+ .trimEnd()
163
+ .padEnd(16);
164
+ lines[i] = cells.join('|');
165
+ updated = true;
166
+ }
167
+ }
153
168
  }
154
169
  }
155
- fs_extra_1.default.writeFileSync(readmePath, readmeContent);
156
- console.log('✅ Updated README.md support table');
170
+ if (updated) {
171
+ fs_extra_1.default.writeFileSync(readmePath, lines.join('\n'));
172
+ console.log('✅ Updated README.md support table');
173
+ }
157
174
  }
158
175
  }
159
176
  main().catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-skills-standard",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "A CLI to manage and sync AI agent skills standard for Cursor, Claude, Copilot, Windsurf, and more.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {