Skip to content

fix(local-agent): resolve skill source correctly when SKILL.md name differs from server slug#175

Merged
jeff-r2026 merged 2 commits into
Tencent:mainfrom
m0Nst3r873:worktree-fix-skill-source-resolution
Jul 9, 2026
Merged

fix(local-agent): resolve skill source correctly when SKILL.md name differs from server slug#175
jeff-r2026 merged 2 commits into
Tencent:mainfrom
m0Nst3r873:worktree-fix-skill-source-resolution

Conversation

@m0Nst3r873

Copy link
Copy Markdown
Contributor

Summary

  • Include dir_name (SKILL.md name) in the manifest slug set used by resolveSource
  • Fixes enterprise-distributed skills being incorrectly reported as source: 'local' when SKILL.md name: differs from the server slug

Root Cause

scanSkillsFromDisk uses SKILL.md's name: frontmatter field as the reported slug. However, collectManifestSlugs only collected server slugs (manifest keys). When a skill is installed with dir_name ≠ slug (because SKILL.md name differs from the server slug), resolveSource(name, manifestSlugs) fails to find a match and returns 'local' instead of 'enterprise'.

Test plan

  • Install a skill via ClawPro whose SKILL.md name: differs from the server slug
  • Verify teamai hook-dispatch session-start reports that skill with source: 'enterprise'
  • Skills where name === slug continue to report source: 'enterprise' (no regression)
  • Locally installed skills (not in manifest) still report source: 'local'

🤖 Generated with Claude Code

jaelgeng and others added 2 commits July 9, 2026 16:30
…iffers from server slug

scanSkillsFromDisk uses the SKILL.md `name:` field as the reported slug,
but collectManifestSlugs only collected the server slug (manifest key).
When dir_name ≠ slug (i.e. SKILL.md name differs from the server slug),
resolveSource failed to find the entry and incorrectly returned 'local'
for enterprise-distributed skills.

Include dir_name in the manifest slug set so the lookup succeeds.

--story=1032029153857553

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
flushQueue expects {url, body} entries but the queue file may contain
diagnostic log entries ({at, entry}) written by local-agent's error
logger. These entries have no url/body, causing postJson to fail and
leaving them stuck in the queue forever.

Skip entries missing url or body so they are silently drained.

--story=1032029153857553

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeff-r2026 jeff-r2026 merged commit ae5fb09 into Tencent:main Jul 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants