wonder about that "automatically" business. In El Capitan, it supposedly Repairs Permissions "automatically" (and thus why Apple left that feature out of the version of Disk Utility in El Capitan), but every time I use Onyx to do that, on both of my Macs, some stuff does need to be repaired. And, I need to run Onyx twice to complete the repair.
There is no unique
executable code in OnyX. Like many other utilities, such as Cocktail, TinkerTool System, and Apple's Disk Utility, OnyX is a GUI front end for various Unix commands included in OS X's underlying Unix kernel. In fact
the main reason for being very careful that the OnyX version corresponds to the OS X version is because those commands can and do change from OS X release to OS X release.
Permissions Repair, has long had the an issue with reporting
errors that no matter how many times they are repaired would still be reported the next time permission repair is run. Apple's response to this has invariably been those "errors" were safe to ignore. Running permission repair has been deprecated by Apple and access to the applicable Unix command removed from Disk Utility perhaps at least in part in an effort to get away from the persistent queries about the reported non-errors. I suspect at some point the command will be removed altogether which will also remove the capability in OnyX, Cocktail, TinkerTool System and a host of other third party utilities.