Here's an example of using a diminished chord as part of a lick where the chords structure doesn't use the diminished. The first row of tab is the same as the audio and the second row of tab is an alternate version. You will hear lot of little variations of this riff, and some use a little bit of timing variation to get a different sound and feel.
Note that pushing pedals 5 and 6 together are often used to get a diminished chord on C6. They also lower strings 5 and 6 a half tone. If you activate these pedals and move the bar up one fret, string 4 becomes a dominant 7th note and you get a 3 note dominant 7th chord on strings 4,5 and 6. This has the same effect as just raising string 4 a half tone with the bar at the root position.