How do you clip your helmet to your bag when not wearing it? I've been using a carabiner through the strap to clip my helmet to my backpack.  But it seems clumsy, and the helmet dangles around a lot.  I've seen other people with helmets closely mounted on a bag.  How do they do it?  Is there some kind of clip for this purpose?
You can make your own retention system for any bag which will hold the helmet secure and close to the bag. I've done this on a number of my bags as I carry both bicycle and climbing helmets at times and there is never enough space for them inside a bag as they're such awkward shapes.
Buy some elasticated cord (often called shock cord) and some cord locks of an appropriate size for the diameter of the shock cord you have. Threading this through a strap or some webbing on the bag and leaving the cord locks outermost will give you a size adjustable retaining loop that will hug the helmet to the bag.
Alternatively, find something (I've used shaped pieces of wood or plastic) that will fit lengthways through a vent on your helmet, but is too long to fit through the vent when rotated sideways. This becomes your toggle, tie this to the shock cord and you can use a single length (easier and neater to tuck away when not in use) with the toggle at the end. To fasten the helmet, push the toggle through a vent and twist it sideways so it can't fall back through the vent.
EDIT: a video demonstration and a couple of photos for you. Other manufacturers do this, Osprey and their 'lid lock' feature are just the one that came to mind for me to search out images.
a Youtube video of Osprey bag with 'lid lock' feature

(source: tri-sports.com)

(source: netdna-cdn.com)