There was a script compat2core.py which resides in archive now which converted compat scripts to core or gives usefull hints for conversion. See also https://www.mediawiki.org/wiki/Manual:Pywikibot/compat-to-core_conversion
Now we still have deprecated code parts which are to be replaced. Create a script to convert deprecated code parts or give reliable hints for foreign script to keep them up to date.