This is a basic task, which one needed to "fully" understand.
As one result of MGs PhD thesis we should get a "best and optimal" implementation (choosing appropriately, depending on the input, from the various algorithms).
The (dedicated) module for prime-clause-related computations at Maxima-level is Satisfiability/Lisp/Primality/plans/general.hpp; see "Computations of all prime clauses for full clause-sets" there.