> For the complete documentation index, see [llms.txt](https://mycroft-ai.gitbook.io/mark-ii/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mycroft-ai.gitbook.io/mark-ii/differences-to-classic-core/porting-classic-core-skills/porting-the-hello-world-skill.md).

# Porting the Hello World Skill

This article explains, step-by-step, how the Classic Core Hello World Skill can be ported to the Mark II running Dinkum.

### 1. Copy Files Over

1. Find skill repository (template is ‘skill-\[name]’). In this case: [skill-hello-world](https://github.com/MycroftAI/skill-hello-world)
2. [SSH into Mark II](https://mycroft-ai.gitbook.io/mark-ii/ssh-access).
3. Go to the skills directory and make a new directory for your new Skill.
   * `cd /opt/mycroft-dinkum/skills`
   * `mkdir hello.mark2`
4. Next to the Dinkum repo, clone the Skill repo.
   * `cd /opt`
   * `sudo git clone https://github.com/MycroftAI/skill-hello-world.git`
5. Copy the files from the Skill repo into the new Skill directory.
   * `cp -r skill-hello-world/* mycroft-dinkum/skills/hello.mark2/`

### 2. **Modify** \_\_init\_\_.py

#### Modify import statement

```python
from mycroft import MycroftSkill, intent_handler 
```

to:

```python
from mycroft.skills import MycroftSkill, intent_handler
```

#### Replace interaction calls

Replace responses such as&#x20;

```python
 self.speak_dialog("welcome") 
```

with:&#x20;

```python
 return self.end_session(dialog=dialog, gui=gui)
```

For example:

```python
 # self.speak_dialog("hello.world")
 dialog = "hello.world"
 gui = None
 return self.end_session(dialog=dialog, gui=gui)
```

#### Enhance create\_skill

```python
def create_skill():
 return HelloWorldSkill()
```

becomes:

```python
def create_skill(skill_id: str):
     return HelloWorldSkill(skill_id=skill_id)
```

#### Add skill\_id and name to \_\_init\_\_ method

```python
def __init__(self, skill_id: str):
     """ The __init__ method is called when the Skill is first constructed.
     It is often used to declare variables or perform setup actions, however
     it cannot utilise MycroftSkill methods as the class does not yet exist.
     """
     super().__init__(skill_id=skill_id, name="HelloSkill")
     self.learning = True
```

### 3. **Add Skill to system files**

To `/opt/mycroft-dinkum/services/enclosure/service/skills.json` add:

```json
 { "name": "Hello World Skill", "skill_gid": "hello.mark2" },
```

To `/etc/systemd/system/dinkum-skills.service` add:

```
--skill /opt/mycroft-dinkum/skills/hello.mark2
```

### **4. Reload skills service settings**

```bash
sudo systemctl daemon-reload
```

### 5. **Restart Dinkum skills service**

```bash
sudo systemctl restart dinkum-skills.service
```

### 6. **Use your new Skill**

&#x20;“Hey Mycroft, how are you?”<br>
