Filling the rotation spot of Jeff Niemann (fractured right fibula), Cobb limited the Marlins to four base runners on a day he set a career high for strikeouts.
Cobb, Joel Peralta and Fernando Rodney combined on the two-hit shutout, striking out 14.
"I always say, pitching will dictate how the game is going to be played," Marlins manager Ozzie Guillen said. "When nothing is going on, it seems like a very boring game. It was for me.
"I'm not saying they're not trying. I'm just saying, just put one thing in your mind. How you got to the big leagues and how you've stayed in the big leagues. Forget about your struggles. Forget about hitting .190. Forget about whatever you're hitting. I think this game is about approach and adjustments."
A year ago on Father's Day, Cobb also faced the Marlins. He won that afternoon, as well, giving up two runs on three hits in 6 1/3 innings.
"I think it was a big step in the right direction in my learning process and figuring out how to overcome just feeling uncomfortable and figuring out your mechanics," Cobb said.
"He had a plus changeup," said Greg Dobbs, who picked up Miami's second hit, a single in the seventh inning. "It seemed early on, and later on too, a lot of first-pitch strikes. He was getting out ahead, making us swing and miss and making us foul pitches off. He had very good stuff today. Very good. He's a good pitcher."
It was an agonizing weekend for the Marlins, who scored just one earned run (four total) in 33 innings at Tropicana Field.
"We have to change whatever mentality we have," Guillen said. "Just make it easy. This is a game about making adjustments as quick as you can. That's the way you survive in the game. I'm not saying this because I'm a genius. I'm saying this because I played this game. I was very bad. But ... I had fun playing this game."
The Marlins entered the game with some momentum after outlasting the Rays, 4-3, in 15 innings on Saturday night. With Josh Johnson on the mound Sunday, Miami liked its chances of taking the series. The 6-foot-7 right-hander entered the afternoon not having lost an Interleague game since June 23, 2007, against the Twins.
Instead, Johnson gave up two runs in six innings. He struggled with command, as he walked four and struck out four. Of his 108 pitches, only 55 were strikes.
"A lot of balls and struggling to find the zone," Johnson said of his efforts. "I battled, though. I found a way to get outs. Just a couple of bad pitches."
For the second time in the series, the Marlins were shut out. They were held to one hit in an 11-0 loss on Friday.
B.J. Upton opened the first inning with a home run, and the Marlins were on their way to losing five of six to Tampa Bay this year.
In all three games of the series, the Marlins struck out at least 10 times, which kicked in a Rays promotion. Whenever Tampa Bay strikes out 10 or more batters, fans can receive a free Papa John's pizza.
"We made a lot of people fat," Guillen joked. "A lot of people will be overweight the next two months."
Guillen noted that last year, when he managed the White Sox, his club swept a four-game series at Tropicana Field. But in all four games, they struck out at least 10 times, meaning four more pizza days.
On a day he wasn't at his best, Johnson managed to minimize the damage. The right-hander repeatedly fell behind in the count. Showing what a challenge it was for him to find the plate, consider that 50 of his first 99 pitches were balls.
The Rays had at least one baserunner in all six of Johnson's innings, and two in five of them.
Gaby Sanchez's single to center to lead off the third inning was the lone hit Cobb allowed through six innings. The right-hander actually didn't let the hit make that much of a difference because Brett Hayes bounced into a 4-6-3 double play.
From the first pitch Johnson threw, Upton showed he was going to be aggressive. The Rays' center fielder pulled the first pitch he saw a long way foul.
Johnson got into a jam by throwing three straight balls. With the count 3-1, Upton belted a home run to left field. It was his first leadoff homer of the season and sixth of his career.
"The ball just ran right back over the middle of the plate, both of them," Johnson said. "The ball just ran back over, and he got me."
The Rays tacked on an insurance run in the sixth inning on Drew Sutton's two-out, full-count single to center. Johnson retired the first two in the inning, but issued a walk to Elliot Johnson.
Johnson stole second on a close play. Guillen raced to second base to argue, but he got a quick explanation from second base umpire Greg Gibson, and headed back to the dugout.
"He's a tough guy to face," Upton said of Johnson. "He's a really good pitcher and hitting first today, I thought it was really important to get off to good start. And I got a pitch I could handle. I think he wanted it to be a little farther out than where he threw it and I just took advantage of it."