Create a prefab of custom type

Hey there!
I’m trying to create a prefab from an object of type “Skill”:

UnityEditor.PrefabUtility.CreatePrefab("Assets/Resources/prefabs/skills/" + + ".prefab", skills*.GetComponent<Skill>());*_

Which gives me an error “can’t convert “Skill” type to “Object””.
That variant is working well:
UnityEditor.PrefabUtility.CreatePrefab(“Assets/Resources/prefabs/skills/” + + “.prefab”, skills*.gameObject);*
But I need that prefab to Instantiate other Skill-type objects, and
Skill prefab = UnityEditor.AssetDatabase.LoadAssetAtPath(“Assets/Resources/prefabs/skills/” + skillNames + “.prefab”, typeof(Skill));
gives me an error obviously, because it can’t convert a gameObject-type Prefab into a Skill-type one.
Is there any way I can make a Skill-type prefab?

A Prefab is nothing but a serialised gameObject. While it allows you to keep instances of a game object up to date in the editor, at runtime, it’s nothing but a gameObject you can instantiate.
Notice that PrefabUtility is part of UnityEditor assembly, thus unavailable at runtime.

The PrefabType is an Editor enum to differentiate an imported 3D model from a user created prefab, and a Prefab Instance from a Prefab.

If what you want is to store data to be used by a MonoBehaviour, I would recommend using a ScriptableObject. It allows you to create different data types, to store several data of a same type and load them at runtime.