- Implemented a pre-registration validation in SkillService.add_skill() to ensure all skills listed in the includes field are already registered in self._skills before accepting the new skill registration. This prevents registering a skill that depends on non-existent skills.
- The validation applies to both the initial add and when update=True (re-registration), ensuring dependencies are consistently enforced across both creation and update flows.
- If any included skills are missing, a clear ValueError is raised listing all missing skill names with guidance to register them first, providing complete visibility rather than failing on the first missing item.
- Added new Behave feature file features/skill_add_include_validation.feature with 8 scenarios covering: single missing include, multiple missing includes, partial includes, all includes registered (success), update with missing include, and service-level assertions. Also added step definitions in features/steps/skill_add_include_validation_steps.py.
- Updated features/skill_cli.feature to pre-register local/file-reader in scenarios that use the full skill YAML (which includes local/file-reader) to reflect the new validation behavior.
- Updated features/steps/skill_cli_coverage_r3_steps.py to pre-register local/new-include in the update-with-different-includes scenario to align with the updated validation flow.
- Rationale and design decisions:
- Validation is placed in the service layer (SkillService.add_skill()) rather than the CLI layer to ensure consistent enforcement regardless of how the service is invoked.
- The error message reports all missing includes at once for better user guidance and faster remediation.
- Tests that relied on the full skill YAML were updated to pre-register dependencies to accurately reflect the validation changes and maintain test integrity.
ISSUES CLOSED: #2555
Add 19 behave scenarios covering uncovered paths in skill_service.py
and cli/commands/skill.py to bring coverage above the 97% threshold:
- show with includes, MCP servers, agent_skills, inline tools, Referenced By
- tools with mixed MCP/inline sources
- list with non-local namespaces
- remove without --yes (abort path)
- update with dependent skills (Affected Actors panel)
- service edge cases: skill_count, empty names, source filtering, no config_path
- add with missing-description YAML (validation failure)