@google/gemini-cli-core 0.41.0-preview.1 → 0.42.0-nightly.20260501.gcaa046641
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/changelogs/index.md +18 -0
- package/dist/docs/changelogs/latest.md +167 -242
- package/dist/docs/changelogs/preview.md +99 -385
- package/dist/docs/cli/cli-reference.md +1 -0
- package/dist/docs/cli/creating-skills.md +165 -38
- package/dist/docs/cli/custom-commands.md +1 -0
- package/dist/docs/cli/model-routing.md +3 -3
- package/dist/docs/cli/plan-mode.md +2 -1
- package/dist/docs/cli/skills-best-practices.md +78 -0
- package/dist/docs/cli/skills.md +98 -93
- package/dist/docs/cli/tutorials/session-management.md +13 -0
- package/dist/docs/cli/tutorials/skills-getting-started.md +140 -92
- package/dist/docs/cli/using-agent-skills.md +89 -0
- package/dist/docs/core/gemma-setup.md +83 -0
- package/dist/docs/core/index.md +3 -2
- package/dist/docs/core/local-model-routing.md +14 -7
- package/dist/docs/reference/commands.md +14 -4
- package/dist/docs/reference/configuration.md +76 -4
- package/dist/docs/reference/keyboard-shortcuts.md +1 -1
- package/dist/docs/reference/policy-engine.md +14 -3
- package/dist/docs/sidebar.json +24 -2
- package/dist/docs/tools/activate-skill.md +1 -1
- package/dist/{google-gemini-cli-core-0.41.0-preview.0.tgz → google-gemini-cli-core-0.42.0-nightly.20260428.g59b2dea0e.tgz} +0 -0
- package/dist/src/agent/event-translator.js +1 -1
- package/dist/src/agent/event-translator.js.map +1 -1
- package/dist/src/agent/event-translator.test.js +2 -2
- package/dist/src/agent/event-translator.test.js.map +1 -1
- package/dist/src/agent/legacy-agent-session.test.js +1 -1
- package/dist/src/agent/legacy-agent-session.test.js.map +1 -1
- package/dist/src/agents/a2aUtils.js +1 -1
- package/dist/src/agents/a2aUtils.js.map +1 -1
- package/dist/src/agents/a2aUtils.test.js +18 -0
- package/dist/src/agents/a2aUtils.test.js.map +1 -1
- package/dist/src/agents/agentLoader.d.ts +105 -0
- package/dist/src/agents/agentLoader.js +20 -0
- package/dist/src/agents/agentLoader.js.map +1 -1
- package/dist/src/agents/agentLoader.test.js +60 -0
- package/dist/src/agents/agentLoader.test.js.map +1 -1
- package/dist/src/agents/auth-provider/types.d.ts +5 -0
- package/dist/src/availability/autoRoutingFallback.integration.test.d.ts +6 -0
- package/dist/src/availability/autoRoutingFallback.integration.test.js +287 -0
- package/dist/src/availability/autoRoutingFallback.integration.test.js.map +1 -0
- package/dist/src/availability/fallbackIntegration.test.js +28 -0
- package/dist/src/availability/fallbackIntegration.test.js.map +1 -1
- package/dist/src/availability/modelAvailabilityService.d.ts +1 -1
- package/dist/src/availability/modelAvailabilityService.js +3 -2
- package/dist/src/availability/modelAvailabilityService.js.map +1 -1
- package/dist/src/availability/modelAvailabilityService.test.js +5 -0
- package/dist/src/availability/modelAvailabilityService.test.js.map +1 -1
- package/dist/src/availability/modelPolicy.d.ts +1 -0
- package/dist/src/availability/policyCatalog.d.ts +1 -0
- package/dist/src/availability/policyCatalog.js +38 -9
- package/dist/src/availability/policyCatalog.js.map +1 -1
- package/dist/src/availability/policyCatalog.test.js +5 -2
- package/dist/src/availability/policyCatalog.test.js.map +1 -1
- package/dist/src/availability/policyHelpers.js +14 -6
- package/dist/src/availability/policyHelpers.js.map +1 -1
- package/dist/src/availability/policyHelpers.test.js +36 -1
- package/dist/src/availability/policyHelpers.test.js.map +1 -1
- package/dist/src/config/defaultModelConfigs.js +76 -4
- package/dist/src/config/defaultModelConfigs.js.map +1 -1
- package/dist/src/core/baseLlmClient.js +3 -1
- package/dist/src/core/baseLlmClient.js.map +1 -1
- package/dist/src/core/baseLlmClient.test.js +27 -23
- package/dist/src/core/baseLlmClient.test.js.map +1 -1
- package/dist/src/core/contentGenerator.js +1 -6
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/contentGenerator.test.js +1 -7
- package/dist/src/core/contentGenerator.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/output/json-formatter.d.ts +1 -1
- package/dist/src/output/json-formatter.js +4 -1
- package/dist/src/output/json-formatter.js.map +1 -1
- package/dist/src/output/json-formatter.test.js +7 -0
- package/dist/src/output/json-formatter.test.js.map +1 -1
- package/dist/src/output/types.d.ts +1 -0
- package/dist/src/output/types.js.map +1 -1
- package/dist/src/prompts/snippets.js +2 -2
- package/dist/src/prompts/snippets.js.map +1 -1
- package/dist/src/prompts/snippets.legacy.js +1 -1
- package/dist/src/prompts/snippets.legacy.js.map +1 -1
- package/dist/src/scheduler/confirmation.test.js +29 -0
- package/dist/src/scheduler/confirmation.test.js.map +1 -1
- package/dist/src/services/chatRecordingService.d.ts +6 -0
- package/dist/src/services/chatRecordingService.js +65 -17
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/chatRecordingService.test.js +66 -0
- package/dist/src/services/chatRecordingService.test.js.map +1 -1
- package/dist/src/tools/grep.js +1 -1
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/grep.test.js +17 -0
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.js +2 -1
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +29 -0
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/utils/channel.d.ts +8 -0
- package/dist/src/utils/channel.js +21 -10
- package/dist/src/utils/channel.js.map +1 -1
- package/dist/src/utils/events.d.ts +6 -1
- package/dist/src/utils/events.js +13 -2
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/events.test.js +39 -0
- package/dist/src/utils/events.test.js.map +1 -1
- package/dist/src/utils/fetch.js +10 -8
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/fetch.test.js +1 -1
- package/dist/src/utils/fetch.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.js +16 -5
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +50 -1
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/partUtils.d.ts +6 -0
- package/dist/src/utils/partUtils.js +9 -0
- package/dist/src/utils/partUtils.js.map +1 -1
- package/dist/src/utils/retry.js +7 -3
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/retry.test.js +17 -0
- package/dist/src/utils/retry.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,110 +1,158 @@
|
|
|
1
1
|
# Get started with Agent Skills
|
|
2
2
|
|
|
3
|
-
Agent Skills extend Gemini CLI with specialized expertise. In this
|
|
4
|
-
learn how to create your first skill, bundle custom
|
|
5
|
-
during a session.
|
|
3
|
+
Agent Skills extend Gemini CLI with specialized expertise. In this tutorial,
|
|
4
|
+
you'll learn how to create your first skill, bundle custom logic, and activate
|
|
5
|
+
it during a session.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Create your first skill
|
|
8
8
|
|
|
9
|
-
A skill is defined by a directory containing a `SKILL.md` file
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
A skill is defined by a directory containing a `SKILL.md` file and
|
|
10
|
+
subdirectories containing reference materials or scripts used by the skill.
|
|
11
|
+
Let's create an **API Auditor** skill that runs a script to help you verify if
|
|
12
|
+
local or remote endpoints are responding correctly.
|
|
12
13
|
|
|
13
|
-
### Create the directory structure
|
|
14
|
+
### 1. Create the directory structure
|
|
15
|
+
|
|
16
|
+
The first step is to create the necessary folders for your skill and its
|
|
17
|
+
scripts.
|
|
18
|
+
|
|
19
|
+
**macOS/Linux**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
mkdir -p .gemini/skills/api-auditor/scripts
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Windows (PowerShell)**
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
New-Item -ItemType Directory -Force -Path ".gemini\skills\api-auditor\scripts"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Create the definition (`SKILL.md`)
|
|
32
|
+
|
|
33
|
+
The `SKILL.md` file defines the skill's purpose and instructions for the agent.
|
|
34
|
+
Create a file at `.gemini/skills/api-auditor/SKILL.md`. This tells the agent
|
|
35
|
+
_when_ to use the skill and _how_ to behave.
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
---
|
|
39
|
+
name: api-auditor
|
|
40
|
+
description:
|
|
41
|
+
Expertise in auditing and testing API endpoints. Use when the user asks to
|
|
42
|
+
"check", "test", or "audit" a URL or API.
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# API Auditor Instructions
|
|
46
|
+
|
|
47
|
+
You act as a QA engineer specialized in API reliability. When this skill is
|
|
48
|
+
active, you MUST:
|
|
49
|
+
|
|
50
|
+
1. **Audit**: Use the bundled `scripts/audit.js` utility to check the status of
|
|
51
|
+
the provided URL.
|
|
52
|
+
2. **Report**: Analyze the output (status codes, latency) and explain any
|
|
53
|
+
failures in plain English.
|
|
54
|
+
3. **Secure**: Remind the user if they are testing a sensitive endpoint without
|
|
55
|
+
an `https://` protocol.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3. Add the tool logic
|
|
59
|
+
|
|
60
|
+
Skills can bundle resources like scripts to perform deterministic tasks. Create
|
|
61
|
+
a file at `.gemini/skills/api-auditor/scripts/audit.js`. This is the code the
|
|
62
|
+
agent will run.
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
// .gemini/skills/api-auditor/scripts/audit.js
|
|
66
|
+
const url = process.argv[2];
|
|
67
|
+
|
|
68
|
+
if (!url) {
|
|
69
|
+
console.error('Usage: node audit.js <url>');
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
console.log(`Auditing ${url}...`);
|
|
74
|
+
fetch(url, { method: 'HEAD' })
|
|
75
|
+
.then((r) => console.log(`Result: Success (Status ${r.status})`))
|
|
76
|
+
.catch((e) => console.error(`Result: Failed (${e.message})`));
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Verify discovery
|
|
80
|
+
|
|
81
|
+
Gemini CLI automatically discovers skills in the `.gemini/skills` directory (as
|
|
82
|
+
well as the `.agents/skills` alias).
|
|
83
|
+
|
|
84
|
+
To check if Gemini CLI found your new skill, use the `/skills list` command
|
|
85
|
+
within an interactive session:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
/skills list
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
You should see `api-auditor` in the list of available skills. If you just added
|
|
92
|
+
the files, you can run `/skills reload` to refresh the list without restarting
|
|
93
|
+
the session.
|
|
94
|
+
|
|
95
|
+
### If your skill doesn't appear
|
|
96
|
+
|
|
97
|
+
If `/skills list` doesn't show your skill, check the following:
|
|
98
|
+
|
|
99
|
+
1. **The folder must be trusted (workspace skills only).** Skills under
|
|
100
|
+
`<workspace>/.gemini/skills/` are only loaded when the workspace folder is
|
|
101
|
+
marked as trusted. Run `/trust` and restart the session if needed. Skills
|
|
102
|
+
under `~/.gemini/skills/` (user scope) are not affected by trust.
|
|
103
|
+
2. **Check the path layout.** `SKILL.md` is discovered either at the root of
|
|
104
|
+
the skills directory (`.gemini/skills/SKILL.md`) or one directory deep
|
|
105
|
+
(`.gemini/skills/<skill-name>/SKILL.md`). The recommended layout uses a
|
|
106
|
+
subdirectory per skill so you can bundle scripts and other resources
|
|
107
|
+
alongside it. Files nested more than one directory deep are not discovered.
|
|
108
|
+
3. **The filename must be exactly `SKILL.md`.** Capitalization matters on
|
|
109
|
+
case-sensitive filesystems (Linux, and macOS when configured as such):
|
|
110
|
+
`skill.md` or `Skill.md` will be ignored.
|
|
111
|
+
4. **Frontmatter must include both `name:` and `description:`, and must be the
|
|
112
|
+
first thing in the file.** A `SKILL.md` is silently skipped if either field
|
|
113
|
+
is missing, if the delimiters (`---` on their own lines) are absent, or if
|
|
114
|
+
any text (an H1 title, a comment, even a blank line) appears before the
|
|
115
|
+
opening `---`.
|
|
116
|
+
5. **The skill name comes from the `name:` field, not the directory name.** If
|
|
117
|
+
your frontmatter says `name: foo`, the skill appears as `foo` in
|
|
118
|
+
`/skills list` regardless of what its parent directory is called. The
|
|
119
|
+
characters `: \ / < > * ? " |` in the name are replaced with `-`.
|
|
14
120
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**macOS/Linux**
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
mkdir -p .gemini/skills/api-auditor/scripts
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**Windows (PowerShell)**
|
|
24
|
-
|
|
25
|
-
```powershell
|
|
26
|
-
New-Item -ItemType Directory -Force -Path ".gemini\skills\api-auditor\scripts"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Create the definition
|
|
30
|
-
|
|
31
|
-
1. Create a file at `.gemini/skills/api-auditor/SKILL.md`. This tells the agent
|
|
32
|
-
_when_ to use the skill and _how_ to behave.
|
|
33
|
-
|
|
34
|
-
```markdown
|
|
35
|
-
---
|
|
36
|
-
name: api-auditor
|
|
37
|
-
description:
|
|
38
|
-
Expertise in auditing and testing API endpoints. Use when the user asks to
|
|
39
|
-
"check", "test", or "audit" a URL or API.
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
# API Auditor Instructions
|
|
43
|
-
|
|
44
|
-
You act as a QA engineer specialized in API reliability. When this skill is
|
|
45
|
-
active, you MUST:
|
|
46
|
-
|
|
47
|
-
1. **Audit**: Use the bundled `scripts/audit.js` utility to check the
|
|
48
|
-
status of the provided URL.
|
|
49
|
-
2. **Report**: Analyze the output (status codes, latency) and explain any
|
|
50
|
-
failures in plain English.
|
|
51
|
-
3. **Secure**: Remind the user if they are testing a sensitive endpoint
|
|
52
|
-
without an `https://` protocol.
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Add the tool logic
|
|
56
|
-
|
|
57
|
-
Skills can bundle resources like scripts.
|
|
58
|
-
|
|
59
|
-
1. Create a file at `.gemini/skills/api-auditor/scripts/audit.js`. This is the
|
|
60
|
-
code the agent will run.
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
// .gemini/skills/api-auditor/scripts/audit.js
|
|
64
|
-
const url = process.argv[2];
|
|
65
|
-
|
|
66
|
-
if (!url) {
|
|
67
|
-
console.error('Usage: node audit.js <url>');
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
console.log(`Auditing ${url}...`);
|
|
72
|
-
fetch(url, { method: 'HEAD' })
|
|
73
|
-
.then((r) => console.log(`Result: Success (Status ${r.status})`))
|
|
74
|
-
.catch((e) => console.error(`Result: Failed (${e.message})`));
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## How to verify discovery
|
|
78
|
-
|
|
79
|
-
Gemini CLI automatically discovers skills in the `.gemini/skills` directory. You
|
|
80
|
-
can also use `.agents/skills` as a more generic alternative. Check that it found
|
|
81
|
-
your new skill.
|
|
121
|
+
## How to use the skill
|
|
82
122
|
|
|
83
|
-
|
|
123
|
+
Now that the skill is discovered, you can trigger its activation by asking a
|
|
124
|
+
relevant question.
|
|
84
125
|
|
|
85
|
-
|
|
126
|
+
1. **Trigger**: Start a new session and ask: "Can you audit https://google.com"
|
|
127
|
+
2. **Activation**: Gemini identifies that the request matches the `api-auditor`
|
|
128
|
+
description and calls the `activate_skill` tool.
|
|
129
|
+
3. **Consent**: You will see a confirmation prompt. Type **y** to approve.
|
|
130
|
+
4. **Execution**: Once activated, Gemini uses the `run_shell_command` tool to
|
|
131
|
+
execute your bundled script:
|
|
132
|
+
`node .gemini/skills/api-auditor/scripts/audit.js https://google.com`
|
|
86
133
|
|
|
87
|
-
##
|
|
134
|
+
## Pro tip: Use the skill-creator
|
|
88
135
|
|
|
89
|
-
|
|
90
|
-
skill
|
|
136
|
+
If you don't want to create the files manually, you can use the built-in
|
|
137
|
+
`skill-creator` skill. Simply ask Gemini:
|
|
91
138
|
|
|
92
|
-
|
|
139
|
+
> "Create a new skill called 'api-auditor' that tests if URLs are responding."
|
|
93
140
|
|
|
94
|
-
|
|
95
|
-
permission to activate it.
|
|
141
|
+
The `skill-creator` will handle the directory structure and boilerplate for you.
|
|
96
142
|
|
|
97
|
-
|
|
98
|
-
skill. I'll run the audit script now..."
|
|
143
|
+
## Manage skills
|
|
99
144
|
|
|
100
|
-
|
|
101
|
-
script:
|
|
145
|
+
You can also manage skills using the `gemini skills` command from your terminal:
|
|
102
146
|
|
|
103
|
-
`
|
|
147
|
+
- **Install**: `gemini skills install <url-or-path>`
|
|
148
|
+
- **Link**: `gemini skills link <path>` (useful for local development)
|
|
149
|
+
- **Uninstall**: `gemini skills uninstall <name>`
|
|
104
150
|
|
|
105
151
|
## Next steps
|
|
106
152
|
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
153
|
+
- [Creating Agent Skills](../creating-skills.md): Detailed guide on advanced
|
|
154
|
+
skill features and metadata.
|
|
155
|
+
- [Using Agent Skills](../using-agent-skills.md): More ways to discover and
|
|
156
|
+
manage your skill library.
|
|
157
|
+
- [Skill best practices](../skills-best-practices.md): Learn how to design
|
|
158
|
+
reliable and effective expertise.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Managing Agent Skills
|
|
2
|
+
|
|
3
|
+
Agent Skills provide Gemini CLI with specialized expertise on demand. This guide
|
|
4
|
+
covers advanced management techniques, including using slash commands, terminal
|
|
5
|
+
utilities, and understanding discovery tiers.
|
|
6
|
+
|
|
7
|
+
## Discovery tiers
|
|
8
|
+
|
|
9
|
+
Gemini CLI discovers skills from several locations, following a specific order
|
|
10
|
+
of precedence (lowest to highest):
|
|
11
|
+
|
|
12
|
+
1. **Built-in Skills**: Included with Gemini CLI and always available.
|
|
13
|
+
2. **Extension Skills**: Bundled within [extensions](../extensions/index.md).
|
|
14
|
+
3. **User Skills**: Located in `~/.gemini/skills/` or the `~/.agents/skills/`
|
|
15
|
+
alias. These are available across all your projects.
|
|
16
|
+
4. **Workspace Skills**: Located in `.gemini/skills/` or the `.agents/skills/`
|
|
17
|
+
alias within your current directory. These are project-specific.
|
|
18
|
+
|
|
19
|
+
> **Tip:** If multiple skills share the same name, the version from the
|
|
20
|
+
> higher-precedence location is used.
|
|
21
|
+
|
|
22
|
+
## In-session management
|
|
23
|
+
|
|
24
|
+
Use the `/skills` slash command during an interactive session to manage your
|
|
25
|
+
available expertise.
|
|
26
|
+
|
|
27
|
+
- **List skills**: `/skills list` (shows discovered skills).
|
|
28
|
+
- Use `/skills list all` to include internal built-in skills.
|
|
29
|
+
- Use `/skills list nodesc` to hide descriptions.
|
|
30
|
+
- **Reload skills**: `/skills reload` (or `/skills refresh`) to scan for new or
|
|
31
|
+
modified skills without restarting the CLI.
|
|
32
|
+
- **Toggle status**:
|
|
33
|
+
- `/skills disable <name>`: Prevents a skill from being triggered.
|
|
34
|
+
- `/skills enable <name>`: Re-enables a disabled skill.
|
|
35
|
+
- **Link local skills**: `/skills link <path> [--scope user|workspace]` to
|
|
36
|
+
immediately use a skill you are developing.
|
|
37
|
+
|
|
38
|
+
## Terminal utilities
|
|
39
|
+
|
|
40
|
+
The `gemini skills` command provides management utilities directly from your
|
|
41
|
+
system shell.
|
|
42
|
+
|
|
43
|
+
### Install a skill
|
|
44
|
+
|
|
45
|
+
To install a skill from a remote repository or a local `.skill` package:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
gemini skills install https://github.com/user/my-awesome-skill
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
By default, this installs to your **user profile**. Use `--scope workspace` to
|
|
52
|
+
install it only for the current project.
|
|
53
|
+
|
|
54
|
+
### Link for development
|
|
55
|
+
|
|
56
|
+
If you are developing a skill, use the `link` command to create a reference to
|
|
57
|
+
your local directory:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
gemini skills link ./path/to/my-skill
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Uninstall a skill
|
|
64
|
+
|
|
65
|
+
To completely remove an installed or linked skill:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
gemini skills uninstall <name>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Security and consent
|
|
72
|
+
|
|
73
|
+
Agent Skills can execute scripts and access your files. To protect your
|
|
74
|
+
environment:
|
|
75
|
+
|
|
76
|
+
1. **Installation consent**: When installing from a remote URL, you will be
|
|
77
|
+
asked to confirm the source.
|
|
78
|
+
2. **Activation consent**: Every time a skill is triggered during a session,
|
|
79
|
+
the agent must ask for permission to activate it and gain access to its
|
|
80
|
+
resources.
|
|
81
|
+
|
|
82
|
+
## Next steps
|
|
83
|
+
|
|
84
|
+
- [Get started with Agent Skills](./tutorials/skills-getting-started.md): A
|
|
85
|
+
walkthrough for creating your first skill.
|
|
86
|
+
- [Creating Agent Skills](./creating-skills.md): Detailed guide on bundling
|
|
87
|
+
scripts and assets.
|
|
88
|
+
- [Skill best practices](./skills-best-practices.md): Strategies for building
|
|
89
|
+
reliable expertise.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# `gemini gemma` — Automated Local Model Routing Setup
|
|
2
|
+
|
|
3
|
+
Local model routing uses a local Gemma 3 1B model running on your machine to
|
|
4
|
+
classify and route user requests. It routes simple requests (like file reads) to
|
|
5
|
+
Gemini Flash and complex requests (like architecture discussions) to Gemini Pro.
|
|
6
|
+
|
|
7
|
+
<!-- prettier-ignore -->
|
|
8
|
+
> [!NOTE]
|
|
9
|
+
> This is an experimental feature currently under active development.
|
|
10
|
+
|
|
11
|
+
## What is this?
|
|
12
|
+
|
|
13
|
+
This feature saves cloud API costs by using local inference for task
|
|
14
|
+
classification instead of a cloud-based classifier. It adds a few milliseconds
|
|
15
|
+
of local latency but can significantly reduce the overall token usage for hosted
|
|
16
|
+
models.
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# One command does everything: downloads runtime, pulls model, configures settings, starts server
|
|
22
|
+
gemini gemma setup
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
You'll be prompted to accept the Gemma Terms of Use. The model is ~1 GB.
|
|
26
|
+
|
|
27
|
+
After setup, **just use the CLI normally** — routing happens automatically on
|
|
28
|
+
every request.
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
| Command | What it does |
|
|
33
|
+
| --------------------- | -------------------------------------------------------------- |
|
|
34
|
+
| `gemini gemma setup` | Full install (binary + model + settings + server start) |
|
|
35
|
+
| `gemini gemma status` | Health check — shows what's installed and running |
|
|
36
|
+
| `gemini gemma start` | Start the LiteRT server (auto-starts on CLI launch by default) |
|
|
37
|
+
| `gemini gemma stop` | Stop the LiteRT server |
|
|
38
|
+
| `gemini gemma logs` | Tail the server logs to see routing requests live |
|
|
39
|
+
| `/gemma` | In-session status check (type it inside the CLI) |
|
|
40
|
+
|
|
41
|
+
## Verifying it works
|
|
42
|
+
|
|
43
|
+
1. Run `gemini gemma status` — all checks should show green
|
|
44
|
+
2. Open two terminals:
|
|
45
|
+
- Terminal 1: `gemini gemma logs` (watch for incoming requests)
|
|
46
|
+
- Terminal 2: use the CLI normally
|
|
47
|
+
3. You should see classification requests appear in the logs as you interact
|
|
48
|
+
with the CLI
|
|
49
|
+
4. The `/gemma` slash command inside a session shows a quick status panel
|
|
50
|
+
|
|
51
|
+
## Setup flags
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
gemini gemma setup --port 8080 # custom port
|
|
55
|
+
gemini gemma setup --no-start # don't start server after install
|
|
56
|
+
gemini gemma setup --force # re-download everything
|
|
57
|
+
gemini gemma setup --skip-model # binary only, skip the 1GB model download
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## How it works under the hood
|
|
61
|
+
|
|
62
|
+
- Local Gemma classifies each request as "simple" or "complex" (~100ms)
|
|
63
|
+
- Simple → Flash, Complex → Pro
|
|
64
|
+
- If the local server is down, the CLI silently falls back to the cloud
|
|
65
|
+
classifier — no errors, no disruption
|
|
66
|
+
|
|
67
|
+
## Disabling
|
|
68
|
+
|
|
69
|
+
Set `enabled: false` in settings or just run `gemini gemma stop` to turn off the
|
|
70
|
+
server:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{ "experimental": { "gemmaModelRouter": { "enabled": false } } }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Advanced setup
|
|
77
|
+
|
|
78
|
+
If you are in an environment where the `gemini gemma setup` command cannot
|
|
79
|
+
automatically download binaries (for example, behind a strict corporate
|
|
80
|
+
firewall), you can perform the setup manually.
|
|
81
|
+
|
|
82
|
+
For more information, see the
|
|
83
|
+
[Manual Local Model Routing Setup guide](./local-model-routing.md).
|
package/dist/docs/core/index.md
CHANGED
|
@@ -15,8 +15,9 @@ requests sent from `packages/cli`. For a general overview of Gemini CLI, see the
|
|
|
15
15
|
modular GEMINI.md import feature using @file.md syntax.
|
|
16
16
|
- **[Policy Engine](../reference/policy-engine.md):** Use the Policy Engine for
|
|
17
17
|
fine-grained control over tool execution.
|
|
18
|
-
- **[Local Model Routing (experimental)](./
|
|
19
|
-
|
|
18
|
+
- **[Local Model Routing (experimental)](./gemma-setup.md):** Learn how to
|
|
19
|
+
enable use of a local Gemma model for model routing decisions using the
|
|
20
|
+
automated setup command.
|
|
20
21
|
|
|
21
22
|
## Role of the core
|
|
22
23
|
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
# Local Model Routing (experimental)
|
|
1
|
+
# Manual Local Model Routing Setup (experimental)
|
|
2
2
|
|
|
3
3
|
Gemini CLI supports using a local model for
|
|
4
4
|
[routing decisions](../cli/model-routing.md). When configured, Gemini CLI will
|
|
5
5
|
use a locally-running **Gemma** model to make routing decisions (instead of
|
|
6
6
|
sending routing decisions to a hosted model).
|
|
7
7
|
|
|
8
|
+
<!-- prettier-ignore -->
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> This is an experimental feature currently under active development.
|
|
11
|
+
|
|
12
|
+
<!-- prettier-ignore -->
|
|
13
|
+
> [!IMPORTANT]
|
|
14
|
+
> **Recommended:** We now provide a fully automated setup command. We recommend
|
|
15
|
+
> using the [`gemini gemma` Setup Guide](./gemma-setup.md) instead of following
|
|
16
|
+
> these manual steps.
|
|
17
|
+
|
|
8
18
|
This feature can help reduce costs associated with hosted model usage while
|
|
9
19
|
offering similar routing decision latency and quality.
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Setup
|
|
21
|
+
## Manual Setup
|
|
14
22
|
|
|
15
23
|
Using a Gemma model for routing decisions requires that an implementation of a
|
|
16
24
|
Gemma model be running locally on your machine, served behind an HTTP endpoint
|
|
17
|
-
and accessed via the Gemini API.
|
|
18
|
-
|
|
19
|
-
To serve the Gemma model, follow these steps:
|
|
25
|
+
and accessed via the Gemini API. If you cannot use the `gemini gemma setup`
|
|
26
|
+
command, follow these manual steps:
|
|
20
27
|
|
|
21
28
|
### Download the LiteRT-LM runtime
|
|
22
29
|
|
|
@@ -111,6 +111,11 @@ Slash commands provide meta-level control over the CLI itself.
|
|
|
111
111
|
|
|
112
112
|
- **Description:** Manage custom slash commands loaded from `.toml` files.
|
|
113
113
|
- **Sub-commands:**
|
|
114
|
+
- **`list`**:
|
|
115
|
+
- **Description:** List available custom command `.toml` files from all
|
|
116
|
+
sources (user-level `~/.gemini/commands/`, project-level
|
|
117
|
+
`<project>/.gemini/commands/`, and active extensions).
|
|
118
|
+
- **Usage:** `/commands list`
|
|
114
119
|
- **`reload`**:
|
|
115
120
|
- **Description:** Reload custom command definitions from all sources
|
|
116
121
|
(user-level `~/.gemini/commands/`, project-level
|
|
@@ -323,6 +328,11 @@ Slash commands provide meta-level control over the CLI itself.
|
|
|
323
328
|
### `/quit` (or `/exit`)
|
|
324
329
|
|
|
325
330
|
- **Description:** Exit Gemini CLI.
|
|
331
|
+
- **Flags:**
|
|
332
|
+
- **`--delete`** _(optional)_: Exit and permanently delete the current
|
|
333
|
+
session's history and temporary files (chat recording, tool outputs). Useful
|
|
334
|
+
for privacy or one-off tasks where you don't want to leave any traces.
|
|
335
|
+
- **Usage:** `/quit --delete` or `/exit --delete`
|
|
326
336
|
|
|
327
337
|
### `/restore`
|
|
328
338
|
|
|
@@ -499,12 +509,12 @@ the dedicated [Custom Commands documentation](../cli/custom-commands.md).
|
|
|
499
509
|
These shortcuts apply directly to the input prompt for text manipulation.
|
|
500
510
|
|
|
501
511
|
- **Undo:**
|
|
502
|
-
- **Keyboard shortcut:** Press **
|
|
503
|
-
in the input prompt.
|
|
512
|
+
- **Keyboard shortcut:** Press **Ctrl+z** (Windows), **Cmd+z** (macOS), or
|
|
513
|
+
**Alt+z** (Linux/WSL) to undo the last action in the input prompt.
|
|
504
514
|
|
|
505
515
|
- **Redo:**
|
|
506
|
-
- **Keyboard shortcut:** Press **Shift+
|
|
507
|
-
last undone action in the input prompt.
|
|
516
|
+
- **Keyboard shortcut:** Press **Shift+Cmd+Z** (macOS), or **Shift+Alt+Z**
|
|
517
|
+
(Linux/WSL) to redo the last undone action in the input prompt.
|
|
508
518
|
|
|
509
519
|
## At commands (`@`)
|
|
510
520
|
|
|
@@ -1191,7 +1191,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
1191
1191
|
},
|
|
1192
1192
|
"stateTransitions": {
|
|
1193
1193
|
"terminal": "terminal",
|
|
1194
|
-
"transient": "
|
|
1194
|
+
"transient": "terminal",
|
|
1195
1195
|
"not_found": "terminal",
|
|
1196
1196
|
"unknown": "terminal"
|
|
1197
1197
|
}
|
|
@@ -1199,18 +1199,54 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
1199
1199
|
{
|
|
1200
1200
|
"model": "gemini-3-flash-preview",
|
|
1201
1201
|
"isLastResort": true,
|
|
1202
|
+
"maxAttempts": 10,
|
|
1202
1203
|
"actions": {
|
|
1203
1204
|
"terminal": "prompt",
|
|
1204
1205
|
"transient": "prompt",
|
|
1205
1206
|
"not_found": "prompt",
|
|
1206
1207
|
"unknown": "prompt"
|
|
1207
1208
|
},
|
|
1209
|
+
"stateTransitions": {
|
|
1210
|
+
"terminal": "terminal",
|
|
1211
|
+
"transient": "terminal",
|
|
1212
|
+
"not_found": "terminal",
|
|
1213
|
+
"unknown": "terminal"
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
],
|
|
1217
|
+
"auto-preview": [
|
|
1218
|
+
{
|
|
1219
|
+
"model": "gemini-3-pro-preview",
|
|
1220
|
+
"maxAttempts": 3,
|
|
1221
|
+
"actions": {
|
|
1222
|
+
"terminal": "prompt",
|
|
1223
|
+
"transient": "silent",
|
|
1224
|
+
"not_found": "prompt",
|
|
1225
|
+
"unknown": "prompt"
|
|
1226
|
+
},
|
|
1208
1227
|
"stateTransitions": {
|
|
1209
1228
|
"terminal": "terminal",
|
|
1210
1229
|
"transient": "sticky_retry",
|
|
1211
1230
|
"not_found": "terminal",
|
|
1212
1231
|
"unknown": "terminal"
|
|
1213
1232
|
}
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"model": "gemini-3-flash-preview",
|
|
1236
|
+
"isLastResort": true,
|
|
1237
|
+
"maxAttempts": 10,
|
|
1238
|
+
"actions": {
|
|
1239
|
+
"terminal": "prompt",
|
|
1240
|
+
"transient": "prompt",
|
|
1241
|
+
"not_found": "prompt",
|
|
1242
|
+
"unknown": "prompt"
|
|
1243
|
+
},
|
|
1244
|
+
"stateTransitions": {
|
|
1245
|
+
"terminal": "terminal",
|
|
1246
|
+
"transient": "terminal",
|
|
1247
|
+
"not_found": "terminal",
|
|
1248
|
+
"unknown": "terminal"
|
|
1249
|
+
}
|
|
1214
1250
|
}
|
|
1215
1251
|
],
|
|
1216
1252
|
"default": [
|
|
@@ -1232,18 +1268,54 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
1232
1268
|
{
|
|
1233
1269
|
"model": "gemini-2.5-flash",
|
|
1234
1270
|
"isLastResort": true,
|
|
1271
|
+
"maxAttempts": 10,
|
|
1235
1272
|
"actions": {
|
|
1236
1273
|
"terminal": "prompt",
|
|
1237
1274
|
"transient": "prompt",
|
|
1238
1275
|
"not_found": "prompt",
|
|
1239
1276
|
"unknown": "prompt"
|
|
1240
1277
|
},
|
|
1278
|
+
"stateTransitions": {
|
|
1279
|
+
"terminal": "terminal",
|
|
1280
|
+
"transient": "terminal",
|
|
1281
|
+
"not_found": "terminal",
|
|
1282
|
+
"unknown": "terminal"
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
],
|
|
1286
|
+
"auto-default": [
|
|
1287
|
+
{
|
|
1288
|
+
"model": "gemini-2.5-pro",
|
|
1289
|
+
"maxAttempts": 3,
|
|
1290
|
+
"actions": {
|
|
1291
|
+
"terminal": "prompt",
|
|
1292
|
+
"transient": "silent",
|
|
1293
|
+
"not_found": "prompt",
|
|
1294
|
+
"unknown": "prompt"
|
|
1295
|
+
},
|
|
1241
1296
|
"stateTransitions": {
|
|
1242
1297
|
"terminal": "terminal",
|
|
1243
1298
|
"transient": "sticky_retry",
|
|
1244
1299
|
"not_found": "terminal",
|
|
1245
1300
|
"unknown": "terminal"
|
|
1246
1301
|
}
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"model": "gemini-2.5-flash",
|
|
1305
|
+
"isLastResort": true,
|
|
1306
|
+
"maxAttempts": 10,
|
|
1307
|
+
"actions": {
|
|
1308
|
+
"terminal": "prompt",
|
|
1309
|
+
"transient": "prompt",
|
|
1310
|
+
"not_found": "prompt",
|
|
1311
|
+
"unknown": "prompt"
|
|
1312
|
+
},
|
|
1313
|
+
"stateTransitions": {
|
|
1314
|
+
"terminal": "terminal",
|
|
1315
|
+
"transient": "terminal",
|
|
1316
|
+
"not_found": "terminal",
|
|
1317
|
+
"unknown": "terminal"
|
|
1318
|
+
}
|
|
1247
1319
|
}
|
|
1248
1320
|
],
|
|
1249
1321
|
"lite": [
|
|
@@ -1257,7 +1329,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
1257
1329
|
},
|
|
1258
1330
|
"stateTransitions": {
|
|
1259
1331
|
"terminal": "terminal",
|
|
1260
|
-
"transient": "
|
|
1332
|
+
"transient": "terminal",
|
|
1261
1333
|
"not_found": "terminal",
|
|
1262
1334
|
"unknown": "terminal"
|
|
1263
1335
|
}
|
|
@@ -1272,7 +1344,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
1272
1344
|
},
|
|
1273
1345
|
"stateTransitions": {
|
|
1274
1346
|
"terminal": "terminal",
|
|
1275
|
-
"transient": "
|
|
1347
|
+
"transient": "terminal",
|
|
1276
1348
|
"not_found": "terminal",
|
|
1277
1349
|
"unknown": "terminal"
|
|
1278
1350
|
}
|
|
@@ -1288,7 +1360,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
1288
1360
|
},
|
|
1289
1361
|
"stateTransitions": {
|
|
1290
1362
|
"terminal": "terminal",
|
|
1291
|
-
"transient": "
|
|
1363
|
+
"transient": "terminal",
|
|
1292
1364
|
"not_found": "terminal",
|
|
1293
1365
|
"unknown": "terminal"
|
|
1294
1366
|
}
|
|
@@ -39,7 +39,7 @@ available combinations.
|
|
|
39
39
|
| `edit.deleteWordRight` | Delete the next word. | `Ctrl+Delete`<br />`Alt+Delete`<br />`Alt+D` |
|
|
40
40
|
| `edit.deleteLeft` | Delete the character to the left. | `Backspace`<br />`Ctrl+H` |
|
|
41
41
|
| `edit.deleteRight` | Delete the character to the right. | `Delete`<br />`Ctrl+D` |
|
|
42
|
-
| `edit.undo` | Undo the most recent text edit. | `
|
|
42
|
+
| `edit.undo` | Undo the most recent text edit. | `Ctrl+Z`<br />`Alt+Z`<br />`Cmd/Win+Z` |
|
|
43
43
|
| `edit.redo` | Redo the most recent undone text edit. | `Ctrl+Shift+Z`<br />`Shift+Cmd/Win+Z`<br />`Alt+Shift+Z` |
|
|
44
44
|
|
|
45
45
|
#### Scrolling
|