Clemont's Got a Secret! (Japanese: ミアレジム攻略！シトロンの秘密！！Subdue Miare Gym! Citron's Secret!!) is the ninth episode of the XY series, and the 808th episode of the Pokémon anime. It first aired in Japan on December 5, 2013 and in the United States on March 15, 2014.
When our heroes arrive in Lumiose City, Ash and Serena look around in awe, while Clemont and Bonnie seem a little nervous. The impressive Prism Tower catches Serena’s eye, and Ash tells her about his attempt to challenge the Lumiose Gym inside it—an attempt that was quickly shut down by a robot who threw him out upon learning he didn’t have four Kalos Gym badges yet. Clemont waves this off and Bonnie tries to get them moving when someone pulls up beside them—it’s Meyer, Clemont and Bonnie’s father!
Meyer soon reveals that Clemont himself is the Lumiose City Gym Leader, much to Ash’s and Serena’s surprise! Clemont explains that the Gym was taking up too much of his time (time he’d rather spend working on his inventions), so he built a robot named Clembot to take over some of his duties. But a glitch in the programming left Clembot with a stubborn personality that sticks to the “rules” no matter what—and since Clemont doesn’t have four Gym badges either, Clembot won’t even let him inside his own Gym!
After a pep talk from Ash, Clemont is willing to try sneaking into the Gym so he can repair the malfunctioning robot. Inside, they find Clembot on the battlefield, where it finally accepts Clemont’s override code—and his battle challenge! Clemont sends out Bunnelby against his own Heliolisk, one of the Pokémon he left at the Gym to fight at Clembot’s side. The battle seems very one-sided at first, but Bunnelby proves it has a tough streak, and with some unexpected strategy, Clemont manages to defeat his own creation!
The robot finally recognizes its inventor, and Clemont starts a full reprogramming. This time, he remembers to install a few important qualities he left out in the original programming: compassion, kindness, and flexibility. Then, along with Ash and Serena, Clemont and Bonnie visit their dad to explain the whole situation at the Gym—and to tell him they want to leave the new and improved Clembot in charge so they can keep traveling with their new friends! Meyer happily declares his support for their journey, but makes Ash and Serena promise to keep his kids out of trouble.
That night, Clemont asks Ash if he’s sorry he couldn’t have a Lumiose Gym battle. Ash says he plans to honor the original four-badge requirement and return when he’s a bit further along in his Kalos journey...on one condition. When he does come back to challenge the Lumiose Gym, he wants to battle Clemont, not Clembot!
Clemont and Bonnie introduce Meyer and his Ampharos to Ash and Serena. When Bonnie tells Meyer about her new friends, her father is overcome with joy for his children. As Ash and Serena introduce themselves, he takes a liking to Pikachu and Dedenne. Once the introductions have finished, Meyer begins to scold Clemont for not visiting home more often, but Clemont nervously tries to avoid giving a reason why. Bonnie and Clemont try to leave, but Meyer goes on to tell Clemont that being tough alone won't make challengers better Trainers, and that he needs to be a Gym Leader to be proud of. At this, he drives away. Ash and Serena, confused by Meyer's words and Clemont's nervousness, immediately demand the truth from him and Bonnie, who concede and finally explains the whole story.
In one of Lumiose City's plazas, Clemont reveals that he is, in fact, the Lumiose City Gym Leader. He explains how his Gym Leader duties kept him so busy that he had no time to follow his passion of inventing new things, so he decided to build a robot that could stand in for him as Gym Leader sometimes. He programmed the robot with his ideals - Clemont's ideal challengers would have already won around four Badges, and wanted his robot, Clembot, to be kind but tough at the same time. However, due to faulty programming, Clembot saw Clemont as a challenger and asked him to leave when it found out that Clemont had no Gym Badges. Clemont had implemented a "Master Recognition Battle Mode" for such an event, but he had accidentally registered the wrong voice code and so Clembot expelled him and Bonnie from the Gym. Although Clemont tried to reenter the Gym several times, he was unsuccessful in all of his attempts and is now out of ideas. After hearing his story, Ash and Serena both suggest that they visit the Lumiose Gym and see if they can do anything to help.
At the Lumiose Gym, they encounter a group of Trainers talking about the Lumiose Gym very angrily, furious at Clembot's ruthless behavior (not only is it refusing to battle trainers with less than four badges, but is also throwing out trainers that it defeats) and promising in no uncertain terms that they will never return to the Gym. At this, Clemont loses his confidence in his ability to retake the Gym from Clembot with just his inexperienced Bunnelby when Clembot has all of his other Pokémon, but Ash tells him that he can at least give it his best shot. When Serena asks why Clemont became a Gym Leader in the first place, Bonnie tells her how Clemont is well-known for being a genius when it comes to Electric-type Pokémon. Clemont adds that he believed becoming an Electric-type Gym Leader would attract stiff competition from challengers and ultimately make him even stronger.
The group enter into Prism Tower through a hole caused by Garchomp's rampage, and then proceed to the Gym via the ventilation system. However, Clemont's Magnemite and Magneton are patrolling the halls and, although they are initially happy to see him, they have been ordered by Clembot to eliminate intruders, so Ash's Froakie uses its frubbles to temporarily incapacitate them while the group continues on to the battlefield. Once they reach the field, they are recognized as challengers by Clembot. Clemont once again activates its Master Recognition Battle Mode, and, after concentrating on the day Clembot was first activated, finally remembers the correct voice code and is permitted to battle against his creation. As Clemont sends out his Bunnelby, Clembot chooses Heliolisk as its Pokémon. Although Heliolisk is happy to see Clemont, the latter tells Heliolisk to give it everything it has in this battle, to which Heliolisk agrees.
Just as Clemont programmed it to do, Clembot tells Heliolisk to begin with Thunderbolt. Bunnelby defends with its ears by using them to throw dust into the air, just as in Bunnelby's very first battle against Pikachu. Bunnelby then uses Double Slap while Heliolisk counters with Dragon Tail. After Bunnelby lands a hit on Heliolisk, it digs into the ground, but is unearthed when Heliolisk unexpectedly uses Bulldoze - a move that Clemont had never taught it. Knocking Bunnelby into the air with its attack, Heliolisk attacks with another Dragon Tail. Bunnelby tries Double Team, but is countered easily by a Parabolic Charge attack from Heliolisk. Realizing that he has to think outside the box in order to win, Clemont has Bunnelby use Dig again and then Double Team while still underground. When Heliolisk uses Bulldoze, all of the copies leap out of the ground and are hit with Parabolic Charge, but the real Bunnelby continues burrowing and lands a super-effective hit on its opponent, finishing Heliolisk off with a Mud Shot attack.
After ascertaining that his Heliolisk is all right, Clemont reprograms Clembot to remove the Badge restriction and violence towards challengers. Clembot then becomes much more amiable and Clemont is satisfied with Clembot's programming. Back at Meyer's electronics shop, Clemont explains everything to his father, who was up until this point unaware that his son had been ousted from his Gym in the first place. After this, Clemont finally manages to summon the courage to tell Meyer about his journey, elaborating on all of the amazing things he has experienced in such a short time. Meyer is overcome with happiness again and embraces his children, telling them how good friends are the most important thing in the world and that they may continue traveling with Ash and Serena.
That night, Serena joins Bonnie in her room and the two girls go to sleep quickly. In Clemont's room, Ash tells Clemont that even though he was disappointed not to challenge the Lumiose Gym, as Clemont prefers challengers to have four Gym Badges then he plans to honor that wish and come back to Lumiose City once he had obtained four of them. However, Ash requests that the battle will be against Clemont instead of Clembot, and Clemont agrees, promising to give Ash a battle he will never forget. As the episode ends, Blaziken Mask and his Blaziken leap off of the roof and into the night.
The title card for this episode focuses on Clemont.
Although it has often been seen doing so in the spin-off games, this episode marks the first time in the anime that Magneton is seen splitting into three separate Magnemite units.
Due to Meowth's brief appearance in a flashback, this episode marks the first time that one member of the Team Rocket trio appears without the others in the main anime. Meowth has previously appeared without Jessie and James in the Pikachu shorts and in a few Pokémon Chronicles episodes.