# aiGlobalSkills

Access the globally shared pool of AI skills that are automatically injected into every agent's system context.

## Syntax

```javascript
aiGlobalSkills()
```

## Parameters

No parameters.

## Returns

Returns an `Array` of `AiSkill` instances configured as global skills in `ModuleConfig.bx`. Returns an empty array if no global skills are configured.

## Examples

### Inspect Global Skills

```javascript
globals = aiGlobalSkills()

println( "Global skills: #globals.len()#" )

globals.each( skill => {
    println( " - #skill.getName()#: #skill.getDescription()#" )
})
```

### Use Global Skills with an Agent

```javascript
// Global skills are already injected automatically.
// This example shows how to add them explicitly alongside custom skills.
agent = aiAgent(
    name  : "assistant",
    skills: aiGlobalSkills().append( myCustomSkill )
)
```

### Configure Global Skills in ModuleConfig.bx

Global skills are registered in your module's `ModuleConfig.bx` and apply to every agent across the application:

```javascript
// ModuleConfig.bx (inside a BoxLang module only)
variables.moduleSettings = {
    globalSkills: aiSkill( path: ".ai/skills/global" )
}
```

For application-level registration without a module, add skills directly to each agent or use `availableSkills` with a shared array variable.

## Related Pages

* [Skills](/main-components/skills.md) — Full skills documentation
* [aiSkill()](/advanced/reference/built-in-functions/aiskill.md) — Load skills from files or create inline


---

# 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://ai.ortusbooks.com/advanced/reference/built-in-functions/aiglobalskills.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.
