How do you balance producing results with learning new skills?
A common fallacy I observe in students I supervise is that they think they need to spend some time "learning X" before they can use X productively in their research.
If you are doing research, the most efficient way to "learn X" (where X is a programming language, methodology, or subject area, that may be of use in your research) is almost always to learn it by immediately applying it directly to your research.
In other words, I tell my students that if they are "taking time off" to learn something before starting to use it in their work, they are doing it wrong.
I would give the same advice to you: instead of taking time off to learn a new skill, start applying it to your research right now. You might be a little slower than usual for a couple of weeks (because you aren't comfortable with the new skill yet), but you'll still be making forward progress on your research, while learning the new thing.
Edit: This applies even more if the thing you are learning is a fundamental skill, and not an "extra" technique. Fundamental skills include things like writing readable code, scientific writing, keeping good notes, etc. The best way to learn these things is to actively and consciously work on them as you do research. It's not generally effective to take "time off" to read some books, then go back to doing research and start practicing the things you read about.
If it's a new skill that can't be directly applied to your research, then you definitely shouldn't take time off to learn it. But you might consider spending time on it during intervals of downtime. You can't spend 100% of your working time on your primary research anyways (mental fatigue sets in at some point), so spend time learning the new skill when you need a break.
I think this is an instance of a more general problem, of trading off short-term efforts to hit particular milestones vs. longer-term investments. Those longer-term investments might be learning a new skill, but might as easily be organizing your thoughts, refactoring a code base, improving your work environment, hunting through the literature, etc.
When you can do both at once, it's ideal, but often that's not the case. If you focus on the short term, you end up in danger of neglecting the forest for the trees. If you go for the long term, you might end up engaged in some serious yak shaving.
I personally struggle with this quite a bit, especially when you also consider the additional responsibilities of writing papers and pursuing grants. The best solution that I have found so far is essentially duty cycling. On any given day, I will decide which task is my primary goal for the day, and just keep switching to make sure that neither short-term nor long-term is getting unduly neglected.
This is something I think about a lot as well. Even if you learn new things while doing research, you will still be slower and there are always things you want to learn that aren't directly connected to your ongoing projects.
I asked my advisor about this trade-off once and his recommendation was to do enough work to get to the next stage (ie do enough as a grad student to get a good post-doc, enough as a post-doc to get a faculty job) and then spend the rest of your time learning and thinking about new things. I'm actually quite fond of that answer, but the key is in knowing how much is enough!