Render Skill Body • AI Agent SDK
render_skill_body: Render a SKILL.md body with placeholders substituted.
render_skill_body
Function
</div>
This function is defined in the substitution module.
Render a SKILL.md body with placeholders substituted.
Signature
def render_skill_body(body: str, raw_args: str, skill_dir: Optional[str], session_id: Optional[str]) -> strParameters
ParamField
strThe markdown body (post-frontmatter) of a SKILL.md file.
ParamField
strThe raw argument string after the skill name (e.g. when a user types `/deploy staging prod, raw_args="staging prod"`).
ParamField
Optional[str]Absolute path to the skill’s directory.
ParamField
Optional[str]Current session identifier for logging/correlation.
Returns
ResponseField
strRendered body ready to feed to the LLM.
Uses
_INDEXED_ARG_RE.search_SHORT_ARG_RE.searchm.group_INDEXED_ARG_RE.sub_SHORT_ARG_RE.subout.rstrip
Used By
Source
View on GitHubpraisonaiagents/skills/substitution.py at line 37