Description
When editing a skill's SKILL.md and adding a sub-skill reference (e.g., //skill:other_skill), the file explorer's skill tree does not update to show the new sub-skill relationship. It only updates after creating a new skill or other unrelated action.
Root Cause
useSyncSkill calls saveSkill() (server save) and updateSkillCache() (local file cache), but neither triggers a refresh of skills: SkillSummary[] in ProjectStore. The subSkills field in SkillSummary is computed server-side by parsing //skill:NAME patterns from SKILL.md. The skill list only refreshes on loadSkills(), which is called during project load or after skill create/delete — not after skill content save.
Fix Required
After saveSkill() completes in useSyncSkill, call loadSkills(projectId) to refresh the summary list (including subSkills). This adds a lightweight GET request (skill list, not file contents) after each debounced save.
Files Involved
packages/ui/src/hooks/useSyncSkill.ts — add loadSkills call after saveSkill (line 35)
packages/ui/src/context/ProjectStore.tsx — loadSkills already exposed
Description
When editing a skill's SKILL.md and adding a sub-skill reference (e.g.,
//skill:other_skill), the file explorer's skill tree does not update to show the new sub-skill relationship. It only updates after creating a new skill or other unrelated action.Root Cause
useSyncSkillcallssaveSkill()(server save) andupdateSkillCache()(local file cache), but neither triggers a refresh ofskills: SkillSummary[]in ProjectStore. ThesubSkillsfield inSkillSummaryis computed server-side by parsing//skill:NAMEpatterns from SKILL.md. The skill list only refreshes onloadSkills(), which is called during project load or after skill create/delete — not after skill content save.Fix Required
After
saveSkill()completes inuseSyncSkill, callloadSkills(projectId)to refresh the summary list (includingsubSkills). This adds a lightweight GET request (skill list, not file contents) after each debounced save.Files Involved
packages/ui/src/hooks/useSyncSkill.ts— addloadSkillscall aftersaveSkill(line 35)packages/ui/src/context/ProjectStore.tsx—loadSkillsalready exposed