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

# substitution • AI Agent SDK

> Skill body substitution engine.

# substitution

AI Agent

Skill body substitution engine.

Replaces `$ARGUMENTS`, `$ARGUMENTS[N]`, `$N`, `${PRAISON_SKILL_DIR}`, and
`${PRAISON_SESSION_ID}` placeholders inside a SKILL.md body before it is
sent to the LLM.

Compatible aliases: `${CLAUDE_SKILL_DIR}` and `${CLAUDE_SESSION_ID}` mirror
the Claude Code variables so existing Claude Code skills work unchanged.

This module is pure Python and has no optional dependencies.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents.skills import substitution
```

## Functions

> [card] [render\_skill\_body()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/render_skill_body.md)
>
> Render a SKILL.md body with placeholders substituted.

### Constants

| Name | Value |
| - | - |
| `_INDEXED_ARG_RE` | `re.compile('\\$ARGUMENTS\\[(\\d+)\\]')` |
| `_SHORT_ARG_RE` | `re.compile('(?&lt;![A-Za-z0-9_])\\$(\\d+)\\b')` |


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