Many kernels for RDF graphs have been designed to apply to machine learning such as classification and clustering. However, the performances of these kernels are affected by the variety of RDF graphs and machine learning problems. For dealing with the lack of robustness, this study proposes a generic kernel function called skip kernel that is a generalized of the existing PRO kernel. We formalize a feature extraction in the skip kernel that replaces some edges and nodes (corresponding to predicates and objects) of each resource with variables in a RDF graph. The skip kernel is effectively computed by (i) a recursive process of constructing each set of resources from RDF graphs and (ii) a size calculation of the intersection of two sets of skip structures for resources. We show that the time and space complexities of computing the skip kernel are reduced from O(d(2MN)d) and O(d(M +1)d-1MN) to O((M +1)d-1MN2) and O(M +dN), respectively. In our experiments, several kernels (skip, hop, PRO, walk, path, full subtree, and partial subtree) with SVMs are applied to ten classification tasks for resources on four RDF graphs. The experiments show that the skip kernel outperforms the other kernels with respect to the accuracy of the classification tasks.