I have a script called clear_cfd_templates.py that I wrote over half a decade ago and have been running actively on the English Wikipedia ever since. It looks at the CFD Retain working page and clears the CFD templates from category pages whose CFD decision was "Keep". This is one of the few remaining scripts I have left that isn't running in -core. The really strange thing is that I can't find any evidence of it having ever existing in the -core git logs, even though it appears to have code incorporated into it from other contributors. Perhaps it didn't make it in the great transition from SVN?
I'm thinking of, rather than doing a straight port, first taking the existing cfd.py script and adding a mode flag to it (similar to how category.py can be called with add/remove/move modes), and then adding clearing of CFD templates as a new mode. The existing mode can be called process and the new mode can be called retain.