This should be pretty straightforward, but I haven’t been able to find an answer anywhere…
I’m trying to develop a skill, but I don’t know what directory it should be in for Mycroft to see it. I’m using the Linux version, which has a .mycroft/skills directory with subdirectories for each of the skills I’ve installed, but those directories are empty and copying my skill directory there doesn’t cause Mycroft to see it when loading skills. There’s also a skills directory in opt/mycroft-core/mycroft/ but it doesn’t contain directories for skills, just a number of scripts that don’t seem to directly correspond to the installed skills. And while the documentation for skill development is generally helpful, it doesn’t actually say where you should put your skill while you’re developing it and before you’re ready to submit it to the Mycroft skills repo.
Also, I’m pretty sure I read something a few days ago about editing the mycroft.conf file to add a skill, but now I can’t find where I read it.
Hello, thanks for trying out skill development for Mycroft! You can place skills in
/opt/mycroft/skills and it will be automatically loaded within a few seconds. Specifically, place
vocab/, etc. directly inside a new folder at
/opt/mycroft/skills/MY_SKILL_NAME. @KathyReid This looks like something we might want to add to the top of the getting started page. I think it’s indirectly mentioned in a few places, but I couldn’t find a place where it’s directly mentioned.
I also just realized a few minutes before I saw your reply that skills can be installed through the Custom Install feature of the installer skill through the Mycroft Home skills page. That might be something you can mention in the documentation as well.
Unfortunately, I just ran into another problem. While I was able to install my skill through the Custom Install feature, I don’t see any way to update it to reflect changes, or to remove it. I thought maybe I could simply try to install it again through Mycroft Home, but that doesn’t seem to have worked.
[UPDATE] I took the nuclear option and just reinstalled Mycroft. Problem solved. And now that I know to put my skill in the /opt/mycroft/skills directory instead of trying to install it through the Mycroft Home dashboard, things should go much more smoothly.
@who.is.matt I didn’t end up needing nuclear option, but just wanted to second/affirm and extend your observations and Wolfgange’s notes. I eventually got to the point where I just develop directly on my mark1, right in the skills directory. There is some kind of modification time watcher or something, so every single time I save init.py, it very quickly gets reloaded automatically. Then I just commit and push right there from the “live” /opt/mycroft/skills/skill_name . If I decide to “uninstall” such a skill, its just an rm -rf on the directory (usual disclaimer on be super careful you are only hitting your development custom skill here).
For the most part, this i have had no problems with this, works pretty well. However, every once in a while I will get some kind of doubling-up of instances of the skill loaded into mycroft. In those cases, I have just rebooted and all back to normal. I bet I could just restart mycroft services to the same effect, but I’ve just opted for reboots for now.