Redefine factory in skeleton, and add provider generator