> ## 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.

# Render Skill Body • AI Agent SDK

> render_skill_body: Render a SKILL.md body with placeholders substituted.

# render\_skill\_body

Function

> This function is defined in the [**substitution**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/substitution.md) module.

Render a SKILL.md body with placeholders substituted.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def render_skill_body(body: str, raw_args: str, skill_dir: Optional[str], session_id: Optional[str]) -> str
```

## Parameters

**body** `str` *required*

The markdown body (post-frontmatter) of a SKILL.md file.

**raw\_args** `str` (default: '')

The raw argument string after the skill name (e.g. when a user types `/deploy staging prod`, `raw_args="staging prod"`).

**skill\_dir** `Optional[str]`

Absolute path to the skill's directory.

**session\_id** `Optional[str]`

Current session identifier for logging/correlation.

### Returns

**Returns** `str`

Rendered body ready to feed to the LLM.

## Uses

* `_INDEXED_ARG_RE.search`
* `_SHORT_ARG_RE.search`
* `m.group`
* `_INDEXED_ARG_RE.sub`
* `_SHORT_ARG_RE.sub`
* `out.rstrip`

## Used By

* [`SkillManager.invoke`](../functions/SkillManager-invoke)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/substitution.py#L37)
>
> `praisonaiagents/skills/substitution.py` at line 37

***

## Related Documentation

> [card] [Skills Concept](https://praison.ai/docs/docs/concepts/skills)

> [card] [Skills Feature](https://praison.ai/docs/docs/features/skills)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.