I don't. I'm nowhere near good enough. A good cadenza will summarize, brilliantly, the preceding movement of the work (sometimes the entire work, which is much harder) with regard to themes, key changes and modulations, and mood, and will end -- triumphantly -- on the home key. In a nutshell.
A really brilliant virtuoso -- say a Horowitz or Rubinstein or, on a different instrument, a Heifetz, might dare to improvise a cadenza on a very good night. It is much more likely that he or she will essentially compose a cadenza during practice for the work; he or she may or may not write it down, but will work it so it is satisfying and then practice it -- just as he or she would practice the rest of the work -- so that it is consistent and flawless.
And then, likely as not, someone else will write it down!