> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Format Skill For Prompt • AI Agent SDK

> format_skill_for_prompt: Format a single skill as XML for system prompt.

# format\_skill\_for\_prompt

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**prompt**](../modules/prompt) module.

Format a single skill as XML for system prompt.

The `description` is truncated at 1,536 characters (G22) to keep the
system-prompt listing bounded even with large skill libraries.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def format_skill_for_prompt(skill: SkillMetadata) -> str
```

## Parameters

<ParamField query="skill" type="SkillMetadata" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  The result of the operation.
</ResponseField>

## Uses

* `html.escape`

## Used By

* [`generate_skills_xml`](../functions/generate_skills_xml)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/prompt.py#L24">
  `praisonaiagents/skills/prompt.py` at line 24
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Skills Concept" icon="wand-magic-sparkles" href="/docs/docs/concepts/skills" />

  <Card title="Skills Feature" icon="star" href="/docs/docs/features/skills" />
</CardGroup>
