Skip to content

ant_ai.skills.presenter

SkillPresenter

Bases: Protocol

Protocol for formatting skills into an agent's system prompt.

Source code in src/ant_ai/skills/presenter.py
16
17
18
19
class SkillPresenter(Protocol):
    """Protocol for formatting skills into an agent's system prompt."""

    def system_prompt(self, skills: list[AgentSkill]) -> str: ...

MarkdownSkillPresenter

Injects skills as a Markdown block in the system prompt.

The agent activates a skill by reading its SKILL.md via its native file tool — no custom activation tool is registered.

Source code in src/ant_ai/skills/presenter.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class MarkdownSkillPresenter:
    """Injects skills as a Markdown block in the system prompt.

    The agent activates a skill by reading its SKILL.md via its native file tool — no custom activation tool is registered.
    """

    def system_prompt(self, skills: list[AgentSkill]) -> str:
        if not skills:
            return ""
        lines: list[str] = [
            "## Skills System",
            "",
            "You have access to a skills library that provides specialized capabilities and domain knowledge.",
            "",
            "**Available Skills:**",
            "",
        ]
        for skill in skills:
            skill_md: Path = skill.skill_dir / "SKILL.md"
            lines.append(f"- **{skill.name}**: {skill.description}")
            if skill.allowed_tools:
                lines.append(f"  -> Allowed tools: {', '.join(skill.allowed_tools)}")
            lines.append(
                f"  -> Read `{skill_md}` for full instructions (pass `limit=1000`)"
            )
        lines += ["", _HOW_TO_USE]
        return "\n".join(lines)