Example on how to use pgfkeys and pgfopts for class or package
I assume you read the section of the pgf manual that documents pgfkeys. If you haven't, read it. Many times.
But knowing what the commands do isn't the same as knowing how to use them. Try looking at some source code for best practices. Maybe Christian Feuersänger's pgfplots package?
I'm trying to use pgfkeys for my packages, too, and I think the idea is to create a style for your objects and add your initial keys to those styles for defaults. Then if other keys are to change styles of other objects they can append to those styles.