Rigify is an add-on for generating rig components.
Bone Widget is add-on for creating and managing custom bone shapes.
Here is the older tutorial for the add-on, it functions much the same way but it has had many improvements made to it since then.
https://vimeo.com/184159913