From 5071d85a4b6f1e7e470fc4573f4d02015cb818d3 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 10 Apr 2026 10:58:17 -0700 Subject: [PATCH] Fix: skills update always showed updates available The hash comparison was comparing the entire local skills directory (which includes user's custom skills) against the bundle (which only has impeccable skills). Now only compares skills that exist in the bundle, so custom skills don't cause a false mismatch. CLI bumped to v2.1.3. Co-Authored-By: Claude Opus 4.6 (1M context) --- bin/commands/skills.mjs | 23 +++++++++++++++++++---- package.json | 2 +- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/bin/commands/skills.mjs b/bin/commands/skills.mjs index 4a66220e1..9f6493089 100644 --- a/bin/commands/skills.mjs +++ b/bin/commands/skills.mjs @@ -114,13 +114,28 @@ async function downloadAndExtractBundle() { /** * Compare local skills against a downloaded bundle. - * Returns true if all local SKILL.md files match the bundle. + * Only checks skills that exist in the bundle (ignores user's custom + * skills that aren't part of impeccable). + * Returns true if every bundle skill matches the local copy. */ function isUpToDate(root, providers, bundleDir) { for (const provider of providers) { - const localHash = hashSkillsDir(join(root, provider, 'skills')); - const remoteHash = hashSkillsDir(join(bundleDir, provider, 'skills')); - if (localHash !== remoteHash) return false; + const bundleSkillsDir = join(bundleDir, provider, 'skills'); + const localSkillsDir = join(root, provider, 'skills'); + if (!existsSync(bundleSkillsDir)) continue; + + for (const name of readdirSync(bundleSkillsDir)) { + const bundleMd = join(bundleSkillsDir, name, 'SKILL.md'); + const localMd = join(localSkillsDir, name, 'SKILL.md'); + if (!existsSync(bundleMd)) continue; + + // Missing locally = needs update + if (!existsSync(localMd)) return false; + + const bundleHash = createHash('sha256').update(readFileSync(bundleMd)).digest('hex'); + const localHash = createHash('sha256').update(readFileSync(localMd)).digest('hex'); + if (bundleHash !== localHash) return false; + } } return true; } diff --git a/package.json b/package.json index e066f93b4..1bcc0bca1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "impeccable", - "version": "2.1.2", + "version": "2.1.3", "author": "Paul Bakaus", "description": "Design skills, commands, and anti-pattern detection for AI coding agents", "keywords": [