question about dim chords

Diminished scale (half-whole or whole-half) and diminished arpeggio. Any scale that includes the tones within the chord will work fine (i.e., 1, b3, b5, bb7). Or, if the diminished chord comes by way of substitution, look at your tonic and decide from there. Be careful of that tritone though - it can be clashy.
 
In other words, you can play the actual diminished SCALE... for example an A diminished could be A, B, C, D, D#, F, F#, G# or A, A#, C, D, D#, F, F#, G. Depending on the chord behind it.

BUT, what seems to be more commonly used is a simple pattern of minor thirds. A, C, D#, F#. Fingerings for these can be difficult.
 
Simple answer is half-whole or whole-half symmetric scales. But this is akin to "playing the A major scale over an A major chord." It's an oversimplified way of looking at it.

What you have to look at is the chord BEFORE the diminished chord, and the chord AFTER. The important thing is context. Is this chord just a passing voice? Is it part of a tritone substitution or some kind of chromatic ascent?

Typically, if you have a diminished chord in a song, the melody should be fairly obvious. Beyond that, if you're talking about jazz theory, then you really do have to try to get creative. You can take just about any scale you want, modalize it, and then choose a melody that highlights the right notes from one chord to the next in a beautiful way. But you have to remember to play a melody that actually USES the chords in question, and you also have to remember to resolve your dissonances (and if you're playing over a diminished chord, there is dissonance).