Creating Unity Editor Extension

So I have been thinking about making an editor extension where you click somewhere and an object is placed at that position, How would I go about doing this? Could you point me in the direction of some documentation or some tutorials on how to do this kind of thing?

I cannot help you that much since I haven’t made any extensions, but maybe this can help you.

Well I managed to find someone trying to do a similar thing in unity and this may be useful to someone else so: http://forum.unity3d.com/threads/42097-Editor-Scripting-How-to-add-objects-in-Editor-on-Click