MIAMI (AP) -- Barry Bonds stood in the batting cage holding a bat as he held court. His audience: slumping slugger Giancarlo Stanton.

"I haven't hit in a while, so I can't do it perfect," Bonds said before taking another cut. "But I'm trying not to swing so hard."

To punctuate his point, the home run king lined a pitch down the third-base line. Stanton nodded.

More from FoxSports

The Miami Marlins' cleanup hitter and batting coach spent more than half an hour together before Friday's game against Washington trying to solve the slump. Stanton went into the weekend in a 4-for-41 funk that dropped his average to .221, with strikeouts in his past seven at-bats. He has 11 homers, but only one RBI since May 6.

Bonds said the session in the cage on an otherwise deserted field at Marlins Park was Stanton's idea.

"He wanted to get out and work on some things, just tracking the ball and doing some little things," Bonds said. "I just stepped in there to give him couple of breaks."

Manager Don Mattingly watched and offered occasional feedback.

"It's all about taking your time in your work and getting big G's feel back," Mattingly said. "You get out of sync a little bit, and the next thing you know it snowballs on you."

Helping Stanton regain his stroke is a learning experience for Bonds, who is back in the majors this year for the first time since his final season as a player in 2007.

When asked how much difference his input can make as a hitting coach, Bonds said, "If you have the right questions, a lot. If you don't, it could go bad real fast. You have to be careful what you say and how you present it. We have to be on same page."

Bonds was a .298 career hitter with a record 762 home runs. But even he slumped, and he would turn to his father -- former major leaguer Bobby Bonds -- and to Hall of Famer Willie Mays for advice.

"I've been there," Bonds said. "I know the conversations I've had with my dad. I know the conversations I had with Willie. But as a hitter you have to express yourself, too. I have to express myself as to what I see, and find out what Giancarlo likes to do, and see if we can marry the two together."

Stanton has struggled to make contact lately trying to pull the ball. But urging him to hit to the opposite field isn't necessarily the solution, Mattingly said.

"That's part of the problem when you get in one of these," Mattingly said. "You've got the doorman telling you how to hit. You've got your mom, cousin, high school coach and sportswriters telling what you should be doing. We're just working on him getting his feel back and getting his timing."

Bonds agreed, and laughed at the notion of Stanton trying to hit the ball the other way or to the middle of the field.

"There is no middle of the field for Stanton," he said. "It's the back of the stadium. That's a big strong boy right there."