diff --git a/pipeline_core/skill_loader.py b/pipeline_core/skill_loader.py index fbf7a60..5ee78fb 100644 --- a/pipeline_core/skill_loader.py +++ b/pipeline_core/skill_loader.py @@ -102,10 +102,16 @@ class Skill: def to_prompt_block(self) -> str: scope_tag = SCOPE_TAG.get(self.scope, self.scope) + body = self.content + # 剥离 frontmatter(--- 之间),只保留正文,避免 name/description 与目录层重复 + if body.startswith("---"): + end = body.find("---", 3) + if end != -1: + body = body[end + 3:].strip() return f"""## [{scope_tag}] {self.name} {self.description} -{self.content} +{body} """