Tips for golfing in TikZ
Use \def
\def is an incredibly powerful tool when it comes to golfing.  \def allows you to assign something to a variable.
This can be used simply with the to save a number you may use a bunch of times for instance
\def\x{1456}

Will define 1456 as \x for future use much like saving a variable might in a programming language.
However \def is much more powerful than that, because \def doesn't define a variable it defines a snippet of code to be substituted into the program whenever it is called.
For example say you want to draw some rectangles using \draw  you might write the following code:
\draw(0,0)rectangle(3,4)rectangle(8,0);\draw(2,2)rectangle(3,3);

Using \def this could be written as:
\def\x{)rectangle(}\draw(0,0\x3,4\x8,0);\draw(2,2\x3,3);