Marketing Skills
Marketing Skills source analysis: the metadata parser is not a full YAML parser
Inspect sync-skills.js with isolated LF, CRLF and multiline fixtures, then explain the difference between metadata extraction and skill validation.
What you will learn
- Literal newline matching makes line endings observable.
- Colon splitting does not implement YAML blocks or nesting.
- Fallback metadata can conceal a partial parse.
Before you start
- Basic Markdown and repository navigation
- An owned page and a factual product brief
Explain the chapter’s workflow boundary and check its evidence or proposed acceptance task.
Key takeaways
- Literal newline matching makes line endings observable.
- Colon splitting does not implement YAML blocks or nesting.
- Fallback metadata can conceal a partial parse.
Trace the parser’s actual contract
parseFrontmatter first matches an opening delimiter followed by a literal newline, captures text through another newline-delimiter pair, then splits it into lines. For each line containing a colon, it trims a key and value and removes matching outer quotes. It does not invoke a YAML library, track indentation or assemble multiline scalar blocks.
We extracted only this inspected pure function into an isolated JavaScript context; the script’s filesystem-writing main routine was not run. A simple LF fixture returned name and description as expected. A CRLF fixture returned an empty object because the initial regular expression did not match that line-ending sequence. This result describes the helper input contract, not a claim that every checkout fails.
Multiline and nesting reveal the boundary
For a fixture using description: | followed by an indented line, the returned description was the literal vertical bar. An indented version under metadata became a top-level version key, while metadata itself became an empty string. These observations follow directly from line-by-line colon splitting; valid YAML semantics are broader than the implementation.
getSkillsWithMetadata falls back to the directory name when no name is parsed and to an empty description when absent. Therefore a skill may still appear in the generated table while its metadata was incompletely understood. A plausible README table is not sufficient evidence that all source frontmatter was correctly parsed. Test the metadata shapes your contributors actually use.
Contain the effect before proposing a repair
A robust maintenance change could normalize line endings and use a parser with an explicit supported schema, then test block scalars and nested metadata. That is a proposed upstream improvement, not a patch we applied to the external repository. Evaluate dependency cost and backward compatibility rather than silently changing an installation on behalf of every user.
The fixture below preserves the three observed cases for readers. Our local test checks those recorded outputs and the arithmetic measurement example in the cost chapter. It does not run upstream CI, an installer or model evaluations. Keeping that boundary explicit makes a small source experiment useful without inflating it into a whole-project test claim.
Implementation steps
- 1
Locate parseFrontmatter in the fixed source.
- 2
Isolate the helper without running main.
- 3
Compare LF, CRLF and block-scalar fixtures.
- 4
Review generated metadata as well as table presence.
Copy-ready example
{"lf":{"name":"sample","description":"hello"},"crlf":{},"blockScalar":{"name":"sample","description":"|","metadata":"","version":"2.1.0"},"upstreamMainExecuted":false}Frequently asked questions
Does this prove all installed skills are broken?
No. It exposes specific parser inputs. Actual behavior depends on file contents, checkout line endings and whether the maintenance script is run.
Did you run the script that rewrites repository files?
No. Only the isolated parseFrontmatter helper was executed with invented input strings.
Sources
- README.mdSource checked 2026-09-08
- LICENSESource checked 2026-09-08
- .claude-plugin/plugin.jsonSource checked 2026-09-08
- .github/scripts/sync-skills.jsSource checked 2026-09-08
- .github/workflows/sync-skills.ymlSource checked 2026-09-08
- .github/workflows/validate-skill.ymlSource checked 2026-09-08
- scripts/sync-partners.mjsSource checked 2026-09-08
- skills/product-marketing/SKILL.mdSource checked 2026-09-08
- skills/ai-seo/SKILL.mdSource checked 2026-09-08
- skills/seo-audit/SKILL.mdSource checked 2026-09-08
- skills/programmatic-seo/SKILL.mdSource checked 2026-09-08
- skills/ai-seo/evals/evals.jsonSource checked 2026-09-08
- tools/PARTNERS.mdSource checked 2026-09-08