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) <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-04-10 10:58:17 -07:00
co-authored by Claude Opus 4.6
parent 2af435d2a5
commit 5071d85a4b
2 changed files with 20 additions and 5 deletions
+19 -4
View File
@@ -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;
}
+1 -1
View File
@@ -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": [