Conversation
Greptile SummaryThis PR adds a dedicated test suite ( Key changes:
Confidence Score: 5/5Test-only PR with no production code changes — safe to merge. No logic changes are introduced; the file is purely additive test coverage. All four tests correctly reflect the implementation behaviour. The P2 comment about the malformed-YAML fixture is a robustness suggestion, not a correctness bug. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["loadSkills({ cwd, verbose })"] --> B{skillsPath provided?}
B -- yes --> C[Single custom dir]
B -- no --> D[getDefaultSkillsDirs]
D --> E["~/.claude/skills (priority 1)"]
D --> F["~/.agents/skills (priority 2)"]
D --> G["{cwd}/.claude/skills (priority 3)"]
D --> H["{cwd}/.agents/skills (priority 4)"]
C --> I[discoverSkillsFromDirectory]
E & F & G & H --> I
I --> J{isValidSkillName?}
J -- no --> K["console.warn (verbose)"]
J -- yes --> L{SKILL.md exists?}
L -- no --> M[silent skip]
L -- yes --> N[parseFrontmatter]
N -- null --> O["console.error: Invalid frontmatter"]
N -- ok --> P[SkillFrontmatterSchema.safeParse]
P -- fail --> Q["console.error: Invalid skill frontmatter"]
P -- ok --> R{name matches dirName?}
R -- no --> S["console.error: Name mismatch"]
R -- yes --> T[Add to SkillsMap]
T --> U[Object.assign merge]
U --> V[Return SkillsMap]
Reviews (1): Last reviewed commit: "Add load skills test suite" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Summary
load-skillstest suite that exercises all four default search roots.claude/.agentsdirectoriesTesting
bun run --cwd sdk test src/__tests__/load-skills.test.tsbun run --cwd sdk typecheck