Given his recent success against the San Diego Padres, Johnny Cueto should feel confident about rebounding from his first loss with the San Francisco Giants.

James Shields certainly can't take anything good out of his last visit to AT&T Park.

As Shields seeks his first victory, Cueto will try to win for the fourth time in five starts and lead San Francisco to its seventh straight home win in this series Tuesday night.

More from FoxSports

For the most part, Cueto (3-1, 3.49 ERA) has been everything the Giants (10-11) hoped for after signing him to a six-year deal in December. He's gone at least seven innings in all four outings, and has given up three runs or fewer in three of those.

Cueto, however, didn't get much help Thursday when he surrendered three runs in a 6-2 loss to Arizona. He hasn't needed much scoring in his recent meetings with the Padres as he's 4-1 with a 2.25 ERA in his last five.

In his only matchup last season, the right-hander allowed four hits and struck out nine over seven innings of a 4-0 victory on June 7 while he was with Cincinnati.

Now he'll try to help the Giants finish the last two dates on a disappointing 10-game homestand on a positive note. Since dropping the last four of a 1-8 stretch to open this stay, San Francisco has rebounded to win three of its last four with Monday's 5-4 victory.

Shields hasn't won through four outings for the first time despite posting three quality starts. He allowed three runs over six innings in Thursday's 11-1 home loss to Pittsburgh.

"(He's) so cerebral and has so many different ways that he can go about attacking hitters," manager Andy Green told MLB's official website of his right-hander.

Shields (0-3, 4.15) has gone 2-1 with a 2.88 ERA in four career regular-season starts versus San Francisco, though he'd like to forget his appearance at AT&T Park last June. He surrendered seven runs and nine hits over four innings in a 13-8 defeat.

Joe Panik is 5 for 10 with two doubles versus Shields, but Buster Posey has gone 2 for 12, Denard Span is 4 for 30 and Matt Duffy is 1 for 12 with seven strikeouts. Hunter Pence has really scuffled, going hitless in his 13 at-bats.

Panik and Angel Pagan each had three hits in the opener while Posey was 2 for 4 with his third homer and Pence hit his fourth long ball. Posey is batting .425 with three homers and 16 RBIs in his last 12 home games versus San Diego, but it's Pagan's presence in the No. 9 hole - he's hitting .350 in 12 games there - that's caught Bruce Bochy's attention.

"It's working right now where he's at," Bochy said of Pagan. "I think he likes hitting there. I'm very much aware how much he's doing offensively."

San Francisco has heated up as a whole, totaling 24 runs and batting .375 over the past four games. The club also has outscored the Padres 50-16 while winning the last five meetings at AT&T Park.

San Diego (7-13) is struggling to put runs on the board, averaging 3.1 per game and hitting .230 while dropping eight of its last 12. Matt Kemp had the only multi-hit game Monday, going 3 for 5 with two doubles.

Kemp has seen the ball well off Cueto with seven hits - two homers - in 16 career at-bats. Alexei Ramirez has gone 7 for 11 with one homer and Jon Jay is 12 for 29 with three.