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

@@ -35,12 +35,12 @@ console.log('\n=== Testing public install identifiers ===\n');
for (const relativePath of publicInstallDocs) {
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
test(`${relativePath} does not use the stale ecc@ecc plugin identifier`, () => {
assert.ok(!content.includes('ecc@ecc'));
test(`${relativePath} does not use the overlong legacy marketplace plugin identifier`, () => {
assert.ok(!content.includes('everything-claude-code@everything-claude-code'));
});
test(`${relativePath} documents the canonical marketplace plugin identifier`, () => {
assert.ok(content.includes('everything-claude-code@everything-claude-code'));
test(`${relativePath} documents the short marketplace plugin identifier`, () => {
assert.ok(content.includes('ecc@ecc'));
});
}
@@ -86,12 +86,12 @@ for (const relativePath of publicCommandNamespaceDocs) {
test(`${relativePath} uses the canonical plugin command namespace`, () => {
assert.ok(
!content.includes('/ecc:'),
'Expected docs not to advertise the unsupported /ecc: plugin alias'
!content.includes('/everything-claude-code:'),
'Expected docs not to advertise the overlong legacy plugin command namespace'
);
assert.ok(
content.includes('/everything-claude-code:plan'),
'Expected docs to show the canonical plugin command namespace'
content.includes('/ecc:plan'),
'Expected docs to show the short plugin command namespace'
);
});
}

View File

@@ -145,6 +145,23 @@ function runTests() {
assert.match(component.description, /continuous-learning-v2/, 'Should point new installs to continuous-learning-v2');
})) passed++; else failed++;
if (test('exposes continuous-learning-v2 as a single-skill install surface', () => {
const component = getInstallComponent('skill:continuous-learning-v2');
assert.strictEqual(component.id, 'skill:continuous-learning-v2');
assert.deepStrictEqual(component.moduleIds, ['skill-continuous-learning-v2']);
assert.ok(component.targets.includes('claude'), 'Should support Claude installs');
const plan = resolveInstallPlan({
includeComponentIds: ['skill:continuous-learning-v2'],
target: 'claude',
});
assert.deepStrictEqual(plan.selectedModuleIds, ['skill-continuous-learning-v2']);
assert.ok(
plan.operations.some(operation => operation.sourceRelativePath === 'skills/continuous-learning-v2'),
'Should plan only the continuous-learning-v2 skill path'
);
})) passed++; else failed++;
if (test('lists supported legacy compatibility languages', () => {
const languages = listLegacyCompatibilityLanguages();
assert.ok(languages.includes('typescript'));

View File

@@ -81,6 +81,25 @@ function runTests() {
]);
})) passed++; else failed++;
if (test('parses --skills as skill component selections', () => {
const parsed = parseInstallArgs([
'node', 'install-apply.js',
'--skills', 'continuous-learning-v2,security-review',
]);
assert.deepStrictEqual(parsed.includeComponentIds, [
'skill:continuous-learning-v2',
'skill:security-review',
]);
})) passed++; else failed++;
if (test('parses --skill when caller already includes the skill: prefix', () => {
const parsed = parseInstallArgs([
'node', 'install-apply.js',
'--skill', 'skill:continuous-learning-v2',
]);
assert.deepStrictEqual(parsed.includeComponentIds, ['skill:continuous-learning-v2']);
})) passed++; else failed++;
if (test('parses multiple --without flags', () => {
const parsed = parseInstallArgs([
'node', 'install-apply.js',
@@ -244,6 +263,7 @@ function runTests() {
const components = listInstallComponents({ family: 'skill' });
assert.ok(components.length > 0, 'Should have at least one skill component');
assert.ok(components.some(c => c.id === 'skill:continuous-learning'), 'Should have skill:continuous-learning');
assert.ok(components.some(c => c.id === 'skill:continuous-learning-v2'), 'Should have skill:continuous-learning-v2');
})) passed++; else failed++;
// ─── Install Plan Resolution with --with ───
@@ -430,6 +450,22 @@ function runTests() {
'Should include workflow-quality module from skill:continuous-learning');
})) passed++; else failed++;
if (test('--with skill:continuous-learning-v2 installs only that skill module', () => {
const plan = resolveInstallPlan({
includeComponentIds: ['skill:continuous-learning-v2'],
target: 'claude',
});
assert.deepStrictEqual(plan.selectedModuleIds, ['skill-continuous-learning-v2']);
assert.ok(
plan.operations.some(operation => operation.sourceRelativePath === 'skills/continuous-learning-v2'),
'Should install the continuous-learning-v2 skill directory'
);
assert.ok(
!plan.operations.some(operation => operation.sourceRelativePath === 'skills/tdd-workflow'),
'Should not install the whole workflow-quality skill module'
);
})) passed++; else failed++;
// ─── Help Text ───
if (test('help text documents --with and --without flags', () => {
@@ -670,6 +706,43 @@ function runTests() {
}
})) passed++; else failed++;
if (test('end-to-end: --skills continuous-learning-v2 installs only that skill', () => {
const { execFileSync } = require('child_process');
const scriptPath = path.join(__dirname, '..', '..', 'scripts', 'install-apply.js');
const homeDir = fs.mkdtempSync(path.join(os.tmpdir(), 'selective-skill-install-'));
const projectDir = fs.mkdtempSync(path.join(os.tmpdir(), 'selective-skill-install-project-'));
try {
execFileSync('node', [
scriptPath,
'--skills', 'continuous-learning-v2',
], {
cwd: projectDir,
env: { ...process.env, HOME: homeDir },
encoding: 'utf8',
stdio: ['pipe', 'pipe', 'pipe'],
});
const claudeRoot = path.join(homeDir, '.claude');
assert.ok(
fs.existsSync(path.join(claudeRoot, 'skills', 'ecc', 'continuous-learning-v2', 'SKILL.md')),
'Should install continuous-learning-v2'
);
assert.ok(
!fs.existsSync(path.join(claudeRoot, 'skills', 'ecc', 'tdd-workflow', 'SKILL.md')),
'Should not install unrelated workflow-quality skills'
);
const statePath = path.join(claudeRoot, 'ecc', 'install-state.json');
const state = JSON.parse(fs.readFileSync(statePath, 'utf8'));
assert.deepStrictEqual(state.request.includeComponents, ['skill:continuous-learning-v2']);
assert.deepStrictEqual(state.resolution.selectedModules, ['skill-continuous-learning-v2']);
} finally {
fs.rmSync(homeDir, { recursive: true, force: true });
fs.rmSync(projectDir, { recursive: true, force: true });
}
})) passed++; else failed++;
// ─── JSON output mode ───
if (test('end-to-end: --dry-run --json includes component selections in output', () => {

View File

@@ -206,8 +206,8 @@ test('claude plugin.json version matches package.json', () => {
assert.strictEqual(claudePlugin.version, expectedVersion);
});
test('claude plugin.json uses published plugin name', () => {
assert.strictEqual(claudePlugin.name, 'everything-claude-code');
test('claude plugin.json uses short plugin slug', () => {
assert.strictEqual(claudePlugin.name, 'ecc');
});
test('claude plugin.json does NOT have agents field (unsupported by Claude Code validator)', () => {
@@ -226,7 +226,8 @@ test('claude plugin.json commands is an array', () => {
});
test('claude plugin.json disables bundled MCP servers for provider tool-name compatibility', () => {
const reportedOverlongToolName = `mcp__plugin_${claudePlugin.name}_github__create_pull_request_review`;
const legacyPluginName = 'everything-claude-code';
const reportedOverlongToolName = `mcp__plugin_${legacyPluginName}_github__create_pull_request_review`;
assert.ok(
reportedOverlongToolName.length > 64,
@@ -270,8 +271,8 @@ test('claude marketplace.json keeps only Claude-supported top-level keys', () =>
test('claude marketplace.json has plugins array with the published plugin entry', () => {
assert.ok(Array.isArray(claudeMarketplace.plugins) && claudeMarketplace.plugins.length > 0, 'Expected plugins array');
assert.strictEqual(claudeMarketplace.name, 'everything-claude-code');
assert.strictEqual(claudeMarketplace.plugins[0].name, 'everything-claude-code');
assert.strictEqual(claudeMarketplace.name, 'ecc');
assert.strictEqual(claudeMarketplace.plugins[0].name, 'ecc');
});
test('claude marketplace.json plugin version matches package.json', () => {
@@ -466,18 +467,18 @@ test('README version row matches package.json', () => {
assert.strictEqual(match[1], expectedVersion);
});
test('user-facing docs do not use deprecated ecc@ecc install commands', () => {
test('user-facing docs do not use overlong legacy marketplace install commands', () => {
const markdownFiles = [
path.join(repoRoot, 'README.md'),
path.join(repoRoot, 'README.zh-CN.md'),
path.join(repoRoot, 'skills', 'configure-ecc', 'SKILL.md'),
...collectMarkdownFiles(path.join(repoRoot, 'docs')),
];
].filter(filePath => !path.relative(repoRoot, filePath).startsWith(`docs${path.sep}drafts${path.sep}`));
const offenders = [];
for (const filePath of markdownFiles) {
const source = fs.readFileSync(filePath, 'utf8');
if (/\/plugin\s+(install|list)\s+ecc@ecc\b/.test(source)) {
if (/\/plugin\s+(install|list)\s+everything-claude-code(?:@everything-claude-code)?\b/.test(source)) {
offenders.push(path.relative(repoRoot, filePath));
}
}
@@ -485,7 +486,7 @@ test('user-facing docs do not use deprecated ecc@ecc install commands', () => {
assert.deepStrictEqual(
offenders,
[],
`Deprecated ecc@ecc install commands must not appear in user-facing docs: ${offenders.join(', ')}`,
`Overlong legacy install commands must not appear in user-facing docs: ${offenders.join(', ')}`,
);
});

View File

@@ -109,6 +109,20 @@ function runTests() {
assert.ok(parsed.operations.length > 0);
})) passed++; else failed++;
if (test('emits JSON for --skills without pulling parent module', () => {
const result = run([
'--skills', 'continuous-learning-v2',
'--target', 'claude',
'--json',
]);
assert.strictEqual(result.code, 0);
const parsed = JSON.parse(result.stdout);
assert.deepStrictEqual(parsed.includedComponentIds, ['skill:continuous-learning-v2']);
assert.deepStrictEqual(parsed.selectedModuleIds, ['skill-continuous-learning-v2']);
assert.ok(parsed.operations.some(operation => operation.sourceRelativePath === 'skills/continuous-learning-v2'));
assert.ok(!parsed.operations.some(operation => operation.sourceRelativePath === 'skills/tdd-workflow'));
})) passed++; else failed++;
if (test('loads planning intent from ecc-install.json', () => {
const configDir = path.join(__dirname, '..', 'fixtures', 'tmp-install-plan-config');
const configPath = path.join(configDir, 'ecc-install.json');