Yes, it is possible
It is actually possible to obtain a permanent skeleton companion. That being said, it is a slightly convoluted process that is not without certain shortcomings. This method involves using two spells in conjunction:
Finger of Death
A humanoid killed by this spell rises at the start of your next turn as a zombie that is permanently under your command, following your verbal orders to the best of its ability.
True Polymorph
Choose one creature or nonmagical object that you can see within range. You transform that creature into a different creature ... If you concentrate on this spell for the full duration, the transformation becomes permanent. ... If you turn a creature into another kind of creature, the new form can be any kind you choose whose challenge rating is equal to or less than the target's. The target's game statistics, including mental ability scores, are replaced by the statistics of the new form. It retains its alignment and personality. ...
By now, you probably understand where I'm going with this. You would first start by using Finger of Death to create a normal zombie servant under your control. Next, you would use the True Polymorph spell to transform said zombie into a skeleton (which you can do because they are both challenge rating 1/4). Then you simply wait out the spell's duration, which makes the transformation permanent, and, since a transformed creature "retains its alignment and personality" you now have one permanent skeleton companion at your disposal.
In fact, using this method, you could create a permanent companion out of any creature of 1/4 challenge rating you may desire.
In Summary
Finger of Death + True Polymorph = permanent skeleton companion
Whatever effect causes the last death saving throw to fail is what causes the death
General case
Whenever you start your turn with 0 hit points, you must make a
special saving throw, called a death saving throw, to determine
whether you creep closer to death or hang onto life.
[...]
On your third success, you become stable (see below). On your third
failure, you die.
Until a creature has failed their last death saving throw, nothing has killed them; they are still "clinging to life". Thus, only an effect that causes you to fail your last death saving throw (or kills you instantly) can be said to have actually killed you.
Jeremy Crawford has also agreed with this:
Q: For Finger of Death: if the spell brings the target to 0hp and the
target subsequently dies due to failed death saves, dies that count as
FoD killing the target? Will it rise as a zombie?
A: A spell kills you if its damage or other effects slay you. If it reduces you to 0 hit points but leaves you alive, it didn't kill you.
Specific case: finger of death
Finger of death says:
A humanoid killed by this spell rises at the start of your next
turn as a zombie that is permanently under your command [...]
Thus, only when the spell was the final cause of death of the creature does its effect take place.
So as an example, say finger of death brings a creature down to 0 hp but does not kill them instantly. Then, the as the round proceeds, the creature gets hit once by three different enemies. In this case, it does not matter what dropped the creature to 0 hp. The effect that killed the creature was the attack of the third enemy. That was the effect that made the character cross the line from alive to dead. Everything else before that was just preamble. So, in this case, finger of death's effects would not take place and the character would not rise as a zombie.
Another example: Say a character is at 0 hp with two death saving throws failed. Then an enemy casts finger of death on them and they take damage. In this case, the enemy does die from finger of death and rises as a zombie accordingly.
Best Answer
I've always seen it ruled that Finger of Death dropping you to 0 hp would turn you into a zombie. However, a recent Q&A tweet by Jeremy Crawford and a subsequent re-reading of the spell has clarified how this spell works.
Question (@DanDanFielding)
Answer (@JeremyECrawford)
Let's take a closer look at how dropping to 0 hitpoints works in 5e:
The rules go on to explain that dropping to zero hitpoints knocks you unconscious and causes you to start making death saving throws. Dropping to zero only kills you outright if the remaining damage exceeds your maximum hitpoint total. For example:
To apply this to our example, let's say a player has a maximum of 30 hit points and currently has 20 hit points left. If that player is hit by a Finger of Death for 62 damage, they'll be dropped to 0 hit points with 42 damage remaining. Since that damage exceeds their hit point total, they will die outright and rise on the caster's next turn as a zombie under the caster's control.
Another common scenario that could lead to Finger of Death turning a player into a zombie would be if that player has already failed two death saving throws before the spell hits them. When they take damage from the spell, that would count as failing a third saving throw, which would kill them outright and raise them as a zombie on the caster's next turn.
However, if the player hit by the spell is not currently dying, and is dropped to 0 hit points without dying outright, the spell does not raise them as a zombie if or when they die. It simply does a very large amount of necrotic damage.