- credential_files: _walk_skill_tree unifies the os.walk/EXCLUDED_SKILL_DIRS/symlink-skip
loop shared by _safe_skills_path and iter_skills_files (drops _iter_syncable_files);
_remap_cache_path unifies map_cache_path_to_container/from_agent_visible_cache_path;
_iter_regular_files inlined into its only caller iter_cache_files.
- arg_coercion: _SCALAR_COERCERS dispatch table replaces the if/elif type ladder in
_coerce_value; identity-preserving normalize helpers compacted. Logger name and
every message text unchanged.
- blueprints: frontmatter split, job-spec and export compacted; __all__ unchanged.
The previous commit fixes the canonical agent/skill_utils.parse_frontmatter.
Six more modules reimplement the '---' fence check locally and had the
same bug:
- tools/skill_manager_tool.py _validate_frontmatter — rejected BOM'd
skill_manage create/edit content outright
- tools/skills_hub.py GitHubSource._parse_frontmatter_quick and
OptionalSkillSource._parse_frontmatter — hub browse/install metadata
- hermes_cli/skills_hub.py — local skill install validation
- gateway/run.py — skill slug discovery for disabled-skill hints
- agent/prompt_builder.py _strip_yaml_frontmatter — BOM'd context files
(AGENTS.md) leaked raw frontmatter into the system prompt
- tools/blueprints.py _split_frontmatter — str.lstrip() does not strip
U+FEFF (not whitespace), so the existing lstrip never covered it
Sibling-surface regression tests added.
Bug class also fixed upstream in cline/cline#12218 (found by the weekly
Cline PR scout).