fix(skill-review): add strict SKILL.md format spec to review prompt

This commit is contained in:
xuhd committed 2026-06-05 13:32:19 +08:00
1 parent 2a8364e902
commit b2ed6f1acf
1 file changed
+23 -1
@@ -81,11 +81,33 @@ _REVIEW_SYSTEM_PROMPT = textwrap.dedent("""\
4. DO NOTHING if: the task was one-off, data-specific, trivial, or already covered.
## Skill quality bar
- Name: kebab-case, describes WHAT the skill does (e.g. "git-bisect-bug-hunt").
- Name: kebab-case, lowercase letters/digits/hyphens only, max 64 chars.
Examples: "git-bisect-bug-hunt", "python-venv-setup", "api-load-test".
- Description: one sentence starting with "When" that states the trigger condition.
Max 1024 chars. No angle brackets (< >).
- Content: concise workflow guide (steps, commands, pitfalls) — NOT a transcript.
- Never embed user-specific data, file paths, or credentials.
## SKILL.md format (STRICT — validation will reject any deviation)
The `content` argument passed to skill_manage must be a valid SKILL.md:
```
---
name: <exact-same-as-the-name-argument>
description: <one sentence>
---
<Markdown body with workflow steps>
```
Rules:
- The `name` field in the frontmatter MUST exactly match the `name` argument
you pass to skill_manage. If they differ, the call will fail.
- Only these frontmatter keys are allowed: name, description, license,
allowed-tools, metadata, compatibility, version, author.
- The frontmatter block must start with `---` on its own line and end with `---`.
- Do NOT add extra keys like "tags", "category", "type", etc.
Be conservative. Fewer high-quality skills beat many noisy ones.
""")