> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veadk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills

A skill is a reusable prompt package that injects specific domain knowledge,
procedures, and scripts into an agent. Skills are Google ADK–compatible: load
local skills through ADK's `SkillToolset`, and connect cloud skill spaces
through VeADK's `VeSkillRegistry`.

## Local skills

Load a local skill directory with ADK's `load_skill_from_dir` and pass it as a
standard toolset to the agent:

```python lines theme={null}
from google.adk.skills import load_skill_from_dir
from google.adk.tools.skill_toolset import SkillToolset
from veadk import Agent

skill = load_skill_from_dir("/abs/path/to/skills/kb-skill")
agent = Agent(tools=[SkillToolset(skills=[skill])])
```

Skill loading, prompt injection, and tool exposure are all handled by ADK; the
tools visible to the model include `list_skills`, `load_skill`,
`load_skill_resource`, and `run_skill_script`. If a skill runs scripts from
`scripts/`, configure a suitable `code_executor` on the `SkillToolset` or the
agent — VeADK does not create a local code executor by default.

## Cloud skill spaces

Connect a cloud skill space through `VeSkillRegistry`, then hand it to
`SkillToolset`:

```python lines theme={null}
from google.adk.tools.skill_toolset import SkillToolset
from veadk import Agent
from veadk.skills import VeSkillRegistry

registry = VeSkillRegistry(skill_source_id=skill_space_id)
agent = Agent(tools=[SkillToolset(registry=registry)])
```

This does not download every skill up front: `search_skills` fetches the remote
skill list in real time, and `get_skill` downloads and loads a specific skill on
demand; when the remote version changes, the new version is re-downloaded.

## Skill directory layout

A local skill is a directory containing a `SKILL.md` file, and may include
`references/`, `assets/`, and `scripts/` subdirectories:

```text lines theme={null}
skills/
└── kb-skill/
    ├── SKILL.md
    ├── references/
    ├── assets/
    └── scripts/
```

`SKILL.md` must declare `name` and `description` in frontmatter, and the
directory name must match `name`:

```markdown SKILL.md lines theme={null}
---
name: kb-skill
description: A skill that queries the knowledge base and composes an answer.
---

Body...
```

## Legacy local entry (deprecated)

VeADK's old `Agent(skills=..., skills_mode="local")` local entry still works but
is deprecated; migrate to `SkillToolset` above. The `skills_sandbox` and
`aio_sandbox` modes are unaffected and used as before:

| Mode | Description |
| - | - |
| `local` | Deprecated. Loads local skills via VeADK's old path; migrate to ADK `SkillToolset`. |
| `skills_sandbox` | Skill hosted in a cloud skill space, executed in a sandbox via the `execute_skills` tool. |
| `aio_sandbox` | All-in-one sandbox mode, for AgentKit-hosted tool runtimes. |

Sandbox mode example:

```python lines theme={null}
from veadk import Agent
from veadk.tools.builtin_tools.execute_skills import execute_skills

agent = Agent(
    skills=[skill_space_id],
    skills_mode="skills_sandbox",
    tools=[execute_skills],
)
```
