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

<Badge color="blue">AI Agent</Badge>

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

<CardGroup cols={2}>
  <Card title="render_skill_body()" icon="function" href="../functions/render_skill_body">
    Render a SKILL.md body with placeholders substituted.
  </Card>
</CardGroup>

### Constants

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