djParentShape.mel
I've been doing a fair amount of rigging where I use joints and empty groups as controllers. I try to minimize the need for going to the outliner to select things by adding shapeNodes to these controllers so that they can be selected directly in the viewport.
To parent a shapeNode to a different transform you need to use the command
parent -r -shape;
but often you'll get the shape jumping to a new location when it adjusts to its new parent. If that happens you can select the cv's or verts and move them to where you want them, but if you are doing this alot it can get messy and becomes time consuming. And that was the motivation for writing djParentShape.mel
With djParentShape you select the new controller object, shift-select the joint and run the script. It has two modes of operation: move to position or preserve position so you simply choose the one you need.
Download from here.
Keep reading for details...
move to position
We have a joint chain and we want to add a controller to one of the joints so that we can select it in the viewport even when joints are not displayed. We create a sphere to use as a control object and assign it a transparent shader.

Select the sphere and then shift-select the joint

source djParentShape.mel; djParentShapeMoveToPos;
The sphereShape is now parented under the joint transform. The old sphere transform has been deleted. Now when you select the sphere you are actually selecting the joint.

preserve position
In this case you want to place a control handle precisely. You create a poly cube and move it to the location where you want the handle - either by transforming the object or its vertices, or both.


Now select the cube (transform node) and shift-select the joint

source djParentShape.mel; djParentShapePreservePos;

The pCubeShape is now parented under the joint and its position was preserved. The old pCube transform was deleted. Now selecting the cube is actually selecting the joint.
The djParentShape.mel is intended to be invoked using a shelf button or a marking menu, which is why the commands shown above include a source command. djParentShape.mel must be sourced before the other commands will be recognised. However, if you wanted to, you could add the following line to userSetup.mel
source djParentShape.mel
Then you would be able to simply type
djParentShapeMoveToPos;
or
djParentShapePreservePos;
Download from here.