A buddy of mine pointed me to a great article on writing cool CodeSmith templates:

The author does a great job of covering the basics, and then gets into more complicated issues such as sub templates and custom property editors (like for picking a file using an OpenFile dialog box instead of requiring the user to type in the path to a file).

Very cool read.