how to reuse anim code or blueprint in difference characters with difference skeletons

​​​​​with same skeleton can use sub instance to reuse anim module. but now, i have some characters with difference skeletons, all of them have foot IK and locomotion state machines. if i want to change the logic, i must change everyone. is there a way to change once?