Generate Agent Skills
The skills-generate command allows you to convert a toolset into an Agent Skill. A toolset is a collection of tools, and the generated skill will contain metadata and execution scripts for all tools within that toolset, complying with the Agent Skill specification.
Before you begin
- Make sure you have the
toolboxexecutable in your PATH. - Make sure you have Node.js installed on your system.
Generating a Skill from a Toolset
A skill package consists of a SKILL.md file (with required YAML frontmatter) and a set of Node.js scripts. Each tool defined in your toolset maps to a corresponding script in the generated Node.js scripts (.js) that work across different platforms (Linux, macOS, Windows).
Command Usage
The basic syntax for the command is:
toolbox <tool-source> skills-generate \
--name <skill-name> \
--toolset <toolset-name> \
--description <description> \
--output-dir <output-directory> \
--license-header <license-header> \
--additional-notes <additional-notes>
<tool-source>: Can be--config,--configs,--config-folder, and--prebuilt. See the CLI Reference for details.--name: Name of the generated skill.--description: Description of the generated skill.--toolset: (Optional) Name of the toolset to convert into a skill. If not provided, all tools will be included.--output-dir: (Optional) Directory to output generated skills (default: “skills”).--license-header: (Optional) Optional license header to prepend to generated node scripts.--additional-notes: (Optional) Additional notes to add under the Usage section of the generated SKILL.md.
Note
Note: The <skill-name> must follow the Agent Skill naming convention: it must contain only lowercase alphanumeric characters and hyphens, cannot start or end with a hyphen, and cannot contain consecutive hyphens (e.g., my-skill, data-processing).
Example: Custom Tools File
Create a
tools.yamlfile with a toolset and some tools:tools: tool_a: description: "First tool" run: command: "echo 'Tool A'" tool_b: description: "Second tool" run: command: "echo 'Tool B'" toolsets: my_toolset: tools: - tool_a - tool_bGenerate the skill:
toolbox --config tools.yaml skills-generate \ --name "my-skill" \ --toolset "my_toolset" \ --description "A skill containing multiple tools" \ --output-dir "generated-skills"The generated skill directory structure:
generated-skills/ └── my-skill/ ├── SKILL.md ├── assets/ │ └── tools.yaml └── scripts/ ├── tool_a.js └── tool_b.jsIn this example, the skill contains two Node.js scripts (
tool_a.jsandtool_b.js), each mapping to a tool in the original toolset.
Example: Prebuilt Configuration
You can also generate skills from prebuilt toolsets:
toolbox --prebuilt alloydb-postgres-admin skills-generate \
--name "alloydb-postgres-admin" \
--description "skill for performing administrative operations on alloydb"
Installing the Generated Skill in Gemini CLI
Once you have generated a skill, you can install it into the Gemini CLI using the gemini skills install command.
Installation Command
Provide the path to the directory containing the generated skill:
gemini skills install /path/to/generated-skills/my-skill
Alternatively, use ~/.gemini/skills as the --output-dir to generate the skill straight to the Gemini CLI.