How can a player character make a working magical prosthesis?

For the purpose of this question, a PC spellcaster wants to make say, a prosthetic hand (for himself or someone else).

What would be required to ensure the prosthesis would both respond to the recipient’s thoughts and move the way an original extremity would, without the recipient worrying that eventually the magic of the prosthesis would eventually fade and it would become inert and immobile? What would be the best way to approach this?

I’m looking for how a wizard would craft the prosthesis if he or someone else would need it and for some reason regenerating the limb was not an option.