If you have installed the official Cocos2d-X Xcode 4 templates, the folder ~/Library/Developer/Xcode/Templates/cocos2d-x/ should exist. If it doesn't exist, you can create it by
mkdir -p ~/Library/Developer/Xcode/Templates/cocos2d-x/
Copy the files in this repo to "~/Library/Developer/Xcode/Templates/cocos2d-x/Cocos2d-X\ class.xctemplate/" Alternatively, you can run
cd ~/Library/Developer/Xcode/Templates/cocos2d-x/
git clone git://github.com/l4u/cocos2d-x-CCNode-Xcode4-Template.git Cocos2d-X\ class.xctemplate