Miniskirts were not considered sexist in the 1960s. They were considered a symbol of female empowerment. They were championed by Nichelle Nichols and Grace Lee Whitney who disliked the trousers and tunics women wore in the first two pilots. Your charge miniskirts are sexist is based solely on a contemporary perspective and ignores the context of when TOS was produced.
And TOS never said women could not be starship captains. A delusional and bitter woman, Janice Lester, rejected by Kirk years earlier because he chose his career over her makes the accusation that his “world of starship captains has no room for women.” She is bitter and angry Kirk’s life had no room for her. And yet she conflated that to mean she couldn’t be a starship captain.
And later in the episode Kirk even says she did not have the temperament to be a starship captain. Starfleet, as well, as Kirk, rejected her because she was unstable, not because she was a women.
And Lester’s thinking certainly runs counter to Number One’s position in “The Cage” as well what Kirk tells Lenore Karidian in “The Conscience Of The King” that men and women are essentially the same aboard ship and in extent in Starfleet.
Nowhere in TOS does it explicitly say a woman cannot command.