# Use the functions of a child competency

Let's use the skill of the previous chapter. We add a custom function.

`skills/my-skill/my-skill.js`

```javascript
import code from 'my-skill.converse'

export default {
    code,
    functions: {
        hello() {
            return 'Hey'
        }
    }
}
```

But we can use it in the parent scenario.

`main.js`

```javascript
import code from './main.converse'
import mySkill from 'skills/my-skill/my-skill'

export default {
    code,
    skills: {
        mySkill
    }
}
```

In `main.converse`, we will then have:

```typescript
@Event('start')
start() {
    > { mySkill.hello() }
}
```

As we can see, we use the `mySkill` object to access functions.

### Read directly a function of the conversational script

Without going through the `functions` property, we can directly read a function from the conversational script of the child skill. Using the code above, we add these instructions to the script:

`skills/my-skill/my-skill.converse`

```typescript
askName() {
    > What's your name ?
    Prompt()
    return :text
}
```

`main.converse`

```typescript
@Event('start')
start() {
    name = mySkill.askName()
    > Your name is { name }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.newbot.io/use-newbot-framework-js/create-a-skill-more-details/use-the-functions-of-a-child-competency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
