@google/gemini-cli-core 0.24.0-nightly.20251231.05049b5ab → 0.24.0-preview.0
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/cli/settings.md +1 -0
- package/dist/docs/cli/skills.md +156 -0
- package/dist/docs/cli/telemetry.md +3 -3
- package/dist/docs/cli/tutorials/skills-getting-started.md +124 -0
- package/dist/docs/cli/tutorials.md +4 -0
- package/dist/docs/get-started/configuration.md +32 -11
- package/dist/docs/hooks/best-practices.md +177 -127
- package/dist/docs/hooks/index.md +22 -0
- package/dist/docs/sidebar.json +4 -0
- package/dist/src/agents/a2a-client-manager.d.ts +5 -0
- package/dist/src/agents/a2a-client-manager.js +130 -0
- package/dist/src/agents/a2a-client-manager.js.map +1 -1
- package/dist/src/agents/a2a-client-manager.test.js +27 -1
- package/dist/src/agents/a2a-client-manager.test.js.map +1 -1
- package/dist/src/agents/a2aUtils.d.ts +28 -0
- package/dist/src/agents/a2aUtils.js +111 -0
- package/dist/src/agents/a2aUtils.js.map +1 -0
- package/dist/src/agents/a2aUtils.test.js +147 -0
- package/dist/src/agents/a2aUtils.test.js.map +1 -0
- package/dist/src/agents/delegate-to-agent-tool.d.ts +2 -2
- package/dist/src/agents/delegate-to-agent-tool.js +6 -6
- package/dist/src/agents/delegate-to-agent-tool.js.map +1 -1
- package/dist/src/agents/delegate-to-agent-tool.test.js +37 -7
- package/dist/src/agents/delegate-to-agent-tool.test.js.map +1 -1
- package/dist/src/agents/introspection-agent.js +2 -2
- package/dist/src/agents/introspection-agent.js.map +1 -1
- package/dist/src/agents/introspection-agent.test.js +2 -2
- package/dist/src/agents/introspection-agent.test.js.map +1 -1
- package/dist/src/agents/local-executor.js +1 -1
- package/dist/src/agents/local-executor.js.map +1 -1
- package/dist/src/agents/local-executor.test.js +2 -2
- package/dist/src/agents/local-executor.test.js.map +1 -1
- package/dist/src/agents/local-invocation.d.ts +2 -2
- package/dist/src/agents/local-invocation.js +3 -3
- package/dist/src/agents/local-invocation.js.map +1 -1
- package/dist/src/agents/local-invocation.test.js +7 -5
- package/dist/src/agents/local-invocation.test.js.map +1 -1
- package/dist/src/agents/remote-invocation.d.ts +17 -3
- package/dist/src/agents/remote-invocation.js +104 -6
- package/dist/src/agents/remote-invocation.js.map +1 -1
- package/dist/src/agents/remote-invocation.test.js +184 -18
- package/dist/src/agents/remote-invocation.test.js.map +1 -1
- package/dist/src/agents/subagent-tool-wrapper.d.ts +2 -2
- package/dist/src/agents/subagent-tool-wrapper.js +6 -5
- package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
- package/dist/src/agents/subagent-tool-wrapper.test.js +17 -10
- package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
- package/dist/src/agents/types.d.ts +6 -0
- package/dist/src/code_assist/oauth2.js +31 -1
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +75 -3
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +5 -0
- package/dist/src/code_assist/server.js +19 -4
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/server.test.js +19 -0
- package/dist/src/code_assist/server.test.js.map +1 -1
- package/dist/src/code_assist/setup.js +6 -4
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/code_assist/setup.test.js +63 -0
- package/dist/src/code_assist/setup.test.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +18 -0
- package/dist/src/config/config.d.ts +20 -6
- package/dist/src/config/config.js +63 -37
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +81 -4
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/flashFallback.test.js +13 -0
- package/dist/src/config/flashFallback.test.js.map +1 -1
- package/dist/src/config/models.js +6 -4
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/models.test.js +21 -1
- package/dist/src/config/models.test.js.map +1 -1
- package/dist/src/core/client.js +39 -7
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +93 -1
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.js +1 -1
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/contentGenerator.test.js +1 -1
- package/dist/src/core/contentGenerator.test.js.map +1 -1
- package/dist/src/core/coreToolHookTriggers.test.js +11 -9
- package/dist/src/core/coreToolHookTriggers.test.js.map +1 -1
- package/dist/src/core/coreToolScheduler.d.ts +1 -0
- package/dist/src/core/coreToolScheduler.js +30 -106
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +21 -22
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.js +14 -2
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +0 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts.js +29 -5
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +40 -1
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/sessionHookTriggers.d.ts +3 -2
- package/dist/src/core/sessionHookTriggers.js +8 -1
- package/dist/src/core/sessionHookTriggers.js.map +1 -1
- package/dist/src/core/turn.d.ts +16 -2
- package/dist/src/core/turn.js +2 -0
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +3 -3
- package/dist/src/generated/git-commit.js +3 -3
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/hooks/hookEventHandler.d.ts +6 -2
- package/dist/src/hooks/hookEventHandler.js +24 -3
- package/dist/src/hooks/hookEventHandler.js.map +1 -1
- package/dist/src/hooks/hookEventHandler.test.js +31 -8
- package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
- package/dist/src/hooks/hookRunner.d.ts +2 -2
- package/dist/src/hooks/hookRunner.js +12 -4
- package/dist/src/hooks/hookRunner.js.map +1 -1
- package/dist/src/hooks/hookRunner.test.js +33 -0
- package/dist/src/hooks/hookRunner.test.js.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +3 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/policy/config.js +60 -22
- package/dist/src/policy/config.js.map +1 -1
- package/dist/src/policy/config.test.js +21 -0
- package/dist/src/policy/config.test.js.map +1 -1
- package/dist/src/policy/persistence.test.js +1 -1
- package/dist/src/policy/persistence.test.js.map +1 -1
- package/dist/src/policy/policies/write.toml +5 -0
- package/dist/src/policy/policy-engine.d.ts +4 -0
- package/dist/src/policy/policy-engine.js +75 -51
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/policy-engine.test.js +272 -1
- package/dist/src/policy/policy-engine.test.js.map +1 -1
- package/dist/src/policy/policy-updater.test.js +2 -2
- package/dist/src/policy/policy-updater.test.js.map +1 -1
- package/dist/src/policy/toml-loader.d.ts +0 -8
- package/dist/src/policy/toml-loader.js +7 -70
- package/dist/src/policy/toml-loader.js.map +1 -1
- package/dist/src/policy/toml-loader.test.js +16 -6
- package/dist/src/policy/toml-loader.test.js.map +1 -1
- package/dist/src/policy/types.d.ts +6 -0
- package/dist/src/policy/utils.d.ts +21 -0
- package/dist/src/policy/utils.js +42 -0
- package/dist/src/policy/utils.js.map +1 -0
- package/dist/src/policy/utils.test.js +64 -0
- package/dist/src/policy/utils.test.js.map +1 -0
- package/dist/src/scheduler/tool-executor.d.ts +22 -0
- package/dist/src/scheduler/tool-executor.js +198 -0
- package/dist/src/scheduler/tool-executor.js.map +1 -0
- package/dist/src/scheduler/tool-executor.test.d.ts +6 -0
- package/dist/src/scheduler/tool-executor.test.js +231 -0
- package/dist/src/scheduler/tool-executor.test.js.map +1 -0
- package/dist/src/skills/skillLoader.d.ts +28 -0
- package/dist/src/skills/skillLoader.js +77 -0
- package/dist/src/skills/skillLoader.js.map +1 -0
- package/dist/src/skills/skillLoader.test.d.ts +6 -0
- package/dist/src/skills/skillLoader.test.js +73 -0
- package/dist/src/skills/skillLoader.test.js.map +1 -0
- package/dist/src/{services → skills}/skillManager.d.ts +10 -20
- package/dist/src/skills/skillManager.js +89 -0
- package/dist/src/skills/skillManager.js.map +1 -0
- package/dist/src/skills/skillManager.test.d.ts +6 -0
- package/dist/src/skills/skillManager.test.js +128 -0
- package/dist/src/skills/skillManager.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +5 -5
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +8 -8
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +2 -2
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +4 -4
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +3 -3
- package/dist/src/telemetry/loggers.js +4 -4
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +6 -8
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +7 -7
- package/dist/src/telemetry/types.js +10 -10
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/test-utils/mock-message-bus.d.ts +1 -0
- package/dist/src/test-utils/mock-message-bus.js +29 -0
- package/dist/src/test-utils/mock-message-bus.js.map +1 -1
- package/dist/src/test-utils/mock-tool.d.ts +5 -3
- package/dist/src/test-utils/mock-tool.js +11 -10
- package/dist/src/test-utils/mock-tool.js.map +1 -1
- package/dist/src/tools/activate-skill.d.ts +27 -0
- package/dist/src/tools/activate-skill.js +120 -0
- package/dist/src/tools/activate-skill.js.map +1 -0
- package/dist/src/tools/activate-skill.test.d.ts +6 -0
- package/dist/src/tools/activate-skill.test.js +95 -0
- package/dist/src/tools/activate-skill.test.js.map +1 -0
- package/dist/src/tools/confirmation-policy.test.js +2 -12
- package/dist/src/tools/confirmation-policy.test.js.map +1 -1
- package/dist/src/tools/edit.d.ts +27 -5
- package/dist/src/tools/edit.js +444 -137
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +257 -525
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/get-internal-docs.d.ts +2 -2
- package/dist/src/tools/get-internal-docs.js +6 -6
- package/dist/src/tools/get-internal-docs.js.map +1 -1
- package/dist/src/tools/get-internal-docs.test.js +2 -1
- package/dist/src/tools/get-internal-docs.test.js.map +1 -1
- package/dist/src/tools/glob.d.ts +2 -2
- package/dist/src/tools/glob.js +1 -1
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/glob.test.js +2 -1
- package/dist/src/tools/glob.test.js.map +1 -1
- package/dist/src/tools/grep.d.ts +2 -2
- package/dist/src/tools/grep.js +1 -1
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/grep.test.js +5 -4
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/ls.d.ts +2 -2
- package/dist/src/tools/ls.js +2 -2
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.js +2 -1
- package/dist/src/tools/ls.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.js +14 -7
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +28 -0
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +2 -2
- package/dist/src/tools/mcp-client.js +2 -1
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +2 -2
- package/dist/src/tools/mcp-tool.js +7 -7
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/mcp-tool.test.js +11 -6
- package/dist/src/tools/mcp-tool.test.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +3 -3
- package/dist/src/tools/memoryTool.js +2 -2
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +5 -2
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/message-bus-integration.test.js +10 -37
- package/dist/src/tools/message-bus-integration.test.js.map +1 -1
- package/dist/src/tools/read-file.d.ts +2 -2
- package/dist/src/tools/read-file.js +1 -1
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-file.test.js +3 -2
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +2 -2
- package/dist/src/tools/read-many-files.js +2 -3
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +3 -2
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/ripGrep.d.ts +2 -2
- package/dist/src/tools/ripGrep.js +3 -4
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +7 -6
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +3 -6
- package/dist/src/tools/shell.js +15 -48
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +35 -59
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/tool-names.d.ts +2 -1
- package/dist/src/tools/tool-names.js +2 -0
- package/dist/src/tools/tool-names.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +11 -6
- package/dist/src/tools/tool-registry.js +13 -8
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +14 -10
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/tools.d.ts +5 -5
- package/dist/src/tools/tools.js +15 -17
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/tools.test.js +3 -1
- package/dist/src/tools/tools.test.js.map +1 -1
- package/dist/src/tools/web-fetch.d.ts +2 -2
- package/dist/src/tools/web-fetch.js +4 -4
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +17 -19
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/tools/web-search.d.ts +2 -2
- package/dist/src/tools/web-search.js +3 -4
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/web-search.test.js +2 -1
- package/dist/src/tools/web-search.test.js.map +1 -1
- package/dist/src/tools/write-file.d.ts +2 -2
- package/dist/src/tools/write-file.js +3 -3
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +4 -1
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/tools/write-todos.d.ts +2 -2
- package/dist/src/tools/write-todos.js +5 -4
- package/dist/src/tools/write-todos.js.map +1 -1
- package/dist/src/tools/write-todos.test.js +2 -1
- package/dist/src/tools/write-todos.test.js.map +1 -1
- package/dist/src/utils/editCorrector.test.js +1 -1
- package/dist/src/utils/editCorrector.test.js.map +1 -1
- package/dist/src/utils/events.d.ts +46 -1
- package/dist/src/utils/events.js +21 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/events.test.js +25 -0
- package/dist/src/utils/events.test.js.map +1 -1
- package/dist/src/utils/getFolderStructure.js +6 -1
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/shell-permissions.test.js +27 -0
- package/dist/src/utils/shell-permissions.test.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +6 -0
- package/dist/src/utils/shell-utils.js +72 -8
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +99 -1
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/src/utils/terminal.d.ts +2 -0
- package/dist/src/utils/terminal.js +6 -0
- package/dist/src/utils/terminal.js.map +1 -1
- package/dist/src/utils/tokenCalculation.js +20 -5
- package/dist/src/utils/tokenCalculation.js.map +1 -1
- package/dist/src/utils/tokenCalculation.test.js +11 -2
- package/dist/src/utils/tokenCalculation.test.js.map +1 -1
- package/dist/src/utils/tool-utils.test.js +2 -1
- package/dist/src/utils/tool-utils.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/google-gemini-cli-core-0.24.0-nightly.20251227.37be16243.tgz +0 -0
- package/dist/src/services/skillManager.js +0 -157
- package/dist/src/services/skillManager.js.map +0 -1
- package/dist/src/services/skillManager.test.js +0 -169
- package/dist/src/services/skillManager.test.js.map +0 -1
- package/dist/src/tools/smart-edit.d.ts +0 -78
- package/dist/src/tools/smart-edit.js +0 -722
- package/dist/src/tools/smart-edit.js.map +0 -1
- package/dist/src/tools/smart-edit.test.js +0 -592
- package/dist/src/tools/smart-edit.test.js.map +0 -1
- /package/dist/src/{services/skillManager.test.d.ts → agents/a2aUtils.test.d.ts} +0 -0
- /package/dist/src/{tools/smart-edit.test.d.ts → policy/utils.test.d.ts} +0 -0
|
@@ -111,3 +111,4 @@ they appear in the UI.
|
|
|
111
111
|
| ----------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------ | ------- |
|
|
112
112
|
| Enable Codebase Investigator | `experimental.codebaseInvestigatorSettings.enabled` | Enable the Codebase Investigator agent. | `true` |
|
|
113
113
|
| Codebase Investigator Max Num Turns | `experimental.codebaseInvestigatorSettings.maxNumTurns` | Maximum number of turns for the Codebase Investigator agent. | `10` |
|
|
114
|
+
| Agent Skills | `experimental.skills` | Enable Agent Skills (experimental). | `false` |
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Agent Skills
|
|
2
|
+
|
|
3
|
+
_Note: This is an experimental feature enabled via `experimental.skills`. You
|
|
4
|
+
can also search for "Skills" within the `/settings` interactive UI to toggle
|
|
5
|
+
this and manage other skill-related settings._
|
|
6
|
+
|
|
7
|
+
Agent Skills allow you to extend Gemini CLI with specialized expertise,
|
|
8
|
+
procedural workflows, and task-specific resources. Based on the
|
|
9
|
+
[Agent Skills](https://agentskills.io) open standard, a "skill" is a
|
|
10
|
+
self-contained directory that packages instructions and assets into a
|
|
11
|
+
discoverable capability.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Unlike general context files ([`GEMINI.md`](./gemini-md.md)), which provide
|
|
16
|
+
persistent project-wide background, Skills represent **on-demand expertise**.
|
|
17
|
+
This allows Gemini to maintain a vast library of specialized capabilities—such
|
|
18
|
+
as security auditing, cloud deployments, or codebase migrations—without
|
|
19
|
+
cluttering the model's immediate context window.
|
|
20
|
+
|
|
21
|
+
Gemini autonomously decides when to employ a skill based on your request and the
|
|
22
|
+
skill's description. When a relevant skill is identified, the model "pulls in"
|
|
23
|
+
the full instructions and resources required to complete the task using the
|
|
24
|
+
`activate_skill` tool.
|
|
25
|
+
|
|
26
|
+
## Key Benefits
|
|
27
|
+
|
|
28
|
+
- **Shared Expertise:** Package complex workflows (like a specific team's PR
|
|
29
|
+
review process) into a folder that anyone can use.
|
|
30
|
+
- **Repeatable Workflows:** Ensure complex multi-step tasks are performed
|
|
31
|
+
consistently by providing a procedural framework.
|
|
32
|
+
- **Resource Bundling:** Include scripts, templates, or example data alongside
|
|
33
|
+
instructions so the agent has everything it needs.
|
|
34
|
+
- **Progressive Disclosure:** Only skill metadata (name and description) is
|
|
35
|
+
loaded initially. Detailed instructions and resources are only disclosed when
|
|
36
|
+
the model explicitly activates the skill, saving context tokens.
|
|
37
|
+
|
|
38
|
+
## Skill Discovery Tiers
|
|
39
|
+
|
|
40
|
+
Gemini CLI discovers skills from three primary locations:
|
|
41
|
+
|
|
42
|
+
1. **Project Skills** (`.gemini/skills/`): Project-specific skills that are
|
|
43
|
+
typically committed to version control and shared with the team.
|
|
44
|
+
2. **User Skills** (`~/.gemini/skills/`): Personal skills available across all
|
|
45
|
+
your projects.
|
|
46
|
+
3. **Extension Skills**: Skills bundled within installed
|
|
47
|
+
[extensions](../extensions/index.md).
|
|
48
|
+
|
|
49
|
+
**Precedence:** If multiple skills share the same name, higher-precedence
|
|
50
|
+
locations override lower ones: **Project > User > Extension**.
|
|
51
|
+
|
|
52
|
+
## Managing Skills
|
|
53
|
+
|
|
54
|
+
### In an Interactive Session
|
|
55
|
+
|
|
56
|
+
Use the `/skills` slash command to view and manage available expertise:
|
|
57
|
+
|
|
58
|
+
- `/skills list` (default): Shows all discovered skills and their status.
|
|
59
|
+
- `/skills disable <name>`: Prevents a specific skill from being used.
|
|
60
|
+
- `/skills enable <name>`: Re-enables a disabled skill.
|
|
61
|
+
- `/skills reload`: Refreshes the list of discovered skills from all tiers.
|
|
62
|
+
|
|
63
|
+
_Note: `/skills disable` and `/skills enable` default to the `user` scope. Use
|
|
64
|
+
`--scope project` to manage project-specific settings._
|
|
65
|
+
|
|
66
|
+
### From the Terminal
|
|
67
|
+
|
|
68
|
+
The `gemini skills` command provides management utilities:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# List all discovered skills
|
|
72
|
+
gemini skills list
|
|
73
|
+
|
|
74
|
+
# Enable/disable skills. Can use --scope to specify project or user
|
|
75
|
+
gemini skills enable my-expertise
|
|
76
|
+
gemini skills disable my-expertise
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Creating a Skill
|
|
80
|
+
|
|
81
|
+
A skill is a directory containing a `SKILL.md` file at its root. This file uses
|
|
82
|
+
YAML frontmatter for metadata and Markdown for instructions.
|
|
83
|
+
|
|
84
|
+
### Basic Structure
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
---
|
|
88
|
+
name: <unique-name>
|
|
89
|
+
description: <what the skill does and when Gemini should use it>
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
<your instructions for how the agent should behave / use the skill>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- **`name`**: A unique identifier (lowercase, alphanumeric, and dashes).
|
|
96
|
+
- **`description`**: The most critical field. Gemini uses this to decide when
|
|
97
|
+
the skill is relevant. Be specific about the expertise provided.
|
|
98
|
+
- **Body**: Everything below the second `---` is injected as expert procedural
|
|
99
|
+
guidance for the model.
|
|
100
|
+
|
|
101
|
+
### Example: Team Code Reviewer
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
---
|
|
105
|
+
name: code-reviewer
|
|
106
|
+
description:
|
|
107
|
+
Expertise in reviewing code for style, security, and performance. Use when the
|
|
108
|
+
user asks for "feedback," a "review," or to "check" their changes.
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
# Code Reviewer
|
|
112
|
+
|
|
113
|
+
You are an expert code reviewer. When reviewing code, follow this workflow:
|
|
114
|
+
|
|
115
|
+
1. **Analyze**: Review the staged changes or specific files provided. Ensure
|
|
116
|
+
that the changes are scoped properly and represent minimal changes required
|
|
117
|
+
to address the issue.
|
|
118
|
+
2. **Style**: Ensure code follows the project's conventions and idiomatic
|
|
119
|
+
patterns as described in the `GEMINI.md` file.
|
|
120
|
+
3. **Security**: Flag any potential security vulnerabilities.
|
|
121
|
+
4. **Tests**: Verify that new logic has corresponding test coverage and that
|
|
122
|
+
the test coverage adequately validates the changes.
|
|
123
|
+
|
|
124
|
+
Provide your feedback as a concise bulleted list of "Strengths" and
|
|
125
|
+
"Opportunities."
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Resource Conventions
|
|
129
|
+
|
|
130
|
+
While you can structure your skill directory however you like, the Agent Skills
|
|
131
|
+
standard encourages these conventions:
|
|
132
|
+
|
|
133
|
+
- **`scripts/`**: Executable scripts (bash, python, node) the agent can run.
|
|
134
|
+
- **`references/`**: Static documentation, schemas, or example data for the
|
|
135
|
+
agent to consult.
|
|
136
|
+
- **`assets/`**: Code templates, boilerplate, or binary resources.
|
|
137
|
+
|
|
138
|
+
When a skill is activated, Gemini CLI provides the model with a tree view of the
|
|
139
|
+
entire skill directory, allowing it to discover and utilize these assets.
|
|
140
|
+
|
|
141
|
+
## How it Works (Security & Privacy)
|
|
142
|
+
|
|
143
|
+
1. **Discovery**: At the start of a session, Gemini CLI scans the discovery
|
|
144
|
+
tiers and injects the name and description of all enabled skills into the
|
|
145
|
+
system prompt.
|
|
146
|
+
2. **Activation**: When Gemini identifies a task matching a skill's
|
|
147
|
+
description, it calls the `activate_skill` tool.
|
|
148
|
+
3. **Consent**: You will see a confirmation prompt in the UI detailing the
|
|
149
|
+
skill's name, purpose, and the directory path it will gain access to.
|
|
150
|
+
4. **Injection**: Upon your approval:
|
|
151
|
+
- The `SKILL.md` body and folder structure is added to the conversation
|
|
152
|
+
history.
|
|
153
|
+
- The skill's directory is added to the agent's allowed file paths, granting
|
|
154
|
+
it permission to read any bundled assets.
|
|
155
|
+
5. **Execution**: The model proceeds with the specialized expertise active. It
|
|
156
|
+
is instructed to prioritize the skill's procedural guidance within reason.
|
|
@@ -297,7 +297,7 @@ Captures startup configuration and user prompt submissions.
|
|
|
297
297
|
|
|
298
298
|
#### Tools
|
|
299
299
|
|
|
300
|
-
Captures tool executions, output truncation, and
|
|
300
|
+
Captures tool executions, output truncation, and Edit behavior.
|
|
301
301
|
|
|
302
302
|
- `gemini_cli.tool_call`: Emitted for each tool (function) call.
|
|
303
303
|
- **Attributes**:
|
|
@@ -325,11 +325,11 @@ Captures tool executions, output truncation, and Smart Edit behavior.
|
|
|
325
325
|
- `lines` (int)
|
|
326
326
|
- `prompt_id` (string)
|
|
327
327
|
|
|
328
|
-
- `gemini_cli.
|
|
328
|
+
- `gemini_cli.edit_strategy`: Edit strategy chosen.
|
|
329
329
|
- **Attributes**:
|
|
330
330
|
- `strategy` (string)
|
|
331
331
|
|
|
332
|
-
- `gemini_cli.
|
|
332
|
+
- `gemini_cli.edit_correction`: Edit correction result.
|
|
333
333
|
- **Attributes**:
|
|
334
334
|
- `correction` ("success" | "failure")
|
|
335
335
|
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Getting Started with Agent Skills
|
|
2
|
+
|
|
3
|
+
Agent Skills allow you to extend Gemini CLI with specialized expertise. This
|
|
4
|
+
tutorial will guide you through creating your first skill, enabling it, and
|
|
5
|
+
using it in a session.
|
|
6
|
+
|
|
7
|
+
## 1. Enable Agent Skills
|
|
8
|
+
|
|
9
|
+
Agent Skills are currently an experimental feature and must be enabled in your
|
|
10
|
+
settings.
|
|
11
|
+
|
|
12
|
+
### Via the interactive UI
|
|
13
|
+
|
|
14
|
+
1. Start a Gemini CLI session by running `gemini`.
|
|
15
|
+
2. Type `/settings` to open the interactive settings dialog.
|
|
16
|
+
3. Search for "Skills".
|
|
17
|
+
4. Toggle **Agent Skills** to `true`.
|
|
18
|
+
5. Press `Esc` to save and exit. You may need to restart the CLI for the
|
|
19
|
+
changes to take effect.
|
|
20
|
+
|
|
21
|
+
### Via `settings.json`
|
|
22
|
+
|
|
23
|
+
Alternatively, you can manually edit your global settings file at
|
|
24
|
+
`~/.gemini/settings.json` (create it if it doesn't exist):
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"experimental": {
|
|
29
|
+
"skills": true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 2. Create Your First Skill
|
|
35
|
+
|
|
36
|
+
A skill is a directory containing a `SKILL.md` file. Let's create an **API
|
|
37
|
+
Auditor** skill that helps you verify if local or remote endpoints are
|
|
38
|
+
responding correctly.
|
|
39
|
+
|
|
40
|
+
1. **Create the skill directory structure:**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
mkdir -p .gemini/skills/api-auditor/scripts
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
2. **Create the `SKILL.md` file:** Create a file at
|
|
47
|
+
`.gemini/skills/api-auditor/SKILL.md` with the following content:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
---
|
|
51
|
+
name: api-auditor
|
|
52
|
+
description:
|
|
53
|
+
Expertise in auditing and testing API endpoints. Use when the user asks to
|
|
54
|
+
"check", "test", or "audit" a URL or API.
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
# API Auditor Instructions
|
|
58
|
+
|
|
59
|
+
You act as a QA engineer specialized in API reliability. When this skill is
|
|
60
|
+
active, you MUST:
|
|
61
|
+
|
|
62
|
+
1. **Audit**: Use the bundled `scripts/audit.js` utility to check the
|
|
63
|
+
status of the provided URL.
|
|
64
|
+
2. **Report**: Analyze the output (status codes, latency) and explain any
|
|
65
|
+
failures in plain English.
|
|
66
|
+
3. **Secure**: Remind the user if they are testing a sensitive endpoint
|
|
67
|
+
without an `https://` protocol.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. **Create the bundled Node.js script:** Create a file at
|
|
71
|
+
`.gemini/skills/api-auditor/scripts/audit.js`. This script will be used by
|
|
72
|
+
the agent to perform the actual check:
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
// .gemini/skills/api-auditor/scripts/audit.js
|
|
76
|
+
const url = process.argv[2];
|
|
77
|
+
|
|
78
|
+
if (!url) {
|
|
79
|
+
console.error('Usage: node audit.js <url>');
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
console.log(`Auditing ${url}...`);
|
|
84
|
+
fetch(url, { method: 'HEAD' })
|
|
85
|
+
.then((r) => console.log(`Result: Success (Status ${r.status})`))
|
|
86
|
+
.catch((e) => console.error(`Result: Failed (${e.message})`));
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 3. Verify the Skill is Discovered
|
|
90
|
+
|
|
91
|
+
Use the `/skills` slash command (or `gemini skills list` from your terminal) to
|
|
92
|
+
see if Gemini CLI has found your new skill.
|
|
93
|
+
|
|
94
|
+
In a Gemini CLI session:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
/skills list
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
You should see `api-auditor` in the list of available skills.
|
|
101
|
+
|
|
102
|
+
## 4. Use the Skill in a Chat
|
|
103
|
+
|
|
104
|
+
Now, let's see the skill in action. Start a new session and ask a question about
|
|
105
|
+
an endpoint.
|
|
106
|
+
|
|
107
|
+
**User:** "Can you audit http://geminili.com"
|
|
108
|
+
|
|
109
|
+
Gemini will recognize the request matches the `api-auditor` description and will
|
|
110
|
+
ask for your permission to activate it.
|
|
111
|
+
|
|
112
|
+
**Model:** (After calling `activate_skill`) "I've activated the **api-auditor**
|
|
113
|
+
skill. I'll run the audit script now..."
|
|
114
|
+
|
|
115
|
+
Gemini will then use the `run_shell_command` tool to execute your bundled Node
|
|
116
|
+
script:
|
|
117
|
+
|
|
118
|
+
`node .gemini/skills/api-auditor/scripts/audit.js http://geminili.com`
|
|
119
|
+
|
|
120
|
+
## Next Steps
|
|
121
|
+
|
|
122
|
+
- Explore [Agent Skills Authoring Guide](../skills.md#creating-a-skill) to learn
|
|
123
|
+
about more advanced skill features.
|
|
124
|
+
- Learn how to share skills via [Extensions](../../extensions/index.md).
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This page contains tutorials for interacting with Gemini CLI.
|
|
4
4
|
|
|
5
|
+
## Agent Skills
|
|
6
|
+
|
|
7
|
+
- [Getting Started with Agent Skills](./tutorials/skills-getting-started.md)
|
|
8
|
+
|
|
5
9
|
## Setting up a Model Context Protocol (MCP) server
|
|
6
10
|
|
|
7
11
|
> [!CAUTION] Before using a third-party MCP server, ensure you trust its source
|
|
@@ -685,11 +685,9 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
685
685
|
- **Requires restart:** Yes
|
|
686
686
|
|
|
687
687
|
- **`tools.enableHooks`** (boolean):
|
|
688
|
-
- **Description:**
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
Requires MessageBus integration.
|
|
692
|
-
- **Default:** `false`
|
|
688
|
+
- **Description:** Enables the hooks system experiment. When disabled, the
|
|
689
|
+
hooks system is completely deactivated regardless of other settings.
|
|
690
|
+
- **Default:** `true`
|
|
693
691
|
- **Requires restart:** Yes
|
|
694
692
|
|
|
695
693
|
#### `mcp`
|
|
@@ -709,12 +707,6 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
709
707
|
- **Default:** `undefined`
|
|
710
708
|
- **Requires restart:** Yes
|
|
711
709
|
|
|
712
|
-
#### `useSmartEdit`
|
|
713
|
-
|
|
714
|
-
- **`useSmartEdit`** (boolean):
|
|
715
|
-
- **Description:** Enable the smart-edit tool instead of the replace tool.
|
|
716
|
-
- **Default:** `true`
|
|
717
|
-
|
|
718
710
|
#### `useWriteTodos`
|
|
719
711
|
|
|
720
712
|
- **`useWriteTodos`** (boolean):
|
|
@@ -854,6 +846,11 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
854
846
|
- **Default:** `"auto"`
|
|
855
847
|
- **Requires restart:** Yes
|
|
856
848
|
|
|
849
|
+
- **`experimental.useOSC52Paste`** (boolean):
|
|
850
|
+
- **Description:** Use OSC 52 sequence for pasting instead of clipboardy
|
|
851
|
+
(useful for remote sessions).
|
|
852
|
+
- **Default:** `false`
|
|
853
|
+
|
|
857
854
|
- **`experimental.introspectionAgentSettings.enabled`** (boolean):
|
|
858
855
|
- **Description:** Enable the Introspection Agent.
|
|
859
856
|
- **Default:** `false`
|
|
@@ -868,11 +865,20 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
868
865
|
|
|
869
866
|
#### `hooks`
|
|
870
867
|
|
|
868
|
+
- **`hooks.enabled`** (boolean):
|
|
869
|
+
- **Description:** Canonical toggle for the hooks system. When disabled, no
|
|
870
|
+
hooks will be executed.
|
|
871
|
+
- **Default:** `false`
|
|
872
|
+
|
|
871
873
|
- **`hooks.disabled`** (array):
|
|
872
874
|
- **Description:** List of hook names (commands) that should be disabled.
|
|
873
875
|
Hooks in this list will not execute even if configured.
|
|
874
876
|
- **Default:** `[]`
|
|
875
877
|
|
|
878
|
+
- **`hooks.notifications`** (boolean):
|
|
879
|
+
- **Description:** Show visual indicators when hooks are executing.
|
|
880
|
+
- **Default:** `true`
|
|
881
|
+
|
|
876
882
|
- **`hooks.BeforeTool`** (array):
|
|
877
883
|
- **Description:** Hooks that execute before tool execution. Can intercept,
|
|
878
884
|
validate, or modify tool calls.
|
|
@@ -927,6 +933,21 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
927
933
|
- **Description:** Hooks that execute before tool selection. Can filter or
|
|
928
934
|
prioritize available tools dynamically.
|
|
929
935
|
- **Default:** `[]`
|
|
936
|
+
|
|
937
|
+
#### `admin`
|
|
938
|
+
|
|
939
|
+
- **`admin.secureModeEnabled`** (boolean):
|
|
940
|
+
- **Description:** If true, disallows yolo mode from being used.
|
|
941
|
+
- **Default:** `false`
|
|
942
|
+
|
|
943
|
+
- **`admin.extensions.enabled`** (boolean):
|
|
944
|
+
- **Description:** If false, disallows extensions from being installed or
|
|
945
|
+
used.
|
|
946
|
+
- **Default:** `true`
|
|
947
|
+
|
|
948
|
+
- **`admin.mcp.enabled`** (boolean):
|
|
949
|
+
- **Description:** If false, disallows MCP servers from being used.
|
|
950
|
+
- **Default:** `true`
|
|
930
951
|
<!-- SETTINGS-AUTOGEN:END -->
|
|
931
952
|
|
|
932
953
|
#### `mcpServers`
|