We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
skill container is broken
When the intent skill became the intent class the skill container wasn't updated to match the new structure and is currently not working.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mycroft/skills/container.py`
Content:
```
1 # Copyright 2016 Mycroft AI, Inc.
2 #
3 # This file is part of Mycroft Core.
4 #
5 # Mycroft Core is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # Mycroft Core is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 import argparse
20 import sys
21 from os.path import dirname, exists, isdir
22 
23 from mycroft.configuration import ConfigurationManager
24 from mycroft.messagebus.client.ws import WebsocketClient
25 from mycroft.skills.core import create_skill_descriptor, load_skill
26 from mycroft.skills.intent import create_skill as create_intent_skill
27 from mycroft.util.log import getLogger
28 
29 __author__ = 'seanfitz'
30 
31 LOG = getLogger("SkillContainer")
32 
33 
34 class SkillContainer(object):
35     def __init__(self, args):
36         params = self.__build_params(args)
37 
38         if params.config:
39             ConfigurationManager.load_local([params.config])
40 
41         if exists(params.lib) and isdir(params.lib):
42             sys.path.append(params.lib)
43 
44         sys.path.append(params.dir)
45         self.dir = params.dir
46 
47         self.enable_intent_skill = params.enable_intent_skill
48 
49         self.__init_client(params)
50 
51     @staticmethod
52     def __build_params(args):
53         parser = argparse.ArgumentParser()
54         parser.add_argument("--config", default="./mycroft.conf")
55         parser.add_argument("dir", nargs='?', default=dirname(__file__))
56         parser.add_argument("--lib", default="./lib")
57         parser.add_argument("--host", default=None)
58         parser.add_argument("--port", default=None)
59         parser.add_argument("--use-ssl", action='store_true', default=False)
60         parser.add_argument("--enable-intent-skill", action='store_true',
61                             default=False)
62         return parser.parse_args(args)
63 
64     def __init_client(self, params):
65         config = ConfigurationManager.get().get("websocket")
66 
67         if not params.host:
68             params.host = config.get('host')
69         if not params.port:
70             params.port = config.get('port')
71 
72         self.ws = WebsocketClient(host=params.host,
73                                   port=params.port,
74                                   ssl=params.use_ssl)
75 
76     def load_skill(self):
77         if self.enable_intent_skill:
78             intent_skill = create_intent_skill()
79             intent_skill.bind(self.ws)
80             intent_skill.initialize()
81         skill_descriptor = create_skill_descriptor(self.dir)
82         self.skill = load_skill(skill_descriptor, self.ws)
83 
84     def run(self):
85         try:
86             self.ws.on('message', LOG.debug)
87             self.ws.on('open', self.load_skill)
88             self.ws.on('error', LOG.error)
89             self.ws.run_forever()
90         except Exception as e:
91             LOG.error("Error: {0}".format(e))
92             self.stop()
93 
94     def stop(self):
95         if self.skill:
96             self.skill.shutdown()
97 
98 
99 def main():
100     container = SkillContainer(sys.argv[1:])
101     try:
102         container.run()
103     except KeyboardInterrupt:
104         container.stop()
105     finally:
106         sys.exit()
107 
108 
109 if __name__ == "__main__":
110     main()
111
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mycroft/skills/container.py b/mycroft/skills/container.py
--- a/mycroft/skills/container.py
+++ b/mycroft/skills/container.py
@@ -23,7 +23,7 @@
 from mycroft.configuration import ConfigurationManager
 from mycroft.messagebus.client.ws import WebsocketClient
 from mycroft.skills.core import create_skill_descriptor, load_skill
-from mycroft.skills.intent import create_skill as create_intent_skill
+from mycroft.skills.intent import Intent
 from mycroft.util.log import getLogger
 
 __author__ = 'seanfitz'
@@ -44,7 +44,7 @@
         sys.path.append(params.dir)
         self.dir = params.dir
 
-        self.enable_intent_skill = params.enable_intent_skill
+        self.enable_intent = params.enable_intent
 
         self.__init_client(params)
 
@@ -57,7 +57,7 @@
         parser.add_argument("--host", default=None)
         parser.add_argument("--port", default=None)
         parser.add_argument("--use-ssl", action='store_true', default=False)
-        parser.add_argument("--enable-intent-skill", action='store_true',
+        parser.add_argument("--enable-intent", action='store_true',
                             default=False)
         return parser.parse_args(args)
 
@@ -74,10 +74,9 @@
                                   ssl=params.use_ssl)
 
     def load_skill(self):
-        if self.enable_intent_skill:
-            intent_skill = create_intent_skill()
-            intent_skill.bind(self.ws)
-            intent_skill.initialize()
+        if self.enable_intent:
+            Intent(self.ws)
+
         skill_descriptor = create_skill_descriptor(self.dir)
         self.skill = load_skill(skill_descriptor, self.ws)

{"golden_diff": "diff --git a/mycroft/skills/container.py b/mycroft/skills/container.py\n--- a/mycroft/skills/container.py\n+++ b/mycroft/skills/container.py\n@@ -23,7 +23,7 @@\n from mycroft.configuration import ConfigurationManager\n from mycroft.messagebus.client.ws import WebsocketClient\n from mycroft.skills.core import create_skill_descriptor, load_skill\n-from mycroft.skills.intent import create_skill as create_intent_skill\n+from mycroft.skills.intent import Intent\n from mycroft.util.log import getLogger\n \n __author__ = 'seanfitz'\n@@ -44,7 +44,7 @@\n         sys.path.append(params.dir)\n         self.dir = params.dir\n \n-        self.enable_intent_skill = params.enable_intent_skill\n+        self.enable_intent = params.enable_intent\n \n         self.__init_client(params)\n \n@@ -57,7 +57,7 @@\n         parser.add_argument(\"--host\", default=None)\n         parser.add_argument(\"--port\", default=None)\n         parser.add_argument(\"--use-ssl\", action='store_true', default=False)\n-        parser.add_argument(\"--enable-intent-skill\", action='store_true',\n+        parser.add_argument(\"--enable-intent\", action='store_true',\n                             default=False)\n         return parser.parse_args(args)\n \n@@ -74,10 +74,9 @@\n                                   ssl=params.use_ssl)\n \n     def load_skill(self):\n-        if self.enable_intent_skill:\n-            intent_skill = create_intent_skill()\n-            intent_skill.bind(self.ws)\n-            intent_skill.initialize()\n+        if self.enable_intent:\n+            Intent(self.ws)\n+\n         skill_descriptor = create_skill_descriptor(self.dir)\n         self.skill = load_skill(skill_descriptor, self.ws)\n", "issue": "skill container is broken\nWhen the intent skill became the intent class the skill container wasn't updated to match the new structure and is currently not working.\n", "before_files": [{"content": "# Copyright 2016 Mycroft AI, Inc.\n#\n# This file is part of Mycroft Core.\n#\n# Mycroft Core is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Mycroft Core is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.\n\n\nimport argparse\nimport sys\nfrom os.path import dirname, exists, isdir\n\nfrom mycroft.configuration import ConfigurationManager\nfrom mycroft.messagebus.client.ws import WebsocketClient\nfrom mycroft.skills.core import create_skill_descriptor, load_skill\nfrom mycroft.skills.intent import create_skill as create_intent_skill\nfrom mycroft.util.log import getLogger\n\n__author__ = 'seanfitz'\n\nLOG = getLogger(\"SkillContainer\")\n\n\nclass SkillContainer(object):\n    def __init__(self, args):\n        params = self.__build_params(args)\n\n        if params.config:\n            ConfigurationManager.load_local([params.config])\n\n        if exists(params.lib) and isdir(params.lib):\n            sys.path.append(params.lib)\n\n        sys.path.append(params.dir)\n        self.dir = params.dir\n\n        self.enable_intent_skill = params.enable_intent_skill\n\n        self.__init_client(params)\n\n    @staticmethod\n    def __build_params(args):\n        parser = argparse.ArgumentParser()\n        parser.add_argument(\"--config\", default=\"./mycroft.conf\")\n        parser.add_argument(\"dir\", nargs='?', default=dirname(__file__))\n        parser.add_argument(\"--lib\", default=\"./lib\")\n        parser.add_argument(\"--host\", default=None)\n        parser.add_argument(\"--port\", default=None)\n        parser.add_argument(\"--use-ssl\", action='store_true', default=False)\n        parser.add_argument(\"--enable-intent-skill\", action='store_true',\n                            default=False)\n        return parser.parse_args(args)\n\n    def __init_client(self, params):\n        config = ConfigurationManager.get().get(\"websocket\")\n\n        if not params.host:\n            params.host = config.get('host')\n        if not params.port:\n            params.port = config.get('port')\n\n        self.ws = WebsocketClient(host=params.host,\n                                  port=params.port,\n                                  ssl=params.use_ssl)\n\n    def load_skill(self):\n        if self.enable_intent_skill:\n            intent_skill = create_intent_skill()\n            intent_skill.bind(self.ws)\n            intent_skill.initialize()\n        skill_descriptor = create_skill_descriptor(self.dir)\n        self.skill = load_skill(skill_descriptor, self.ws)\n\n    def run(self):\n        try:\n            self.ws.on('message', LOG.debug)\n            self.ws.on('open', self.load_skill)\n            self.ws.on('error', LOG.error)\n            self.ws.run_forever()\n        except Exception as e:\n            LOG.error(\"Error: {0}\".format(e))\n            self.stop()\n\n    def stop(self):\n        if self.skill:\n            self.skill.shutdown()\n\n\ndef main():\n    container = SkillContainer(sys.argv[1:])\n    try:\n        container.run()\n    except KeyboardInterrupt:\n        container.stop()\n    finally:\n        sys.exit()\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "mycroft/skills/container.py"}], "after_files": [{"content": "# Copyright 2016 Mycroft AI, Inc.\n#\n# This file is part of Mycroft Core.\n#\n# Mycroft Core is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Mycroft Core is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.\n\n\nimport argparse\nimport sys\nfrom os.path import dirname, exists, isdir\n\nfrom mycroft.configuration import ConfigurationManager\nfrom mycroft.messagebus.client.ws import WebsocketClient\nfrom mycroft.skills.core import create_skill_descriptor, load_skill\nfrom mycroft.skills.intent import Intent\nfrom mycroft.util.log import getLogger\n\n__author__ = 'seanfitz'\n\nLOG = getLogger(\"SkillContainer\")\n\n\nclass SkillContainer(object):\n    def __init__(self, args):\n        params = self.__build_params(args)\n\n        if params.config:\n            ConfigurationManager.load_local([params.config])\n\n        if exists(params.lib) and isdir(params.lib):\n            sys.path.append(params.lib)\n\n        sys.path.append(params.dir)\n        self.dir = params.dir\n\n        self.enable_intent = params.enable_intent\n\n        self.__init_client(params)\n\n    @staticmethod\n    def __build_params(args):\n        parser = argparse.ArgumentParser()\n        parser.add_argument(\"--config\", default=\"./mycroft.conf\")\n        parser.add_argument(\"dir\", nargs='?', default=dirname(__file__))\n        parser.add_argument(\"--lib\", default=\"./lib\")\n        parser.add_argument(\"--host\", default=None)\n        parser.add_argument(\"--port\", default=None)\n        parser.add_argument(\"--use-ssl\", action='store_true', default=False)\n        parser.add_argument(\"--enable-intent\", action='store_true',\n                            default=False)\n        return parser.parse_args(args)\n\n    def __init_client(self, params):\n        config = ConfigurationManager.get().get(\"websocket\")\n\n        if not params.host:\n            params.host = config.get('host')\n        if not params.port:\n            params.port = config.get('port')\n\n        self.ws = WebsocketClient(host=params.host,\n                                  port=params.port,\n                                  ssl=params.use_ssl)\n\n    def load_skill(self):\n        if self.enable_intent:\n            Intent(self.ws)\n\n        skill_descriptor = create_skill_descriptor(self.dir)\n        self.skill = load_skill(skill_descriptor, self.ws)\n\n    def run(self):\n        try:\n            self.ws.on('message', LOG.debug)\n            self.ws.on('open', self.load_skill)\n            self.ws.on('error', LOG.error)\n            self.ws.run_forever()\n        except Exception as e:\n            LOG.error(\"Error: {0}\".format(e))\n            self.stop()\n\n    def stop(self):\n        if self.skill:\n            self.skill.shutdown()\n\n\ndef main():\n    container = SkillContainer(sys.argv[1:])\n    try:\n        container.run()\n    except KeyboardInterrupt:\n        container.stop()\n    finally:\n        sys.exit()\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "mycroft/skills/container.py"}]}