Cooke touched down twice, was instrumental in creating Doncaster’s other five tries and dropped a goal for good measure.
Second row Liam Colbon and full-back Dave Scott were among a number of other outstanding performers as Doncaster jumped over their opponents into third place.
Halifax made a nervy start from which they never really recovered.
Mike Emmett nipped in for Doncaster’s first try following a huge kick from Cooke in the second minute before Andy Bracek levelled the scores following good work by Paul Mennell.
Cooke showed skill and strength when he dived over before dropping a goal and then sent Liam Cunningham on a rampaging run which led to Scott touching down.
Doncaster led 19-6 at the interval and stretched the lead when Cooke went over again in the 50th minute.
Halifax looked rattled but they showed their mettle when they hit back with tries from Luke Adamson and Mennell following spells of heavy pressure to narrow the gap to five points.
Briefly it looked as if they might stage a dramatic comeback but the home side raised their game again in the closing stages.
Cooke sent Scott racing through in the 75th minute and two tries from the excellent Steve Snitch in the closing minutes set the seal on a splendid Dons performance and sealed the visitors’ fate.
Doncaster: Scott, Hodson, Leaf, Cunningham, Sanderson, Cooke, Wilkinson, Carbutt, Spaven, Robinson, Snitch, Colbon, Emmett. Substitutes: Castle, Waterman, Spiers, Dunn.
Halifax: Fieldhouse, Potts, Casey, Tyrer, Fox, Murrell, Brown, Ambler, Mennell, Brooks, Adamson, Divorty, Bracek. Substitutes: Tonks, Cowling, Holden, Spencer.
Referee: J Cobb (RFL).