-
-
Notifications
You must be signed in to change notification settings - Fork 953
Description
Summary
skills/PAI/Tools/CreateDynamicCore.ts generates skills/PAI/SKILL.md with an HTML build comment before the YAML frontmatter block. This causes GenerateSkillIndex.ts to skip the PAI/CORE entry entirely when building skill-index.json.
Root Cause
CreateDynamicCore.ts outputs:
<!--
🔨 GENERATED FILE - Do not edit directly
Edit: ~/.claude/skills/PAI/Components/
Build: bun ~/.claude/skills/PAI/Tools/CreateDynamicCore.ts
Built: 31 January 2026 20:28:06
-->
---
name: CORE
description: Personal AI Infrastructure core...
---GenerateSkillIndex.ts line 80 uses:
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);The ^ anchor requires --- as the first characters in the file. The HTML comment pushes frontmatter down, so the regex never matches.
Secondary issue: The frontmatter says name: CORE but ALWAYS_LOADED_SKILLS (line 38 in GenerateSkillIndex.ts) lists 'PAI', so even if parsed, the tier classification would be wrong.
Impact
skill-index.jsonis missing the PAI/CORE entry- 22 skills reference
SkillSearch()which queries this index - The core system skill is invisible to dynamic skill discovery
Suggested Fix
In CreateDynamicCore.ts, move the HTML build comment after the frontmatter:
---
name: PAI
description: Personal AI Infrastructure core...
---
<!--
🔨 GENERATED FILE - Do not edit directly
...
-->Or alternatively, update the regex in GenerateSkillIndex.ts to skip leading HTML comments before matching frontmatter.
Also update name: CORE → name: PAI to match the v2.5 directory rename and ALWAYS_LOADED_SKILLS array.
Related
- .claude/skills/skill-index.json missing in PAI 2.4 and 2.5 which hurts Skill discovery #535 —
skill-index.jsonmissing in PAI 2.4 and 2.5 - PR feat: Add skill-index.json for deferred skill loading (75% context savings) #563 — Adds skill-index.json for deferred skill loading
- PR docs: Update CORE skill references to PAI skill in v2.5 #557 — Updates CORE skill references to PAI in v2.5
Environment
- Linux/WSL2