ai-devkit
ai-devkit copied to clipboard
addSkill() crashes when skills is an object with registries field
When .ai-devkit.json has registries configured in the nested format:
{
"skills": {
"registries": {
"custom/repo": "https://github.com/custom/repo.git"
}
}
}
Running ai-devkit skill add
const skills = config.skills || [];
skills.some(...) // crashes — .some() doesn't exist on plain objects
Root cause: getSkillRegistries() handles both array and object shapes, but addSkill() does not. The DevKitConfig type only defines skills?: ConfigSkill[], ignoring the object-with-registries shape.
Expected: Installing a skill should work regardless of whether skills is an array or an object with a registries field.
Fixed in https://github.com/codeaholicguy/ai-devkit/commit/afb847a3a2d2d4497ead5b6249f82a33f59c6943