Some of the code I’ve written before has made it into the TFS Build Extensions latest release. They are my “Include Merges (and associated work items) in a build" and “Fail code based on Code Coverage” activities.
If you use the activities, make sure to leave comments or suggestions on the codeplex site.
Happy build customizing!