It’s been hard to find silver linings anywhere within Santa Clara’s NFL team. The 49ers have lost six straight and the season’s prognosis looks incredibly bleak even before the halfway point of the schedule.

Chip Kelly’s crew has the NFL’s least productive offense and a defense that can’t stop the run even when it knows it’s coming.

And while we’ve spent most of the bye week lamenting all things red and gold thanks to San Francisco’s brutal start, we decided to figure out what the team is good at. Hey, maybe there are areas the 49ers CAN build upon going the second half of the season and into 2017.

The running game

The 49ers’ have the NFL’s fourth-ranked rushing offense average 129 yards per game. That’s pretty good.

But Kelly’s offense ranks just 19th average 4.1 yards per carry. The mass running stats are good because the 49ers are averaging the second-most running plays in the NFL. Additionally, 322 of the team’s 900 yards rushing came from quarterbacks.

Related Draft Wire hits on three needs for 49ers in latest mock draft

Carlos Hyde put together a decent start to his season before suffering his shoulder injury in Buffalo that kept him from playing against the Buccaneers. Even with that one-game absence, he’s tied for second in the league with six touchdown runs.

The 49ers would like to get more out of Hyde from a yardage perspective, however. He’s averaging just 3.9 yards per carry (25th among qualified backs) and 72 yards per game. If he maintains that clip and returns to play against the Saints following the bye, Hyde would be on pace to have his first 1,000-yard season.

If the passing game were to improve, it would lighten the box and allow more running room for Hyde and Co. If Kelly lasts into a second season, he’ll point to the running game as the strength of his offense to build around.

Pass protection

The 49ers’ offensive line got off to a good start when it came to protecting Blaine Gabbert. It allowed just three sacks in the first four games combined. If Gabbert had a strength, it was getting rid of the ball quickly to negate the pass rush.

But then Week 5 happened and Gabbert was sacked seven times on the Thursday night loss to the Cardinals. And since Colin Kaepernick was put in the starting lineup, he took seven more over the next two weeks, giving the 49ers’ offense 17 allowed for the season.

Related Someone should tell the 49ers drafting a receiver early is smart

Allowing 14 sacks over the last three games ties the 49ers for the fifth-most allowed in the league – which is disappointing after the promising start.

The line will have a chance to rebound against a bad Saints defense after the bye week. If it does, and gets back to protecting the quarterback like it did early in the season, the 49ers should feel pretty good about their ability to stave off a pass rush after allowing the second-most sacks in the NFL (53) in 2015.

Trent Brown looks like the real deal and Joshua Garnett should be a starter for at least the next four years. Hooray, optimism.

Pass defense

For as often as we criticize general manager Trent Baalke’s team building, he’s put together a pretty good secondary.

The 49ers are allowing quarterbacks to complete 59 percent of their passes, ranking ninth in the league, while allowing 222 yards per game through the air. That ranks eighth.

Before his injury, Jimmie Ward was off to a good start at his new position playing cornerback on the outside. In his place while dealing with the quadriceps injury, rookie fourth-round pick Rashard Robinson showed a lot of promise before getting picked on by Jameis Winston and Mike Evans Sunday, when he allowed two touchdowns in coverage.

Related The early problem with Arik Armstead and DeForest Buckner

The stats are skewed some because teams don’t have any reason to pass against the 49ers. They have the league’s worst run defense, by far, and are only getting thrown on during 48 percent of plays, which is the lowest in the league.

But as the corners continue to develop, San Francisco should feel pretty good about the secondary heading into 2017. It’s one of the team’s only positions that doesn’t need a serious influx of talent.

On the other hand, Baalke’s invested so much draft capital in the secondary lately that it would be hugely disappointing if it wasn’t the team’s strength.

We’re willing to surmise the pass defense would be even better if the run defense was worth a lick, because play action would be less effective.

Looking ahead, let’s be cautiously optimistic about the highly drafted secondary featuring Eric Reid, Ward, Jaquiski Tartt, Will Redmond (who hasn’t played), Robinson, Dontae Johnson and Keith Reaser. It might be good enough to last.