To Prompt • AI Agent SDK
to_prompt: Generate prompt XML from skill directories.
to_prompt
Function
</div>
This function is defined in the prompt module.
Generate prompt XML from skill directories.
This is the main entry point for generating the <available_skills> block to inject into agent system prompts.
Signature
def to_prompt(skill_dirs: List[Path]) -> strParameters
ParamField
List[Path]List of paths to skill directories
Returns
ResponseField
strXML string with <available_skills> block
Uses
Pathskill_dir.existsskill_dir.is_dirread_propertiesSkillMetadata.from_propertiesgenerate_skills_xml
Used By
Source
View on GitHubpraisonaiagents/skills/prompt.py at line 76