skillbin 0.1.0 → 0.1.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/bin/skillbin.js +38 -4
- package/package.json +1 -1
package/bin/skillbin.js
CHANGED
|
@@ -188,10 +188,44 @@ async function upload(filePath, opts) {
|
|
|
188
188
|
if (fs.existsSync(cwdSkill)) {
|
|
189
189
|
skills.push({ name: path.basename(process.cwd()), dir: process.cwd(), format: 'claude' });
|
|
190
190
|
} else {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
const discovered = discoverSkills();
|
|
192
|
+
if (discovered.length === 0) {
|
|
193
|
+
console.error('No skills found. Supported locations:');
|
|
194
|
+
console.error(' Claude: .claude/skills/*/SKILL.md');
|
|
195
|
+
console.error(' Cursor: .cursor/rules/*.mdc');
|
|
196
|
+
console.error(' Windsurf: .windsurf/rules/*.md');
|
|
197
|
+
console.error(' Copilot: .github/instructions/*.instructions.md');
|
|
198
|
+
console.error(' Codex: AGENTS.md');
|
|
199
|
+
console.error(' Cline: .clinerules/*.md');
|
|
200
|
+
process.exit(1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
console.error(`\nFound ${discovered.length} skill(s):\n`);
|
|
204
|
+
discovered.forEach((s, i) => {
|
|
205
|
+
console.error(` ${i + 1}) ${s.name} [${s.format}]`);
|
|
206
|
+
});
|
|
207
|
+
console.error('');
|
|
208
|
+
|
|
209
|
+
if (!process.stdin.isTTY) {
|
|
210
|
+
console.error('Error: no terminal available. Pass a path or use --all.');
|
|
211
|
+
process.exit(1);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const selection = await promptUser(`Upload which? (1-${discovered.length}, space-separated, or "all"): `);
|
|
215
|
+
let indices;
|
|
216
|
+
if (selection.trim() === 'all') {
|
|
217
|
+
indices = discovered.map((_, i) => i);
|
|
218
|
+
} else {
|
|
219
|
+
indices = selection.trim().split(/\s+/).map(n => parseInt(n, 10) - 1)
|
|
220
|
+
.filter(i => i >= 0 && i < discovered.length);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (indices.length === 0) {
|
|
224
|
+
console.error('No skills selected.');
|
|
225
|
+
process.exit(0);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
skills = indices.map(i => discovered[i]);
|
|
195
229
|
}
|
|
196
230
|
}
|
|
197
231
|
|