Let's say you found a lick you are fond of. In order to be able to use it in any song, you'll have to transpose the lick in several scales until you get used to it.
Another thing is to play the lick in different rhythms. Let's take a very simple lick:
Now, play it in different ways:
Of course, you may play the lick at different tempos. A metronome may help.
So, take your favorite licks and play them as 1/8s, 1/16s and odd measure partitions. In the end, you'll master them good enough to use any of them in any given piece of music.