Render the skill catalog as a compact text block for the agent.
(skills: list[dict[str, str]])
| 230 | |
| 231 | |
| 232 | def _format_skill_list(skills: list[dict[str, str]]) -> str: |
| 233 | """Render the skill catalog as a compact text block for the agent.""" |
| 234 | if not skills: |
| 235 | return "No skills installed." |
| 236 | lines = [f"{len(skills)} skill(s) available:\n"] |
| 237 | for s in skills: |
| 238 | lines.append(f"- {s['name']}") |
| 239 | # Indent description; keep it one paragraph so the agent reads it fast. |
| 240 | desc = " ".join(s["description"].split()) |
| 241 | lines.append(f" {desc}") |
| 242 | lines.append("\nTo use a skill, call read_skill(name) and follow its instructions.") |
| 243 | return "\n".join(lines) |
| 244 | |
| 245 | |
| 246 | async def run_query( |