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
from praisonaiagents.skills import substitution

Functions

Constants

NameValue
_INDEXED_ARG_REre.compile('\\$ARGUMENTS\\[(\\d+)\\]')
_SHORT_ARG_REre.compile('(?<![A-Za-z0-9_])\\$(\\d+)\\b')