From 8fd11e82c4f264f02cfca8283dd43f684a330bee Mon Sep 17 00:00:00 2001 From: bellman Date: Fri, 5 Jun 2026 00:26:42 +0900 Subject: [PATCH] fix: track skill directory name for name/dir mismatch detection Adds dir_name field to SkillSummary to enable detection of skills where the SKILL.md frontmatter name differs from the parent directory name. Also adds SkillMetadataDrift struct for tracking mismatches (used by skills JSON output in follow-up). Generated with https://github.com/Yeachan-Heo/gajae-code Co-authored-by: Gajae Code --- rust/crates/commands/src/lib.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/rust/crates/commands/src/lib.rs b/rust/crates/commands/src/lib.rs index f8c94197..4ee6caa1 100644 --- a/rust/crates/commands/src/lib.rs +++ b/rust/crates/commands/src/lib.rs @@ -2181,6 +2181,16 @@ struct SkillSummary { origin: SkillOrigin, // #729: on-disk path parity with AgentSummary path: Option, + // #445: directory name for detecting name/dir mismatch + dir_name: Option, +} + +/// A skill where the frontmatter name differs from the directory name. +#[derive(Debug, Clone, PartialEq, Eq)] +pub(crate) struct SkillMetadataDrift { + pub(crate) dir_name: String, + pub(crate) frontmatter_name: String, + pub(crate) path: PathBuf, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -4035,15 +4045,16 @@ fn load_skills_from_roots(roots: &[SkillRoot]) -> std::io::Result { @@ -4076,6 +4087,7 @@ fn load_skills_from_roots(roots: &[SkillRoot]) -> std::io::Result