Skip to content

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.

fix(readiness-core): deduplicate scanned skills to avoid double-counting score

pxmpsf211307ab0e8
diff --git a/tools/readiness-core/src/index.ts b/tools/readiness-core/src/index.ts
index 3f2181e..739c999 100644
--- a/tools/readiness-core/src/index.ts
+++ b/tools/readiness-core/src/index.ts
@@ -36,14 +36,14 @@ export async function scanSkillDirectories(root: string): Promise<string[]> {
path.join(root, '.codex', 'skills'),
path.join(root, 'skills'),
];
- const found: string[] = [];
+ const foundSet = new Set<string>();
for (const dir of dirs) {
if (!(await fileExists(dir))) continue;
const entries = await readdir(dir, { withFileTypes: true });
for (const e of entries) {
- if (e.isDirectory()) found.push(e.name);
- if (e.isFile() && e.name === 'SKILL.md') found.push('root-skill');
+ if (e.isDirectory()) foundSet.add(e.name);
+ if (e.isFile() && e.name === 'SKILL.md') foundSet.add('root-skill');
}
}
- return found;
+ return [...foundSet];
}