Stop memorising scales as one big block. Learn to see the neck as octave chunks, find any root in a moment, and aim your ideas at the notes that always sound right. Pick a key once — every diagram below follows it.
Most players try to memorise a scale as one big two-octave block and then can never find the note they want in the moment. Here's the major scale across the neck in your key — useful, but hard to use for writing.
Don't memorise the whole block — learn one position box, then split it into its two one-octave halves: the lower half lives on the lower strings, the upper half on the higher strings. Same shape in every key (anchored to the root on the low E), labelled with interval names — R, Δ3, p4, …
From any root the scale runs two ways: a shape to the right (ascending) and a shape to the left (descending). Learn those two, plus where the root repeats across the strings — the octave map, with dashed lines showing the octave jumps — and you can drop in anywhere and instantly know the scale around you. Works the same for the full scale or the pentatonic.
To write over a chord, land on its chord tones — the triad 1·3·5 — and use the rest of the scale to colour around them. Those are the notes that always sound "right" over the chord. Add the 7th and you get the lush 3·5·7 sound.
The same trick works for every chord in the key — pick one and target its tones. And here's the side-door: to nail a chord like the V, think of its scale (e.g. play the major scale but flatten the 7th — that's Mixolydian), so its root, 3rd and 5th jump out instantly.
Because you know where every degree sits, you reach a mode by nudging a single note. The brightest colour, Lydian, is just the major scale with the 4th raised a fret to a ♯4. Flip it on, then deliberately target that ♯4 — over a maj7 it gives the floating maj7♯11 (a.k.a. maj7♭5) sound.
A complete idea = target a chord's tones, then spice with a colour note. Roll a starting point — it sets the key and lights up the target tones below.