fix(handler): add .claude/skills/ candidate path for skills.sh import (#792)

Skills stored under .claude/skills/{name}/SKILL.md (the Claude Code
native discovery convention) were not found during skills.sh import,
causing a 502 error. Add this path to the candidate list.

Fixes #777
This commit is contained in:
Bohan Jiang
2026-04-12 23:39:46 +08:00
committed by GitHub
parent 544b9bc971
commit 1ee4e0501a

View File

@@ -646,6 +646,7 @@ func fetchFromSkillsSh(httpClient *http.Client, rawURL string) (*importedSkill,
// Skills can be at different paths depending on the repo structure:
// skills/{name}/SKILL.md (most common)
// .claude/skills/{name}/SKILL.md (Claude Code native discovery)
// plugin/skills/{name}/SKILL.md (e.g. microsoft repos)
// {name}/SKILL.md (skill at repo root level)
defaultBranch := fetchGitHubDefaultBranch(httpClient, owner, repo)
@@ -654,6 +655,7 @@ func fetchFromSkillsSh(httpClient *http.Client, rawURL string) (*importedSkill,
candidatePaths := []string{
"skills/" + skillName,
".claude/skills/" + skillName,
"plugin/skills/" + skillName,
skillName,
}