Read a skill's ``SKILL.md`` body. Call this once you've decided a skill matches the user's request. The returned text is the full skill instructions (frontmatter stripped). Follow it as your working method and write outputs via the ``write_file`` tool
(name: str)
| 173 | |
| 174 | @function_tool |
| 175 | def read_skill(name: str) -> str: |
| 176 | """Read a skill's ``SKILL.md`` body. |
| 177 | |
| 178 | Call this once you've decided a skill matches the user's |
| 179 | request. The returned text is the full skill instructions |
| 180 | (frontmatter stripped). Follow it as your working method |
| 181 | and write outputs via the ``write_file`` tool. |
| 182 | |
| 183 | Args: |
| 184 | name: skill name as listed by ``list_skills``. |
| 185 | """ |
| 186 | entry = skill_index.get(name) |
| 187 | if entry is None: |
| 188 | return f"Unknown skill: {name!r}. Call list_skills() to see available skills." |
| 189 | md_path = Path(entry["path"]) / "SKILL.md" |
| 190 | try: |
| 191 | text = md_path.read_text(encoding="utf-8") |
| 192 | except OSError as exc: |
| 193 | return f"Could not read {md_path}: {exc}" |
| 194 | # Strip frontmatter, return body only. |
| 195 | from openkb.agent.skills import _parse_frontmatter |
| 196 | |
| 197 | _, body = _parse_frontmatter(text) |
| 198 | return body |
| 199 | |
| 200 | extra_tools.extend([list_skills, read_skill]) |
| 201 |
nothing calls this directly
no test coverage detected