> ## 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 Shell Blocks • AI Agent SDK

> render_shell_blocks: Render ``!`cmd` `` and ```` ```! `` blocks inside a skill body.

# render\_shell\_blocks

Function

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

Render ``!`cmd` `` and \`\`\`\` \`\`\`! \`\` blocks inside a skill body.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def render_shell_blocks(body: str, enabled: bool, shell: str, timeout: int, cwd: Optional[str]) -> str
```

## Parameters

**body** `str` *required*

SKILL.md body (post-substitution).

**enabled** `bool` (default: False)

Master switch. When False, every block is replaced with `[shell execution disabled]`. Defaults to False.

**shell** `str` (default: 'bash')

`bash` (default) or `powershell`.

**timeout** `int` (default: 15)

Per-command timeout in seconds.

**cwd** `Optional[str]`

Working directory for commands (typically the skill dir).

### Returns

**Returns** `str`

Body with shell placeholders resolved.

## Uses

* `_INLINE_RE.sub`
* `_FENCED_RE.sub`
* `m.group`

## Used By

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

## Source

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


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