If and when your shit stops working, start doing other shit.
We're not necessarily made to be generalists, but we might face situations where we're forced to develop our weaknesses to some degree. However, while a good portion of learning how and when to apply which skills can happen naturally, but.. well, best to short-cut it and get some exploration and self-development out of the way before situations arise. Personally, I agree with @Zarathustra on the idea of diminishing returns, Jung on the whole "embrace your damn shadow" thing, and so on.
Being scattered to the point of being absolutely useless isn't exactly fruitful, either. Honing existing skills and developing mastery can be beneficial, so long as you don't paint yourself into a corner.
On the tech side, I've known people who were, say, experts on such-and-such a part for some rocket engine that flew on such-and-such a space module decades ago; their specific expertise worked for them until their programs got canned and their skillsets became obsolete. Good on them if they were able to apply their skillsets somewhere else; bad news bears if they weren't. If they were too focused, they were dead.
To reconcile this mess, perhaps integration of the self can help us view specific problems from a variety of perspectives, so that we're able to form a more complete solution. Becoming an expert on, say, the J-2X rocket engine's cryogenic tubing structure will undoubtedly involve understanding the relevance of that tubing--at least a cursory understanding of how it connects with other parts of the engine, perhaps even how design teams work and how the contract funding stream allows you to keep your job in the first place.
Standpoints such as
"I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times."
--Bruce Lee (stolen from @jontherobot's signature)
"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects."
are both worth consideration.