Add autorun script to rig

So I’ve seen that some rigs like the Cloud rig that it has a script that autoruns every time the blend file is opened. Also, when the rig is linked, the script comes with it. And since I have a rig with a python addon, I want to add functionality just like that. But I don’t know how to do so.

I see that the rig uses a custom property, but I didn’t understand it.
blender_5n7RHo3CVS
It has this line on the value. What does this mean?
<bpy_struct, Text("cloudrig.py") at 0x0000014375FF3408>