Arguments are referenced as part of the factoid name itself, and get turned into bits of regex when parsed.
<Raws> infobot, no, starspin $1 is <action> swallows $1 in a violent, ethereal whorl of galactic stardust!
<infobot> Raws: okay
<Raws> ~starspin Mr_Rabies
*infobot swallows Mr_Rabies in a violent, ethereal whorl of galactic stardust!
The literal value of the factoid can then be displayed by prefixing the name with cmd:
and substituting (.*?)
for your dollar-sign argument(s):