> ## 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 when constructing `SkillToolset` directly through the ADK API.

<Note>
  When skills are loaded through Harness, CLI-generated agent code, or the
  AgentKit session capability service, VeADK automatically configures a local
  code executor for `SkillToolset`, so skill scripts run without additional
  configuration.
</Note>

## 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.

<Note>
  When loading skills, `VeSkillRegistry` tolerates non-standard frontmatter fields
  (community extensions) in `SKILL.md`, such as `allowed-tools`, `triggers`, and
  `requires`. These fields do not cause loading failures; they are preserved in
  the skill frontmatter's `metadata`.
</Note>

## Harness skills center

Harness can load both Skill Hub skills and AgentKit skills-center spaces. A plain name or slug in `skills` identifies a Skill Hub skill; the `space:` prefix identifies a skills-center space ID.

For creating, configuring, and deploying the Harness server, see [Harness server deployment](/productions/veadk/preview/en/deploy/harness).

The skills center requires Volcengine credentials that can read the space and its object-storage content. For local runs, set `VOLCENGINE_ACCESS_KEY` and `VOLCENGINE_SECRET_KEY`, plus `VOLCENGINE_SESSION_TOKEN` for temporary credentials. On VeFaaS, the bound IAM role can provide temporary credentials instead.

```bash lines theme={null}
cd my-harness
veadk harness add \
  --skills "data-visualization-cloud,space:ss-example"
```

The resulting `harness.yaml` stores the sources as a list:

```yaml lines theme={null}
skills:
  - data-visualization-cloud
  - space:ss-example
```

Harness downloads and loads the base skills during startup. `space:ss-example` loads every skill in that space and combines them with Skill Hub skills in one `SkillToolset`. You can also add a space for one invocation:

```bash lines theme={null}
veadk harness invoke \
  --name research-agent \
  --message "Prepare a research report" \
  --skills "space:ss-example"
```

Invocation-level `--skills` adds skills on top of the base Harness configuration without changing `harness.yaml`. If any skill cannot be downloaded, lacks a valid `SKILL.md`, or violates the ADK skill format, Harness stops that load instead of continuing with a partial skill set.

## 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],
)
```

### Dynamic skill loading

When `enable_dynamic_load_skills=True` is set, the agent reloads skills from their configured sources (local directories or cloud skill spaces) before each turn. When new, modified, or deleted skills are detected, the skill list, instruction, and tools are updated automatically without restarting.

<Note>
  `enable_dynamic_load_skills` can now be used independently of `skills`: even without an initial skill list, enabling it initializes the skills toolset and registers the refresh callback.
</Note>
