If you only want the skeleton to shoot players from an enclosed area, and never actually be killed, you can always just rename a few skeletons with a nametag and ensure that they cannot suffocate or burn in the sunlight. In theory they shouldn't ever disappear then.