Skip to content

Commit 532fd5c

Browse files
[Docs] Strip trailing whitespace from skill description
Remove trailing newline from description field in skills index.json to match expected format. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent ba40d6c commit 532fd5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/docs/hooks.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ def _write_well_known_skills(config, site_dir):
189189
shutil.copy2(skill_src, os.path.join(site_dir, "skill.md"))
190190

191191
index_path = os.path.join(site_dir, WELL_KNOWN_SKILLS_DIR, "index.json")
192-
index = {"skills": [{"name": name, "description": description[:1024], "files": ["skill.md"]}]}
192+
index = {
193+
"skills": [
194+
{"name": name, "description": description.strip()[:1024], "files": ["skill.md"]}
195+
]
196+
}
193197
with open(index_path, "w", encoding="utf-8") as f:
194198
json.dump(index, f, indent=2)
195199

0 commit comments

Comments
 (0)