Also, get a better bicycle for commuting; chains should not break after a few weeks. This shows that the bicycle had been heavily used, or is an ancient rust bucket, and may be a "bicycle shaped object" to begin with.
I carry a Park chain linkpin press tool for opening and closing chain links. Though occasions for using that on the road are rare if the chain is well-maintained and replaced regularly, not long ago I had a fairly new chain derail off the front ring, and by some unfortunate combination of events get itself into a tight kink which jammed and caused a link to bend severely. Having the tool, I was able to splice out and discard the bent link, and be on my merry way. I also carry a short piece of chain that was left over from the original chain installation, because there is only so many links you can throw away before the chain gets too short.
When you get a new chain, the rear gear cluster should be changed at the same time, since they wear together. A new chain can slip on old sprockets even if the old chain didn't. The front rings have to be changed maybe once every three chain changes.