Idiot might, swapping openings, work on the sly (9)
I believe the answer is:
moonlight
'work on the sly' is the definition.
(to moonlight is to secretly do a second job)
I don't understand how the remainder of the clue works.
(Other definitions for moonlight that I've seen before include "Secretly work" , "Beethoven's Op. twenty seven/two sonata" , "Night-time illumination" , "name for sonata" , "Burn the midnight oil" .)