Skip to content

Commit 223353f

Browse files
committed
feat: add support for skills
1 parent 3b650b0 commit 223353f

34 files changed

Lines changed: 3457 additions & 18 deletions
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: lint
16+
17+
on:
18+
push:
19+
paths-ignore:
20+
- "skills/**"
21+
pull_request:
22+
paths-ignore:
23+
- "skills/**"
24+
pull_request_target:
25+
types: [labeled]
26+
paths-ignore:
27+
- "skills/**"
28+
workflow_dispatch:
29+
30+
jobs:
31+
skills-validate:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Skip Skill Validation
35+
run: |
36+
echo "No changes detected in 'skills/' directory. Skipping validation."
37+
echo "This job ensures the required 'skills-validate' status check passes."
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Validate Skills
16+
17+
on:
18+
push:
19+
paths:
20+
- "skills/**"
21+
pull_request:
22+
paths:
23+
- "skills/**"
24+
pull_request_target:
25+
types: [labeled]
26+
paths:
27+
- "skills/**"
28+
29+
jobs:
30+
skills-validate:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
37+
with:
38+
python-version: "3.11"
39+
40+
- name: Install skills-ref
41+
run: |
42+
pip install "git+https://github.com/agentskills/agentskills.git#subdirectory=skills-ref"
43+
44+
- name: Validate Skills
45+
run: |
46+
failed=0
47+
for skill_dir in skills/*/; do
48+
if [ -d "$skill_dir" ]; then
49+
echo "Validating $skill_dir..."
50+
if ! skills-ref validate "$skill_dir"; then
51+
echo "Validation failed for $skill_dir"
52+
failed=1
53+
fi
54+
fi
55+
done
56+
exit $failed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
skills-gen/creds.sh

gemini-extension.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,6 @@
22
"name": "cloud-sql-mysql",
33
"version": "0.1.9",
44
"description": "Connect and interact with a Cloud SQL for MySQL database and data",
5-
"mcpServers": {
6-
"cloud_sql_mysql_admin": {
7-
"command": "${extensionPath}${/}toolbox",
8-
"args": [
9-
"--prebuilt",
10-
"cloud-sql-mysql-admin",
11-
"--stdio"
12-
]
13-
},
14-
"cloud_sql_mysql": {
15-
"command": "${extensionPath}${/}toolbox",
16-
"args": [
17-
"--prebuilt",
18-
"cloud-sql-mysql",
19-
"--stdio"
20-
]
21-
}
22-
},
235
"contextFileName": "CLOUD-SQL-MYSQL.md",
246
"settings": [
257
{

skills-gen/db_groups.md

Lines changed: 253 additions & 0 deletions
Large diffs are not rendered by default.

skills-gen/skill-support.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
You're a senior software engineer who's working to support skills in extensions for Google Data Cloud.
2+
3+
To support that create the following PRs in your repo. For each PR, first make the desired changes and then create a PR in the github repo. Please ensure that the PRs have good branch names as well as PR titles and descriptions. Directly create PRs in the repo. DO NOT CREATE ANY FORKS. All PRs should be created in a draft state.
4+
5+
# PR1: Add support for skills
6+
7+
1. Generate new skills using the latest toolbox binary (v1.1.0). Toolbox installation command:
8+
9+
```bash
10+
export VERSION=1.1.0
11+
curl -L -o toolbox2 https://storage.googleapis.com/mcp-toolbox-for-databases/v$VERSION/darwin/arm64/toolbox
12+
chmod +x toolbox2
13+
```
14+
15+
Then set the required env vars for configuration. You can
16+
find those in the configuration section in the readme file. Eg. https://github.com/gemini-cli-extensions/alloydb?tab=readme-ov-file#configuration.
17+
18+
Command example to generate skills for a toolset:
19+
20+
```bash
21+
./toolbox2 --prebuilt cloud-sql-postgres skills-generate --name "cloud-sql-postgres-health" --description "Use these skills when you need to audit database health, identify storage bloat, find invalid indexes, analyze table statistics, and manage maintenance configurations like autovacuum." --toolset=monitor --license-header "// Copyright 2026 Google LLC
22+
//
23+
// Licensed under the Apache License, Version 2.0 (the \"License\");
24+
// you may not use this file except in compliance with the License.
25+
// You may obtain a copy of the License at
26+
//
27+
// http://www.apache.org/licenses/LICENSE-2.0
28+
//
29+
// Unless required by applicable law or agreed to in writing, software
30+
// distributed under the License is distributed on an \"AS IS\" BASIS,
31+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32+
// See the License for the specific language governing permissions and
33+
// limitations under the License." --additional-notes="Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence." --additional-notes="Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence."
34+
```
35+
36+
Write the commands for all tools in generate-skills-repo.sh script. Do not commit this file.
37+
38+
Remember to generate skills for all toolsets mentioned in https://github.com/googleapis/mcp-toolbox/tree/main/internal/prebuiltconfigs/tools for the source. Eg. AlloyDB Source: https://github.com/googleapis/mcp-toolbox/blob/main/internal/prebuiltconfigs/tools/alloydb-postgres.yaml.
39+
40+
Find list of sources and their tools grouping along with toolset descriptions [here](./db_groups.md).
41+
42+
After skills generation, cross check the generated skills from the [source yaml files](https://github.com/googleapis/mcp-toolbox/tree/main/internal/prebuiltconfigs/tools) and the [document](./db_groups.md) provided above.
43+
44+
Now, for all generated skills, replace skill descriptions from using tools -> skills.
45+
46+
2. Add skills validation workflow. Eg: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/blob/main/.github/workflows/skills-validate.yml and https://github.com/gemini-cli-extensions/cloud-sql-postgresql/blob/main/.github/workflows/skills-validate-fallback.yml.
47+
48+
3. Remove the MCP servers from the gemini-extension.json file.
49+
50+
# PR2: Remove packaging workflow
51+
52+
1. Remove the github package and upload assets workflow: .github/workflows/package-and-upload-assets.yml.
53+
54+
# PR3: Add Claude code plugin config
55+
56+
1. Replicate this PR: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/pull/137. Ensure that the plugin.json user config is consistent with the env vars in the gemini-extension.json file.
57+
58+
# PR4: Add Codex plugin config
59+
60+
1. Replicate this PR: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/pull/138. Ensure that the system prompt you're using here is consistent with the gemini-extension context file.
61+
62+
# PR5: Auto update plugin versions using rp
63+
64+
1. Replicate this PR: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/pull/155. Also ensure that "README.md" is present in extra-files section for release-please.
65+
66+
# PR6: Make skill docs changes:
67+
68+
1. Find the context file in gemini-extension.json, for eg. CLOUD-SQL-POSTGRESQL.md for the CLOUD SQL repo: https://github.com/gemini-cli-extensions/cloud-sql-postgresql and make changes analogous to what was done in https://github.com/gemini-cli-extensions/cloud-sql-postgresql/pull/109/.
69+
70+
2. Make changes to the README.md and DEVELOPER.md files. Use https://github.com/gemini-cli-extensions/cloud-sql-postgresql/blob/main/DEVELOPER.md and https://github.com/gemini-cli-extensions/cloud-sql-postgresql/blob/main/README.md on potential changes.
71+
72+
3. Check for any "tools" mention in the repository that needs to be updated to skills.
73+
74+
4. Ensure that you have covered updates on the README on how to use the extensions with Gemini CLI, Claude Code, Codex and Antigravity. Be very through with looking into this: https://github.com/gemini-cli-extensions/cloud-sql-postgresql/blob/main/README.md and making updates. Notice that this readme has a table of contents and collapsible sections for claude code etc.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
name: cloud-sql-mysql-admin
3+
description: Use these skills when you need to provision new Cloud SQL for MySQL instances, create databases and users, clone existing environments, and monitor the progress of infrastructure operations.
4+
---
5+
6+
## Usage
7+
8+
All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values.
9+
10+
**Bash:**
11+
`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'`
12+
13+
**PowerShell:**
14+
`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'`
15+
16+
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
17+
18+
19+
## Scripts
20+
21+
22+
### create_database
23+
24+
25+
26+
#### Parameters
27+
28+
| Name | Type | Description | Required | Default |
29+
| :--- | :--- | :--- | :--- | :--- |
30+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
31+
| instance | string | The ID of the instance where the database will be created. | Yes | |
32+
| name | string | The name for the new database. Must be unique within the instance. | Yes | |
33+
34+
35+
---
36+
37+
### create_instance
38+
39+
40+
41+
#### Parameters
42+
43+
| Name | Type | Description | Required | Default |
44+
| :--- | :--- | :--- | :--- | :--- |
45+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
46+
| name | string | The name of the instance | Yes | |
47+
| databaseVersion | string | The database version for MySQL. If not specified, defaults to the latest available version (e.g., MYSQL_8_4). | No | `MYSQL_8_4` |
48+
| rootPassword | string | The root password for the instance | Yes | |
49+
| editionPreset | string | The edition of the instance. Can be `Production` or `Development`. This determines the default machine type and availability. Defaults to `Development`. | No | `Development` |
50+
51+
52+
---
53+
54+
### create_user
55+
56+
57+
58+
#### Parameters
59+
60+
| Name | Type | Description | Required | Default |
61+
| :--- | :--- | :--- | :--- | :--- |
62+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
63+
| instance | string | The ID of the instance where the user will be created. | Yes | |
64+
| name | string | The name for the new user. Must be unique within the instance. | Yes | |
65+
| password | string | A secure password for the new user. Not required for IAM users. | No | |
66+
| iamUser | boolean | Set to true to create a Cloud IAM user. | Yes | |
67+
68+
69+
---
70+
71+
### get_instance
72+
73+
74+
75+
#### Parameters
76+
77+
| Name | Type | Description | Required | Default |
78+
| :--- | :--- | :--- | :--- | :--- |
79+
| projectId | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
80+
| instanceId | string | The instance ID | Yes | |
81+
82+
83+
---
84+
85+
### list_databases
86+
87+
Lists all databases for a Cloud SQL instance.
88+
89+
#### Parameters
90+
91+
| Name | Type | Description | Required | Default |
92+
| :--- | :--- | :--- | :--- | :--- |
93+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
94+
| instance | string | The instance ID | Yes | |
95+
96+
97+
---
98+
99+
### list_instances
100+
101+
Lists all type of Cloud SQL instances for a project.
102+
103+
#### Parameters
104+
105+
| Name | Type | Description | Required | Default |
106+
| :--- | :--- | :--- | :--- | :--- |
107+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
108+
109+
110+
---
111+
112+
### wait_for_operation
113+
114+
115+
116+
#### Parameters
117+
118+
| Name | Type | Description | Required | Default |
119+
| :--- | :--- | :--- | :--- | :--- |
120+
| project | string | The GCP project ID. This is pre-configured; do not ask for it unless the user explicitly provides a different one. | No | |
121+
| operation | string | The operation ID | Yes | |
122+
123+
124+
---
125+

0 commit comments

Comments
 (0)