skills: align homepage frontmatter validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
zwtang119 2026-03-15 22:19:38 +08:00
parent 85870fbbad
commit 20f626e9c1
3 changed files with 26 additions and 2 deletions

View File

@ -1,7 +1,8 @@
---
name: attractor
description: Build, extend, and debug Attractor implementations from the strongdm/attractor specs. Use when work involves DOT pipeline DSL parsing, graph execution traversal, node handlers, checkpoint/resume state, human-in-the-loop gates, condition expressions, model stylesheet rules, or integrating coding-agent-loop/unified-llm backends.
metadata: { "openclaw": { "emoji": "🧲", "homepage": "https://github.com/strongdm/attractor" } }
homepage: https://github.com/strongdm/attractor
metadata: { "openclaw": { "emoji": "🧲" } }
---
# Attractor

View File

@ -95,7 +95,14 @@ def validate_skill(skill_path):
"Invalid YAML in frontmatter: unsupported syntax without PyYAML installed",
)
allowed_properties = {"name", "description", "license", "allowed-tools", "metadata"}
allowed_properties = {
"name",
"description",
"homepage",
"license",
"allowed-tools",
"metadata",
}
unexpected_keys = set(frontmatter.keys()) - allowed_properties
if unexpected_keys:

View File

@ -67,6 +67,22 @@ metadata: |
self.assertTrue(valid, message)
def test_accepts_homepage_frontmatter_key(self):
skill_dir = self.temp_dir / "homepage-skill"
skill_dir.mkdir(parents=True, exist_ok=True)
content = """---
name: homepage-skill
description: Supports homepage
homepage: https://example.com
---
# Skill
"""
(skill_dir / "SKILL.md").write_text(content, encoding="utf-8")
valid, message = quick_validate.validate_skill(skill_dir)
self.assertTrue(valid, message)
if __name__ == "__main__":
main()