Problem
checkName in src/core/frontmatter.ts warns missing required field 'name'
for any entity whose frontmatter omits name:. It applies the same rule to
skills, agents, and commands.
Claude Code slash commands are named by filename, not frontmatter — a
commands/deploy.md with only description: is completely valid and is how
most commands in the wild are written. skilltree's own scaffolder agrees that
the name is path-derived: entityNameFromPath() in src/core/entity-type.ts
falls back to the filename stem precisely because "commands and many agents are
named by file, not by frontmatter".
So check warns about a correct file, and --strict exits 1 on it.
Relationship to #159 / #160
Same class of bug: the linter being stricter than the runtime it lints for.
Those two were hard errors on unknown keys and are fixed in #162; this one is a
warning, so it only bites under --strict — which is why it wasn't reported
alongside them. It's the remaining instance of the pattern.
Why it's now easy to fix
#162 threads the resolved entityType into validateFrontmatter. Before that
change the validator had no way to know it was looking at a command. Now it
does, and checkName is the one check that should consume it but doesn't:
// src/core/frontmatter.ts — validateFrontmatter
...checkName(fm, context.entityName), // <- entityType is in scope, unused here
Proposed fix
Make name: optional for type: command — either skip the missing-field
warning entirely, or keep validating it only when present (so a name: that
disagrees with the filename is still reported, which is the genuinely useful
half of this check).
Worth deciding the same question for agents, where name: is conventional but
also path-derivable.
Found while working on #159/#160.
Problem
checkNameinsrc/core/frontmatter.tswarnsmissing required field 'name'for any entity whose frontmatter omits
name:. It applies the same rule toskills, agents, and commands.
Claude Code slash commands are named by filename, not frontmatter — a
commands/deploy.mdwith onlydescription:is completely valid and is howmost commands in the wild are written.
skilltree's own scaffolder agrees thatthe name is path-derived:
entityNameFromPath()insrc/core/entity-type.tsfalls back to the filename stem precisely because "commands and many agents are
named by file, not by frontmatter".
So
checkwarns about a correct file, and--strictexits 1 on it.Relationship to #159 / #160
Same class of bug: the linter being stricter than the runtime it lints for.
Those two were hard errors on unknown keys and are fixed in #162; this one is a
warning, so it only bites under
--strict— which is why it wasn't reportedalongside them. It's the remaining instance of the pattern.
Why it's now easy to fix
#162 threads the resolved
entityTypeintovalidateFrontmatter. Before thatchange the validator had no way to know it was looking at a command. Now it
does, and
checkNameis the one check that should consume it but doesn't:Proposed fix
Make
name:optional fortype: command— either skip the missing-fieldwarning entirely, or keep validating it only when present (so a
name:thatdisagrees with the filename is still reported, which is the genuinely useful
half of this check).
Worth deciding the same question for agents, where
name:is conventional butalso path-derivable.
Found while working on #159/#160.