In this paper we introduce a design framework that permits task-specific complex geometries in robotic limbs with the minimal power consumption. Additionally we present a optimal gear ratio selection algorithm with realistic constraints, which we use as a subroutine within the geometry optimization. As a case study we optimize the a spatial, hybrid parallel-serial robotic limb structure with a large set of geometric parameters. Optimal design with respect to this mechanism produces three locally optimal families of designs. These are analyzed rigorously and a best design was chosen. A prototype has been constructed from the chosen design family, proving that the approach is practical. This serves as evidence that the design optimization method is an effective tool to minimize the electrical cost of a given task, and thus specialize the design.