I've had various conversations with the local police about close passes and one officer suggested a flag. The commercial ones are just 32cm long as made of orange plastic with red reflectors. But 32cm even if mounted on the outside of the pannier rank isn't much further out than my handlebars.
So this was my Mark 1 flag. It's the tip of an old fishing rod with a flag made of fluorescent fabric, edged with reflective tape. Its mainly held in place by the spring loaded bit of my pannier, supplemented by a couple of loose zip ties and a bit of my pannier rack elastics. If hit, it would deflect. It's 62cm long the same as my handlebars so I could pull it across when in cyclepaths and know it won't get in anyone's way. It makes my effective bike width about 90cm.
The flag seems to help with urban and single carriageway country roads so I started to think about improvements.
One issue is that flag needs to be able to pushed out and pulled back in - Eureka moment - telescopic.
So this is my DIY telescopic safety flag.
Telescopic inspection tool e.g. https://www.screwfix.com/p/hilka-pro-craft-32-telescopic-magnetic-pick-up-tool-led-light/5873r
Cut a blunt triangle of fabric about 10 inches long and 8 inches deep. I made the top edge 2 segments of telescope long.
Fold over the top and stitch a channel wide enough for the inspection tool to thread through.
I found the handle of my Rolson inspection tool would pull off. If it doesn't for you then stitch with the tool inside the channel.
Put diagonal red and white strips of the reflective take over the front of the flag. I left overlaps to fold over the edges. You will probably need to cut a narrow final stripe.
I chose red and white diagonal stripes as this is the standard for wide loads and it looks pretty visible to be in all conditions.
Turn over the flag and fold in the overlaps. I made a tiny error here and forgot to leave the channel open at the pointy end as well as the start of the channel and had to trim later.
Put orange reflective tape on the back side of the flag. I put these parallel to the top edge so that the flag would be stiffer. Trim off overlaps.
I then edge stitched the whole thing (remembering to keep the channel free)
Use the Velco ties to attach the handle of the tool under your saddle. I found that if I walloped the end of the tool, the whole thing would twist but not fall off. I didn't want to the attachment to be so solid that there was an risk that a collision with the flag would significantly destabilise the bike.
The whole thing retracts for cyclepaths and can be extended as far as you feel necessary. I find that partially out is good in urban areas and I extend it fully when dealing with roads prone to psychopaths. It's 75 cm from my mid line when fully extended. Apart from when fully extended, I can reach sideways and pull the flag in and out while riding.
On country roads I now have vehicles waiting behind for a safe pass rather than squeezing through. I am scrupulous in giving them a thank you wave or thumbs up, even though my belief is that this good behaviour is more out of concern for their paintwork than cyclist safety.