There are a few ways to get the skill. The easiest one is to recruit officers from IX held planets. They will be independents but start out with the skill. Panopticon Cores which can be salvaged from IX ships or bought from Vertex Station, and their installed form the Panoptic Interface (Command) hullmod commander will also have the skill. Finally if you have Take No Prisoners, any captured IX officers will have the skill as well.
If you want your commander to have SotF, your options are more limited. You either need to start the game with IX in Nexerelin, or start as an independent and take the Sword of the Fleet background. This gives your character the skill and good starting relations with IX. In this start you will also gain an extra SotF Biochip in the beginning, more on that later.
The last way to obtain the skill for anyone is to do the "A Theory of Mind" bounty that becomes available at level 12. Winning the bounty will drop another SotF Biochip. This can be used in the ship fitting window from the top drop down menu. Using it will grant the skill to the ship's current captain if they lack it. This is a very rare resource and you will only ever get either one, or two with an IX start, so choose wisely who will benefit from it.