I've sourced out some code I use in most of my mods because Factorio 2.0 made so many breaking changes that it's easier to maintain things in one central location.
For now, the mod contains mainly assertions (always loaded) and debugging stuff (loaded when debugging mode is active). Additional modules, e.g. for dealing with prototypes in the data stage, can be included separately, but that's still work in progress.