claude-agent-skills 1.3.2 → 1.3.3
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/lib/prompts.js +12 -1
- package/package.json +1 -1
- package/skills.json +1 -1
package/lib/prompts.js
CHANGED
|
@@ -27,11 +27,22 @@ export async function pickScope(flags = {}) {
|
|
|
27
27
|
export async function pickSkills(names, flags = {}, descriptions = {}) {
|
|
28
28
|
if (flags.all) return names;
|
|
29
29
|
if (flags.skill?.length) return flags.skill;
|
|
30
|
+
|
|
31
|
+
// Calculate description width from actual terminal columns.
|
|
32
|
+
// prefix=4 (clack's "□ "), nameCol=32, divider=3 (" │ ")
|
|
33
|
+
const termWidth = process.stdout.columns || 100;
|
|
34
|
+
const descWidth = Math.max(20, termWidth - 4 - 32 - 3);
|
|
35
|
+
|
|
36
|
+
function fitDesc(s) {
|
|
37
|
+
if (!s) return '';
|
|
38
|
+
return s.length <= descWidth ? s : s.slice(0, descWidth - 1) + '…';
|
|
39
|
+
}
|
|
40
|
+
|
|
30
41
|
return guard(await multiselect({
|
|
31
42
|
message: 'Select skills (space to toggle, a for all, enter to confirm)',
|
|
32
43
|
options: names.map((n, i) => {
|
|
33
44
|
const name = skillColor(i)(ansis.bold(n.padEnd(32)));
|
|
34
|
-
const desc = descriptions[n] ? white(descriptions[n]
|
|
45
|
+
const desc = descriptions[n] ? white(fitDesc(descriptions[n])) : '';
|
|
35
46
|
return { value: n, label: name + divider + desc };
|
|
36
47
|
}),
|
|
37
48
|
required: true,
|
package/package.json
CHANGED