From 80964ec4fed2bdfa1a79b40d45aef7968b9f7f5b Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Sun, 11 Oct 2026 02:00:27 -0400 Subject: [PATCH] fix(install): ship standalone skill-health command runtime --- manifests/install-modules.json | 4 ++++ tests/scripts/install-apply.test.js | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/manifests/install-modules.json b/manifests/install-modules.json index ad73d6471..739dd22f4 100644 --- a/manifests/install-modules.json +++ b/manifests/install-modules.json @@ -67,6 +67,10 @@ "scripts/astra-review.js", "scripts/harness-audit.js", "scripts/skills-health.js", + "scripts/lib/skill-evolution", + "scripts/lib/utils.js", + "scripts/lib/agent-data-home.js", + "scripts/lib/path-safety.js", "scripts/lib/astra-review", "scripts/ci/validate-skill-host-compat.js", "scripts/ci/validate-skills.js" diff --git a/tests/scripts/install-apply.test.js b/tests/scripts/install-apply.test.js index 13de545e7..6d0d7bffc 100644 --- a/tests/scripts/install-apply.test.js +++ b/tests/scripts/install-apply.test.js @@ -803,6 +803,31 @@ function runTests() { } })) passed++; else failed++; + if (test('commands-only install can execute skill health without hook automation', () => { + const homeDir = createTempDir('install-health-home-'); + const projectDir = createTempDir('install-health-project-'); + try { + const env = { CLAUDE_CONFIG_DIR: path.join(homeDir, '.claude') }; + const installed = run(['--target', 'claude', '--modules', 'commands-core', '--no-hooks', '--json'], { + cwd: projectDir, homeDir, env, + }); + assert.strictEqual(installed.code, 0, installed.stderr); + const health = spawnSync(process.execPath, [ + path.join(homeDir, '.claude', 'scripts', 'skills-health.js'), '--json', + '--home', homeDir, '--skills-root', path.join(homeDir, 'empty-curated'), + '--learned-root', path.join(homeDir, 'empty-learned'), + '--imported-root', path.join(homeDir, 'empty-imported'), + ], { cwd: projectDir, env: { ...process.env, HOME: homeDir, USERPROFILE: homeDir, ...env }, encoding: 'utf8' }); + assert.strictEqual(health.status, 0, health.stderr); + assert.deepStrictEqual(JSON.parse(health.stdout).skills, []); + const state = readJson(path.join(homeDir, '.claude', 'ecc', 'install-state.json')); + assert.ok(!state.operations.some(operation => operation.sourceRelativePath.startsWith('scripts/hooks/'))); + } finally { + cleanup(homeDir); + cleanup(projectDir); + } + })) passed++; else failed++; + if (test('preserves existing top-level Claude rules and skills during managed install', () => { const homeDir = createTempDir('install-apply-home-'); const projectDir = createTempDir('install-apply-project-');