When it comes to composing metal, it can be a struggle but with a few techniques and concepts you can really hammer out a lot of tunes quickly.
First off, consider the following riff styles:
Groove
Thrash
Chordal
These three styles of riffs can be recycled over and over within a tune while still providing some variation.
When it comes to developing a riff, I use two simple concepts:
Mental Brainstorm
Improvising / Jamming
The first one is simple. Try hearing an idea in your head and then figure out how to play it on the guitar. Now when it comes to writing a riff while improvising, there is one small step to take that will help you develop solid, quality ideas...PLAY SLOWLY and work to develop the idea into something special. The last thing you want to do is use everything that comes out when you’re jamming at full speed. From my experience, the ideas that are rushed are low quality and not very unique. Put some thought into it. One thing I should mention is that these two processes work together, they are not separate. When you brainstorm an idea you have to jam to get it out. When you improvise an idea you need to brainstorm where to go with it.