mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
The skill listing only scanned ~/.agents/skills and ~/.claude/skills for user-level skills, ignoring ~/.codex/skills where Codex users commonly store their skills. Add ~/.codex/skills to getUserSkillsRoots() so these skills appear in the web UI $ autocomplete. Hidden directories (starting with .) inside the skills root are still skipped (e.g., .system/). via [HAPI](https://hapi.run) Co-authored-by: HAPI <noreply@hapi.run>
This commit is contained in:
@@ -69,14 +69,15 @@ describe('listSkills', () => {
|
||||
expect(skills.find((s) => s.name === 'alpha')?.description).toBe('Alpha from agents')
|
||||
})
|
||||
|
||||
it('ignores legacy ~/.codex skills', async () => {
|
||||
it('lists user skills from ~/.codex/skills', async () => {
|
||||
await writeSkill(join(homeDir, '.agents', 'skills', 'amis'), 'amis', 'AMIS guide')
|
||||
await writeSkill(join(homeDir, '.codex', 'skills', 'hello-agents'), 'helloagents', 'Main skill')
|
||||
// Hidden directories (starting with .) are skipped
|
||||
await writeSkill(join(homeDir, '.codex', 'skills', '.system', 'skill-creator'), 'skill-creator', 'Create skills')
|
||||
|
||||
const skills = await listSkills()
|
||||
|
||||
expect(skills.map((skill) => skill.name)).toEqual(['amis'])
|
||||
expect(skills.map((skill) => skill.name)).toEqual(['amis', 'helloagents'])
|
||||
})
|
||||
|
||||
it('falls back to directory name when frontmatter is missing', async () => {
|
||||
|
||||
@@ -26,6 +26,7 @@ function getUserSkillsRoots(): string[] {
|
||||
return [
|
||||
join(home, '.agents', 'skills'),
|
||||
join(home, '.claude', 'skills'),
|
||||
join(home, '.codex', 'skills'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user