Your final bone is not being 'built' by either call.
skel_get_numbones isn't needed. the 'last bone' argument is actually a 'stop' bone, or in other words, this bone will not be affected. what you should probably do is to pass 0 insteadm which will be taken to mean 'up to and including the last bone', which is simpler and more efficient than calling get_numbones and adding 1 (which you didn't do).
md5anim files are pure animation files. they contain no mesh data, only bones and animation information (specifically, each file contains only a single sequence/framegroup). this is contrasted against md5mesh files which are pure mesh files and contain no animation information (only the bones+mesh+skinning info). To animate an md5 model, you must use an md5mesh file and build its animations from one or more md5anim files.