I've been playing D&D 5e for about 1,5 year now (as DM and PC), and sometimes play D&D 3.5e as a half-orc ranger (level 3 currently). I don't own any 3.5 books, and only use the online SRD.
Last session my ranger befriended a worg that attacked us. In time — when I reach level 4 and she's still with me — she'll become my Animal Companion. We're aware that it's a magical beast: the DM allows it as animal companion as long as my ranger takes an ECL +1. Together we worked out the stats, but now aren't certain of how to calculate the Skill Points per HD for this worg.
On the SRD I found that (magical) beasts gain skill points based on:
2 + Intelligence modifier per HD
My worg has an Intelligence modifier of -2, so that would mean she gains 0 skill ranks per level-up. The DM rules that we take the minimum of 2 per HD, and ignore the negative value for the modifier. I'm fine with this ruling, but I'm still curious about the RAW.
Note: I know D&D 5e often uses a minimum of 1 in similar cases.
What is the minimum amount of skill points per HD?
When it comes to gaining HD as characters advance, I'm assuming the same rules apply to both animal companions and player characters. If this assumption is wrong, please explain why, and where I can read up more about it (preferably online).