fix: restore short Claude plugin slug and skill installs (#1712)

This commit is contained in:
Affaan Mustafa
2026-05-11 02:10:36 -04:00
committed by GitHub
parent 7b964402ee
commit 8a57679222
25 changed files with 273 additions and 94 deletions

View File

@@ -8,6 +8,12 @@ function dedupeStrings(values) {
return [...new Set((Array.isArray(values) ? values : []).map(value => String(value).trim()).filter(Boolean))];
}
function normalizeSkillComponentIds(rawValue) {
return dedupeStrings(String(rawValue || '').split(',')).map(value => (
value.startsWith('skill:') ? value : `skill:${value}`
));
}
function parseInstallArgs(argv) {
const args = argv.slice(2);
const parsed = {
@@ -45,6 +51,9 @@ function parseInstallArgs(argv) {
parsed.includeComponentIds.push(componentId.trim());
}
index += 1;
} else if (arg === '--skill' || arg === '--skills') {
parsed.includeComponentIds.push(...normalizeSkillComponentIds(args[index + 1] || ''));
index += 1;
} else if (arg === '--without') {
const componentId = args[index + 1] || '';
if (componentId.trim()) {