mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-11 09:25:35 +08:00
fix(cli): quote the skill description so strict YAML readers accept it (#1554)
The installed SKILL.md carried an unquoted `description` whose value contains "Triggers on: ". In YAML a colon-space inside an unquoted scalar is a nested-mapping indicator, so strict readers — js-yaml's `load`, the frontmatter parser in `npx skills` — reject the whole document. The skill does not load wrongly; it does not load at all, and nothing in the install output says why. Quoting the scalar fixes it without touching a word of the text. The test checks the RULE rather than this string: for every skill, any frontmatter value containing ": " must be quoted. Pinning the current wording would let the next skill someone adds reintroduce exactly this bug. Verified by reverting the fix — the test goes red, and green again with it restored. Reported by @xezzon. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
+7
-2
@@ -1255,12 +1255,17 @@ int cbm_replace_binary(const char *path, const unsigned char *data, int len, int
|
||||
static const char skill_content[] =
|
||||
"---\n"
|
||||
"name: codebase-memory\n"
|
||||
"description: Use the codebase knowledge graph for structural code queries. "
|
||||
/* #1554: the value contains "Triggers on: " — a colon-space, which YAML
|
||||
* reads as a nested-mapping indicator inside an unquoted scalar. Strict
|
||||
* parsers (js-yaml's load, the frontmatter reader in `npx skills`) reject
|
||||
* the whole file, so the skill silently fails to load rather than loading
|
||||
* wrongly. Quoting the scalar is the fix; the text itself is unchanged. */
|
||||
"description: \"Use the codebase knowledge graph for structural code queries. "
|
||||
"Triggers on: explore the codebase, understand the architecture, what functions exist, "
|
||||
"show me the structure, who calls this function, what does X call, trace the call chain, "
|
||||
"find callers of, show dependencies, impact analysis, dead code, unused functions, "
|
||||
"high fan-out, refactor candidates, code quality audit, graph query syntax, "
|
||||
"Cypher query examples, edge types, how to use search_graph.\n"
|
||||
"Cypher query examples, edge types, how to use search_graph.\"\n"
|
||||
"---\n"
|
||||
"\n"
|
||||
"# Codebase Memory — Knowledge Graph Tools\n"
|
||||
|
||||
Reference in New Issue
Block a user