Since a carrier might carry multiple squadrons, CAG aboard the ship is in command of them all. For squadron leaders, the best way is to use that example mentioned before - create a Command version of your fighter that's identical and tick the "Senior CO" box so that instead of R1 it gets a R2 officer commanding it who will then automatically become the squadron commander via being the most senior officer present.
But what rank would the CAG be? It'd be weird if the CAG doesn't outrank the squadron leaders.
Considering that carriers will probably be your biggest ships so they will be commanded by senior officers, perhaps even flag officers, and fighters are generally piloted by R1 officers, there should be able room between the two for CAG to be higher rank than squadron senior officer. For example, using USN ranks in Aurora:
Fighter pilot - R1 "lieutenant-commander"
Squadron CO - R2 "commander"
CAG aboard a carrier - R3 "captain"
Carrier CO - R4 "rear-admiral (lower half)"
And you could always insert lieutenant as the new R1 and now that we can truly have 1-2 crew fighters, that will make even more sense than before, and thus save all admirals for naval commands.