Want to make sure I'm legal with the build (tactics) I'm planning out with my animal companion for my hunter. (Have never played with a animal companion and want to make sure I've done stuff correctly)
Here's what I have so far for my companion (@ 4th level, stat bump to INT) -
Animal Companion - Tyrannosaurus
Feats: Acrobatic; Weapon Focus: Bite; (Outflank, Pack Flanking, & Precise Strike (class ability))
(HD 4; BAB +3; Fort +4, Reflex +4, Will +1; Skills 4; Feats 2; Tricks +2; Link; Share Spells, Evasion)
Skills: Acrobatics 4+2+6 ; Perception 0+2 
Tricks (7): Aid; Attack x2; Down; Flank; Guard; Second Chance Strike (Skirmisher, Immediate, misses with melee may reroll with -5 penalty); Aiding Attack (Skirmisher, Free, use on a hit - next creature to attack gets a +2 circumstance bonus to hit)
Tyrannosaurus; medium; 30' move; Low-light; Scent
STR 15+2 (focus), DEX 17, CON 10, INT 2+1 (3), WIS 15, CHA 10
HP 18 Fort: 4  Reflex 4+3  Will 1+2 
AC 19 = 10 +3 dex +4 natural +2 Natural armor (companion) Bonus
+8 Bite 1D8+5 B/S/P +1D6 precision damage if flanking with Hunter
+12 if Flanking
This has to follow PFS legal rules
First question: Are my hit points correct?
4 HD at 4.5 health per hit die, no con modifier.
Second Question: Tactics - Legal or Not?
T-Rex makes a attack, attack misses. Using the Skirmisher Trick Second Chance Strike as a immediate action makes another attack with a -5 penalty. This attack hits. Then using the Skirmisher Trick Aiding Attack as a Free Action the animal companion gives the next creature to attack the same target a +2 circumstance bonus to hit.
Third Question: Skills - are my total skills correct at just 4 skill ranks?
Forth question: Anything else I've done wrong/forgotten?
I think the way it works by the rules is that you have to tell the animal to use the tricks, than on it's initiative it follows those orders how the GM believes it would. So on your turn you could say, ”Fluffy, attack that Target, if you miss use second chance strike, if you hit at all, use aiding attack”. I believe that would work, keep in mind the pet has a limited amount of uses of those tricks per day. Also a GM may start limiting the amount of free actions you take (each trick you tell a turn is a free action), though I haven't seen that very often.
I think that a Ranger(Skirmisher)'s Hunter's Tricks are a class feature, and are different than the tricks you can teach an animal companion. So I don't think you can take Second Chance Strike or Aiding Attack for your animal companion.
For anyone else yes, but the hunter class contains this: "A hunter may teach her companion hunter’s tricks from the skirmisher ranger archetype (Pathfinder RPG Advanced Player’s Guide 128) instead of standard tricks. The animal companion can use skirmisher tricks when commanded, a number of times per day equal to half its Hit Dice plus its Wisdom modifier."