fix: remove canonical Anthropic skill duplicates

This commit is contained in:
Affaan Mustafa
2026-04-30 00:12:46 -04:00
committed by Affaan Mustafa
parent 06f9eca8e2
commit 95ce9eaaeb
29 changed files with 85 additions and 1359 deletions

View File

@@ -10,6 +10,8 @@ const path = require('path');
const REPO_ROOT = path.join(__dirname, '..', '..');
const AGENT_YAML_PATH = path.join(REPO_ROOT, 'agent.yaml');
const COMMANDS_DIR = path.join(REPO_ROOT, 'commands');
const SKILLS_DIR = path.join(REPO_ROOT, 'skills');
const CODEX_SKILLS_DIR = path.join(REPO_ROOT, '.agents', 'skills');
const LEGACY_COMMANDS_DIR = path.join(REPO_ROOT, 'legacy-command-shims', 'commands');
const RETIRED_LEGACY_SHIMS = [
@@ -27,6 +29,11 @@ const RETIRED_LEGACY_SHIMS = [
'verify',
];
const CANONICAL_ANTHROPIC_SKILLS = [
'claude-api',
'frontend-design',
];
function extractTopLevelList(yamlSource, key) {
const lines = yamlSource.replace(/^\uFEFF/, '').split(/\r?\n/);
const results = [];
@@ -102,6 +109,19 @@ function run() {
assert.deepStrictEqual(archivedCommands, RETIRED_LEGACY_SHIMS);
})) passed++; else failed++;
if (test('canonical Anthropic skills are not re-bundled in active ECC skill surfaces', () => {
for (const skillName of CANONICAL_ANTHROPIC_SKILLS) {
assert.ok(
!fs.existsSync(path.join(SKILLS_DIR, skillName, 'SKILL.md')),
`${skillName} should be installed from anthropics/skills, not ECC skills/`
);
assert.ok(
!fs.existsSync(path.join(CODEX_SKILLS_DIR, skillName, 'SKILL.md')),
`${skillName} should be installed from anthropics/skills, not ECC .agents/skills/`
);
}
})) passed++; else failed++;
console.log(`\nPassed: ${passed}`);
console.log(`Failed: ${failed}`);