Render Shell Blocks • AI Agent SDK
render_shell_blocks: Render “!`cmd` “ and ““ “`! “ blocks inside a skill body.
render_shell_blocks
Function
</div>
This function is defined in the shell_render module.
Render `!cmd and “ `! ` blocks inside a skill body.
Signature
def render_shell_blocks(body: str, enabled: bool, shell: str, timeout: int, cwd: Optional[str]) -> strParameters
ParamField
strSKILL.md body (post-substitution).
ParamField
boolMaster switch. When False, every block is replaced with `[shell execution disabled]`. Defaults to False.
ParamField
str`bash (default) or powershell`.
ParamField
intPer-command timeout in seconds.
ParamField
Optional[str]Working directory for commands (typically the skill dir).
Returns
ResponseField
strBody with shell placeholders resolved.
Uses
_INLINE_RE.sub_FENCED_RE.subm.group
Used By
Source
View on GitHubpraisonaiagents/skills/shell_render.py at line 49