Hi,
If you have created your project using archtype there must be a template already created you can refer the same to create a new one.
So to create a new xf template it's similar to templates just that page template would be used to create new xf template.
Refer wknd code as well.
Regards
Ankur
...