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
from praisonaiagents.skills import substitutionFunctions
Constants
| Name | Value |
|---|---|
_INDEXED_ARG_RE | re.compile('\\$ARGUMENTS\\[(\\d+)\\]') |
_SHORT_ARG_RE | re.compile('(?<![A-Za-z0-9_])\\$(\\d+)\\b') |