Barack Obama gave his speechwriter career advice that set him on the path to becoming a LinkedIn VP. Now he’s using that to identify the framework for a long-lasting career

Fortune· Bill Pugliano—Getty Images

When Aneesh Raman was working as Barack Obama’s speechwriter there was one piece of career advice the President would often share that stuck with the former CNN war correspondent: “Worry about what you want to do, not who you want to be.”

You only have to glance at Obama’s career to see his motto in action. The first African-American president in U.S. history worked in community organizing and law for decades before being inaugurated in 2009.

“He wanted to build communities in a different way,” Raman told CNBC Make It, “and it led him on his path that led to this moment where he became president.”

It’s why instead of focusing on your dream title, Raman recommends thinking about the impact you want to make through your work first and then honing the skills you’ll need to get there.

That advice has taken Raman from writing Obama’s speeches from 2011 to 2013 to partnering with NGOs as Facebook's head of economic impact to co-authoring several books.

Now he’s heading up LinkedIn’s Opportunity Project, which is focused on building a more dynamic and equitable global labor market, as a vice president.

Your 20s and 30s are for learning skills

Using Obama’s mantra for career success, Raman advises those in their twenties and early thirties to forgo titles completely to focus on skills development, before specializing in their mid-thirties.

This framework is the “safest” way to think of a long-lasting career, Raman said, “because you can control all of those levers, versus job title. You might want to be a VP of something at somewhere, but you can’t control any of that, and that job might not even exist in 20 years.”

And don’t worry if your career path looks all over the place on paper. Raman recommends embracing a "squiggly line" approach—where your career isn’t quite linear—as long as it has a connective thread.

“My job titles as a career don’t make sense,” he said, “but my skills across the board are storytelling and coalition building” around economic opportunity.

Here’s his framework for long-lasting career success:

Age 20 to 35

This is the time to find out what you’re excited at, what you’re good at, and what you want to get better at, Raman said. Evaluate whether certain jobs or employers will help you acquire the skills you need.

Age 35 to 45 

Now it’s time to use your unique skillset and apply it to an issue of expertise, whether that's in a specific field like healthcare or something broader like Raman's focus on “economic opportunity.”

Age 45+

Only after hitting 45 years old should you be thinking about what kind of impact you want to make on your organization and on the world, Raman said. After all, Obama was 47 when he took the presidency and he was one of the nation's youngest leaders.

‘Worry about learning, not your next job’

Obama’s not the first leader to tell aspirational people to stop worrying about their next job title. Shaid Shah, the global president of the $50 billion global food and pet care giant, Mars Food & Nutrition, previously told Fortune that “career success is more than just hierarchy.”

“It’s about acquiring the experiences that you need to realize your ambition, to realize what makes you happy, what makes you tick, what inspires you to get out of bed every day,” explained Shah, who steadily climbed the ranks from sales director to the helm of Mars Food & Nutrition department.

In doing that, you’re more likely to choose roles that move you closer to where you ultimately want to be and attain long-term success, instead of taking what just looks like a promotion on paper now.

Similarly, Pret’s CEO told Fortune that looking forward with his feet firmly on the ground, instead of dreaming too big with his head in the clouds, is what set him up for success.

“I’ve watched people that have been so fixated on the next role that they really take their eye off the job they’re doing,” Pano Christou said. “My philosophy has always been if you do a great job, people will notice you.”

By focusing on excelling in his current job and being the best within his cohort, the promotions (from shop floor manager to CEO) swiftly followed. “If you work hard and put your head down, things can happen.”

This story was originally featured on Fortune.com