Code yourself out of the job
Your ego loves being the critical member of a team.
Everyone looks up to you, seeks your advice, runs important decisions by you, and makes sure their code is up to your standard. You're the genius who started this project and knows where all the bodies are buried. Feels great!
Then one by one your team starts leaving. Joe gets pulled into a critical company-saving project. Huge career opportunity. Alice single-handedly talks the CMO off a ledge and repairs an important stakeholder relationship after a bug killed their metrics. Jane spends more and more time with product, helping define long-term strategy.
All the while you're sitting here making progress on the team's core focus and making sure everything looks right. Your ego loves it, but your mind is thinking "Where are MY opportunities?".
They're not coming. You're critical to this project. Can't afford to lose you. Wouldn't dare distract you with something else. Plus aren't you swamped being in every pull request, meeting, chat thread, and discussion about your precious baby? You don't have time for new opportunities even if you want them!
This is the hidden cost of hoarding your legos. You become trapped in your role and your project. No time for big opportunities.
Your goal should always be to code yourself out of the job.
How to code yourself out of the job
Empower others to make decisions without you. Build systems others can follow on their own. Systematize common tasks. Make "the right way" to solve a problem the obvious way to solve that problem. Don't tell people what to do, explain the important factors you think about and let everyone reach their own conclusions.
Then step back and relax. You've empowered the team to play with your legos and you're free to take on new challenges and opportunities.
You might even change jobs to a different part of the company! Leave your baby in the good hands of your team. Trust.
Or you could leave the company. Tech is small [name|]. You want to build a reputation of leaving behind a flourishing project, not a smoldering trashpile.
Cheers,
~Swizec