When I do front squats, or other movements then focus on quads, or squat with a flat soled shoe, I get a stabbing pain in my hi flexor as well....its just tight.
do a little more movement before squatting, maybe hp on a bike for 5 minutes or so, and stretch the hip flexor.
if you have a partner, lay face down on a bench and have them push down on your lower back, while raising your foot to your butt, then picking up the knee. Do this in small movement increments.
Or find a spot shere you can face away from something and put your foot up, hooking with the toes. and stretch the quad, and slowly go down until you feel it hitting the hip flexor.