The
SkillToolset examples use the Google ADK 2.2 API. Complete installation and model configuration first
Local skills
Createskills/incident-summary/SKILL.md in your project:
skills/incident-summary/SKILL.md
main.py from the project root:
main.py
list_skills, load_skill, load_skill_resource, and run_skill_script. Configuring a registry also adds search_skills
SkillToolset parameters
Run skill scripts
When a shell script times out or is cancelled, the entire process group (including child processes spawned by the script) is terminated with up to 5 seconds for cleanup, preventing orphaned processes
scripts/, replace the toolset and agent configuration after loading skill above:
SkillToolset directly does not install script dependencies. Relevant loaders in Harness, CLI-generated code, and AgentKit session capability services configure a local executor. Review skill sources before using those entry points as well
Cloud skill spaces
Prepare a readable source ID and account credentials permitted to list skills and download their files.SKILL_SOURCE_ID is an environment variable defined by this example. Each VeSkillRegistry accepts exactly one source ID, not a comma-separated list
If the complete AK/SK pair is absent, the loader tries the environment’s IAM Role credentials. Set
AGENTKIT_TOOL_REGION to select an AgentKit skill-space region. Credentials, resources, region, and platform must match. SkillHub and AgentKit skill-space availability depend on the services enabled for the account
cloud_skills.py
python cloud_skills.py to inspect discoverable skills
Creating a registry does not download every skill.
search_skills fetches all source metadata and currently does not filter by the query. get_skill refreshes metadata and downloads the named skill on demand. Cached versions are reused; changed versions are downloaded again. The cache directory must be writable
Nonstandard cloud frontmatter fields such as allowed-tools, triggers, and requires are retained in metadata. Retention does not automatically enforce their permission or dependency declarations
Skill space policy
Set theSKILL_SPACE_POLICY environment variable to filter which skills are loaded from cloud skill spaces by skill ID. The variable supports two JSON formats: a global policy and a per-space policy.
Global policy
A global policy applies the same filter to all skill spaces. The JSON object contains the following fields:
When
mode is allow, only skills whose IDs are in the list are loaded. When mode is deny, skills whose IDs are in the list are excluded. When the variable is not set, all skills are loaded
Per-space policy
A per-space policy configures a separate filter for each skill space, useful when loading skills from multiple skill spaces with different filtering requirements. The JSON object contains the following field:
Each per-space policy object contains the following fields:
When a skill space is not present in
spaces, skills from that space are not filtered and all are loaded
The policy value must not exceed 8192 bytes. A malformed policy disables all cloud skill loading to avoid accidentally exposing an unrestricted set of skills
SKILL_SPACE_POLICY is set, VeADK automatically forwards it to remote sandbox sessions so that skill loading inside the sandbox follows the same filter. No manual pass-through is needed when using execute_skills, invoke_skill, poll_skill, or run_sandbox_agent; see Code sandboxes
A
skill_space_policy set on an individual skillspace entry in Harness selected_skills takes precedence over the SKILL_SPACE_POLICY environment variable; see Harness skills centerHarness skills center
Create a project and configure deployment credentials using Harness deployment. Replace the example names and IDs with accessible skills. Plain names or slugs identify Skill Hub skills; thespace: prefix identifies an AgentKit skill space
harness.yaml stores sources as a list:
space: source loads every skill in that space. An invocation can add skills for that request:
If any skill cannot be downloaded, lacks a valid
SKILL.md, or has an invalid format, loading fails instead of continuing with an incomplete set. Skills-center access requires permission to read the space and its object-storage contents
Harness skill space filtering
Throughselected_skills in harness.yaml (see Harness deployment), you can set a session-level filter policy for skillspace-source skill spaces. Add a skill_space_policy field to a selected_skills entry to filter skills by ID within that space without setting the SKILL_SPACE_POLICY environment variable
skill_space_policy is only valid when source is skillspace and requires skill_space_id to be set
When
mode is allow, only skills whose IDs are in the list are loaded. When mode is deny, skills whose IDs are in the list are excluded. Multiple skillspace entries can each set their own skill_space_policy for independent per-space filtering
When any
selected_skills entry sets a skill_space_policy, Harness uses these policies and ignores the SKILL_SPACE_POLICY environment variableharness.yaml
Harness TOS skills
selected_skills supports source: tos to load skills directly from TOS object storage without going through SkillHub or skill spaces. TOS skills can be loaded in two ways:
- Private TOS directory: Specify a
tos://<bucket>/<prefix>/address viatos_url. The skill directory is downloaded using the current account’s cloud credentials (AK/SK or the IAM Role bound to the runtime environment). The directory root must containSKILL.mdorskill.md - Public TOS zip archive: Specify an HTTPS address pointing to a
.zipfile viatos_public_url. No AK/SK is required. The address must target a TOS public endpoint (hostname containingtos-and ending with.volces.comor.bytepluses.com) and must not include userinfo or signature query parameters
tos entry loads one skill. To load multiple TOS skills, add a separate selected_skills entry for each
Exactly one of
tos_url and tos_public_url must be set; they are mutually exclusive. Private TOS directory downloads are limited to 1024 files and 64 MiB total size; public TOS zip archives have the same limits on extracted file count, uncompressed total size, and download size. Loading fails when any limit is exceededharness.yaml
Skill directory layout
Each skill has its own directory containing at leastSKILL.md. Its name should match the directory name, and its description should explain its purpose
references/ for material read on demand, assets/ for templates or media, and scripts/ for executable scripts. Create these optional directories only as needed and explain when to use their files in the skill instructions
Legacy local entry (deprecated)
Agent(skills=..., skills_mode="local") remains compatible but is deprecated. Migrate local skills to SkillToolset
Sandbox modes remain available. Before running this example, configure
SKILL_SOURCE_ID, the model, and the credentials and Tool ID required by code sandbox. Confirm that the sandbox has the required skills and network permissions:
sandbox_skills.py
Dynamic skill loading
enable_dynamic_load_skills=True applies to the legacy Agent.skills entry. It rereads sources before each turn and updates skill lists, instructions, and tools. The toolset is initialized even if skills starts empty. Applications sharing a mutable agent across concurrent calls must manage refresh and invocation concurrency
The flag does not hot-reload local objects passed directly to SkillToolset(skills=[...]). Registry-based loading does not require this flag. See runtime compatibility for external-runtime restrictions on legacy skill modes