The ghost brick can be obtained through %client.player.tempBrick, so you could create a static shape slightly above the brick and set the shape name for it.
e.g.
%brick = %client.player.tempBrick;
if(isObject(%brick)) {
%pos = %brick.getPosition();
%pos[x] = getWord(%pos, 0);
%pos[y] = getWord(%pos, 1);
%pos[z] = getWord(%pos, 2) + 1;
%shape = new StaticShape(tempShape) {
client = %client;
brick = %brick;
position = %pos[x] SPC %pos[y] SPC %pos[z];
};
%brick.staticShape = %shape;
%shape.setShapeName("Blockhead's Brick");
%shape.setShapeNameColor(getColorIDTable(%brick.colorID));
}
//
// it's been a while, consider this psuedo
//
EDIT: I don't, however, know what the functions are for manipulating the ghost brick. You would need to package those to update the static shape.