Don't know about the templates, but officers can easily be edited in campaign.xml.
I do a CTRL+F search for "ExceptionalSleeper" when I start a new game. That reveals the heroic level 7 officers. If I find less than four in campaign.xml, I reroll the seed (IMO level 7 officers are more impactful than colony items or beautiful unicorn perfect colony systems).
I have a modded run where two of the four level 7s had identical skills, so I replaced the skills of one officer with the skillset of another level 7 officer from a different save, just for variety. There's also an acknowledged bug where an ExceptionalSleeper officer sometimes gets generated with a level 5 template. If I find an officer like that in campaign.xml I will just copy paste the stats of a level 7 officer from a different save and overwrite.
You can also easily change portraits in campaign.xml, which I do sometimes when I had an officer I liked in a previous save and want to use that exact officer again (name, face and skills). I bet you could make a level 10 officer if you wanted just by editing text files, but I haven't tried to make that drastic a change yet.
You can probably also add and remove s-mods, d-mods, etc, but I haven't tried to make any changes to ships yet. It's very easy to make one mistake and completely corrupt the syntax of the campaign file. I always make a backup before editing.
I know I can change the saves, I just want to change them in accordance to something I am supposed to find out there. That is why I want to know where to find the templates for pre-made officers. As for portraits, I use Portrait Changer to change them in game, with a nice preview of all of the portraits right in front of me.
Once I even made a copy of the REDACTED XIV fleet, complete with the tags that make it not count towards the limits for Automated Ships haha.
Edit: I actually found it
Spoiler
// fast high-tech ship
t = new CryopodOfficerTemplate();
t.elite.add(Skills.TARGET_ANALYSIS);
t.elite.add(Skills.ENERGY_WEAPON_MASTERY);
t.elite.add(Skills.FIELD_MODULATION);
t.elite.add(Skills.GUNNERY_IMPLANTS);
t.elite.add(Skills.SYSTEMS_EXPERTISE);
t.base.add(Skills.COMBAT_ENDURANCE);
t.base.add(Skills.HELMSMANSHIP);
TEMPLATES_EXCEPTIONAL.add(t, 10f);
// slow high-tech ship
t = new CryopodOfficerTemplate();
t.elite.add(Skills.HELMSMANSHIP);
t.elite.add(Skills.ENERGY_WEAPON_MASTERY);
t.elite.add(Skills.FIELD_MODULATION);
t.elite.add(Skills.GUNNERY_IMPLANTS);
t.elite.add(Skills.ORDNANCE_EXPERTISE);
t.base.add(Skills.TARGET_ANALYSIS);
t.base.add(Skills.COMBAT_ENDURANCE);
TEMPLATES_EXCEPTIONAL.add(t, 10f);
// hull/armor tank, low tech
t = new CryopodOfficerTemplate();
t.elite.add(Skills.DAMAGE_CONTROL);
t.elite.add(Skills.IMPACT_MITIGATION);
t.elite.add(Skills.POLARIZED_ARMOR);
t.elite.add(Skills.BALLISTIC_MASTERY);
t.elite.add(Skills.TARGET_ANALYSIS);
t.base.add(Skills.MISSILE_SPECIALIZATION);
t.base.add(Skills.GUNNERY_IMPLANTS);
TEMPLATES_EXCEPTIONAL.add(t, 5f);
t = new CryopodOfficerTemplate();
t.elite.add(Skills.ORDNANCE_EXPERTISE);
t.elite.add(Skills.IMPACT_MITIGATION);
t.elite.add(Skills.POLARIZED_ARMOR);
t.elite.add(Skills.BALLISTIC_MASTERY);
t.elite.add(Skills.TARGET_ANALYSIS);
t.base.add(Skills.MISSILE_SPECIALIZATION);
t.base.add(Skills.GUNNERY_IMPLANTS);
TEMPLATES_EXCEPTIONAL.add(t, 5f);
// phase ship
t = new CryopodOfficerTemplate();
t.elite.add(Skills.IMPACT_MITIGATION);
t.elite.add(Skills.FIELD_MODULATION);
t.elite.add(Skills.TARGET_ANALYSIS);
t.elite.add(Skills.SYSTEMS_EXPERTISE);
t.elite.add(Skills.COMBAT_ENDURANCE);
t.base.add(Skills.POLARIZED_ARMOR);
t.base.add(Skills.ENERGY_WEAPON_MASTERY);
TEMPLATES_EXCEPTIONAL.add(t, 10f);
// generally-ok-for-most-ships, take 1
t = new CryopodOfficerTemplate();
t.elite.add(Skills.FIELD_MODULATION);
t.elite.add(Skills.ORDNANCE_EXPERTISE);
t.elite.add(Skills.TARGET_ANALYSIS);
t.elite.add(Skills.POINT_DEFENSE);
t.elite.add(Skills.GUNNERY_IMPLANTS);
t.base.add(Skills.HELMSMANSHIP);
t.base.add(Skills.COMBAT_ENDURANCE);
TEMPLATES_EXCEPTIONAL.add(t, 5f);
// generally-ok-for-most-ships, take 2
t = new CryopodOfficerTemplate();
t.elite.add(Skills.FIELD_MODULATION);
t.elite.add(Skills.ORDNANCE_EXPERTISE);
t.elite.add(Skills.TARGET_ANALYSIS);
t.elite.add(Skills.IMPACT_MITIGATION);
t.elite.add(Skills.GUNNERY_IMPLANTS);
t.base.add(Skills.HELMSMANSHIP);
t.base.add(Skills.COMBAT_ENDURANCE);
TEMPLATES_EXCEPTIONAL.add(t, 5f);
// SO, ballistic weapons
t = new CryopodOfficerTemplate();
t.elite.add(Skills.COMBAT_ENDURANCE);
t.elite.add(Skills.TARGET_ANALYSIS);
t.elite.add(Skills.SYSTEMS_EXPERTISE);
t.elite.add(Skills.DAMAGE_CONTROL);
t.elite.add(Skills.IMPACT_MITIGATION);
t.base.add(Skills.FIELD_MODULATION);
t.base.add(Skills.BALLISTIC_MASTERY);
TEMPLATES_EXCEPTIONAL.add(t, 5f);
// SO, energy weapons
t = new CryopodOfficerTemplate();
t.elite.add(Skills.COMBAT_ENDURANCE);
t.elite.add(Skills.TARGET_ANALYSIS);
t.elite.add(Skills.SYSTEMS_EXPERTISE);
t.elite.add(Skills.DAMAGE_CONTROL);
t.elite.add(Skills.IMPACT_MITIGATION);
t.base.add(Skills.FIELD_MODULATION);
t.base.add(Skills.ENERGY_WEAPON_MASTERY);
TEMPLATES_EXCEPTIONAL.add(t, 5f);