Dear Trent Baalke,

This is it. If you don’t nail this offseason, you may be out as the general manager of the San Francisco 49ers. Your successor, Tom Gamble, already is in the building. He’s peeking in your office and thinking about how he’ll arrange your desk when it belongs to him. He’s waiting for you to fail.

I don’t want you to fail, Trent. But, you fail a lot. I’ve noticed. You failed the past four offseasons — just flat-out whiffed. I don’t trust you to make the right moves, so I’m going to tell you exactly what to do.

First, grab a pen and a notebook. Good. Now, open the notebook and write down what I tell you. Yes, just like that.

We’re going to skip free agency for now, because good free agents probably won’t sign with the 49ers. Your team is rebuilding, and your head coach, Chip Kelly, has a bad reputation among players around the league. Bad combination. Let’s focus on the draft. That’s where you’ll do most of your rebuilding this year.

Remember: Do not draft nutcases or medical red-shirts. You need players who play. Your job is on the line.

With your first pick, take the best linebacker available. Take UCLA’s Myles Jack if he hasn’t been taken already. Jack can replace Patrick Willis in the middle of the defense. If Jack is not available, take Clemson’s Shaq Lawson, who can replace Aldon Smith on the edge. You probably will end up with Lawson, not Jack. Jack seems like a top-five selection, and you pick seventh.

With your second pick, take an offensive lineman. Don’t even think about drafting another position. Your offensive line is one of the worst in the league — no quarterback could succeed behind it, not even Tom Brady. Build the O-line before you build the rest of the offense.

I suggest you draft Texas A&M’s Germain Ifedi. He can replace free agent Alex Boone at left guard, and eventually replace veteran Joe Staley at left tackle.

Are you writing this down, Trent?

With your third pick, take a pass rusher or an inside linebacker — whichever position you didn’t take with your first pick. If you took Lawson in the first round, take Missouri’s Kentrell Brothers in the third. Brothers is an inside linebacker who probably can’t replace Patrick Willis, but certainly can replace Chris Borland.

With your fourth pick, take a wide receiver. Anquan Boldin is a free agent who probably wants to sign with a contender, like the Kansas City Chiefs, Pittsburgh Steelers, New England Patriots or Carolina Panthers.

Even if Boldin were to re-sign with the Niners, San Francisco would have only two starting wide receivers — Boldin and Torrey Smith. The new head coach primarily uses three receivers at a time, which means you need to find a third starter.

I suggest drafting Southeast Missouri State’s Paul McRoberts. Sure, he played at a small school, but so did Jerry Rice. Forget the school. McRoberts can play. He’s big and fast and you don’t have receivers like him.

With your fifth pick, take a quarterback who can throw and run. Not a pure pocket passer with slow feet. Not a pure runner with a weak or inaccurate arm. You want a balanced mix.

You want Vernon Adams from Oregon. He’s like Russell Wilson — short, quick and a good passer. On the NFL scale, Adams’ passer rating in 2015 was 122.5. He’s a perfect fit for your offense.

With your sixth pick, take a free safety. Eric Reid played on his heels most of the second half of last season — he seemed like he was protecting himself. That’s no way to play safety. Ronnie Lott didn’t protect himself.

Reid may have lost his edge. He’s had three concussions in his career and probably doesn’t want a fourth. His career may not last long. You need free-safety insurance. I suggest you draft Florida free safety Keanu Neal.

With your seventh pick, take another pass rusher. Take Southern Utah’s James Cowser. Your defense ranked 29th in sacks last season, which means you need as many pass rushers as you can get.

With your eighth pick, take Missouri center Evan Boehm. Boehm is strong, unlike the center you drafted in the third round two years ago, the bust, Marcus Martin. Boehm replaces him.

That takes us through Round 5. You have four more picks in the final two rounds, but I’ll let you handle those selections. You’re good at finding players no one ever heard of.

Good luck, Trent. You can stop writing now.

Grant Cohn writes sports columns and the “Inside the 49ers” blog for The Press Democrat’s website. You can reach him at grantcohn@gmail.com.