aboutsummaryrefslogtreecommitdiff
path: root/modules/ext/skill-pack-core.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ext/skill-pack-core.js')
-rw-r--r--modules/ext/skill-pack-core.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/ext/skill-pack-core.js b/modules/ext/skill-pack-core.js
index de50f89..455a7f4 100644
--- a/modules/ext/skill-pack-core.js
+++ b/modules/ext/skill-pack-core.js
@@ -586,8 +586,10 @@ class SkillPackCoreModule {
const desc = args[1];
const content = args.slice(2).join(' ');
const tags = [];
- if (content.includes('"')) {
- // Parse quoted tags at end
+ // Parse tags from the last argument if it looks like a comma-separated list
+ const lastArg = args[args.length - 1];
+ if (lastArg && !lastArg.startsWith('"') && lastArg.includes(',')) {
+ tags.push(...lastArg.split(',').map(t => t.trim()).filter(Boolean));
}
const fs = this.terminal.fs;
// Check for duplicate
@@ -700,6 +702,7 @@ class SkillPackCoreModule {
const files = fs.ls('/skills') || [];
const mdFiles = files.filter(f => f.type === 'file' && f.name.endsWith('.md') && f.name !== 'index.json');
let synced = 0;
+ const oldIndex = fs.fsReadJSON('/skills/index.json') || {};
const index = {};
for (const f of mdFiles) {
const content = fs.readFile(`/skills/${f.name}`);
@@ -723,7 +726,7 @@ class SkillPackCoreModule {
description,
tags,
category,
- created: new Date().toISOString(),
+ created: (oldIndex[name] && oldIndex[name].created) || new Date().toISOString(),
updated: new Date().toISOString()
};
synced++;