Thomas got Rotherham off to the perfect start when he scored inside a minute after latching on to James Tavernier's through-ball.
Thomas then headed in his and Rotherham's second after getting on to the end of Ben Pringle's ball into the box.
Swindon's Louis Thompson came close to getting one back for his team when he fired just over the crossbar.
Connor Waldon then got on to the end of a free kick but he could only direct his header straight at the keeper.
Swindon were awarded a penalty after the restart when Massimo Luongo was fouled in the area.
Michael Smith stepped up to slot home the penalty and pull one back for the hosts.
Jay McEveley then fired a thunderbolt against the bar as Swindon looked for the equaliser, but Rotherham held their nerve to take home the points.