Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/skills-validate-fallback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: lint

on:
push:
paths-ignore:
- "skills/**"
pull_request:
paths-ignore:
- "skills/**"
pull_request_target:
types: [labeled]
paths-ignore:
- "skills/**"
workflow_dispatch:

jobs:
skills-validate:
runs-on: ubuntu-latest
steps:
- name: Skip Skill Validation
run: |
echo "No changes detected in 'skills/' directory. Skipping validation."
echo "This job ensures the required 'skills-validate' status check passes."
56 changes: 56 additions & 0 deletions .github/workflows/skills-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Validate Skills

on:
push:
paths:
- "skills/**"
pull_request:
paths:
- "skills/**"
pull_request_target:
types: [labeled]
paths:
- "skills/**"

jobs:
skills-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.11"

- name: Install skills-ref
run: |
pip install "git+https://github.com/agentskills/agentskills.git#subdirectory=skills-ref"

- name: Validate Skills
run: |
failed=0
for skill_dir in skills/*/; do
if [ -d "$skill_dir" ]; then
echo "Validating $skill_dir..."
if ! skills-ref validate "$skill_dir"; then
echo "Validation failed for $skill_dir"
failed=1
fi
fi
done
exit $failed
58 changes: 17 additions & 41 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,67 @@
# DEVELOPER.md

This document provides instructions for setting up your development environment
and contributing to the Dataplex Gemini CLI Extension project.
This document provides instructions for setting up your development environment and contributing to the Firestore Native Gemini CLI Extension project.

## Prerequisites

Before you begin, ensure you have the following:

1. **Gemini CLI:** Install the Gemini CLI version v0.6.0 or above. Installation
instructions can be found on the official Gemini CLI documentation. You can
verify your version by running `gemini --version`.
2. **Firestore database:** For testing data plane tools, you will need access to an active Firestore database.
1. **Gemini CLI:** Install the Gemini CLI version v0.6.0 or above. Installation instructions can be found on the [official Gemini CLI documentation](https://google-gemini.github.io/gemini-cli/). You can verify your version by running `gemini --version`.
2. **Firestore database:** For testing skills, you will need access to an active Firestore database.

## Developing the Extension

### Running from Local Source

The core logic for this extension is handled by a pre-built `toolbox` binary. The development process involves installing the extension locally into the Gemini CLI to test changes.
This extension uses **Agent Skills** to interact with Firestore. The development process involves generating these skills locally and linking the extension to the Gemini CLI.

1. **Clone the Repository:**

```bash
git clone https://github.com/gemini-cli-extensions/firestore-native.git
cd firestore-native
```

2. **Download the Toolbox Binary:** The required version of the `toolbox` binary
is specified in `toolbox_version.txt`. Download it for your platform.

```bash
# Read the required version
VERSION=$(cat toolbox_version.txt)

# Example for macOS/amd64
curl -L -o toolbox https://storage.googleapis.com/mcp-toolbox-for-databases/geminicli/v$VERSION/darwin/amd64/toolbox
chmod +x toolbox
```
Adjust the URL for your operating system (`linux/amd64`, `darwin/arm64`, `windows/amd64`).

3. **Link the Extension Locally:** Use the Gemini CLI to install the
2. **Install the Extension Locally:** Use the Gemini CLI to install the
extension from your local directory.

```bash
gemini extensions link .
gemini extensions install .
```
The CLI will prompt you to confirm the linking. Accept it to proceed.
The CLI will prompt you to confirm the installation. Accept it to proceed.

4. **Testing Changes:** After linking, start the Gemini CLI (`gemini`).
You can now interact with the `firestore-native` tools to manually test your changes
3. **Testing Changes:** After installation, start the Gemini CLI (`gemini`).
You can now interact with the `firestore-native` skills to manually test your changes
against your connected database.

## Testing

### Automated Presubmit Checks
### Automated Skills Validation

A GitHub Actions workflow (`.github/workflows/presubmit-tests.yml`) is triggered
for every pull request. This workflow primarily verifies that the extension can
be successfully installed by the Gemini CLI.

Currently, there are no automated unit or integration test suites
within this repository. All functional testing must be performed manually. All tools
are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/mcp-toolbox).
All tools are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/mcp-toolbox).

The skills themselves are validated using the `skills-validate.yml` workflow.

### Other GitHub Checks

* **License Header Check:** A workflow ensures all necessary files contain the
proper license header.
* **Conventional Commits:** This repository uses
[Release Please](https://github.com/googleapis/release-please) to manage
releases. Your commit messages must adhere to the
[Conventional Commits](https://www.conventionalcommits.org/) specification.
* **Dependency Updates:** [Renovate](https://github.com/apps/forking-renovate)
is configured to automatically create pull requests for dependency updates.
* **License Header Check:** A workflow ensures all necessary files contain the proper license header.
* **Conventional Commits:** This repository uses [Release Please](https://github.com/googleapis/release-please) to manage releases. Your commit messages must adhere to the [Conventional Commits](https://www.conventionalcommits.org/) specification.

## Maintainer Information

### Team

The primary maintainers for this repository are defined in the
[`.github/CODEOWNERS`](.github/CODEOWNERS) file:
The primary maintainers for this repository are defined in the [`.github/CODEOWNERS`](.github/CODEOWNERS) file:

* `@gemini-cli-extensions/senseai-eco`
* `@gemini-cli-extensions/firestore-native-maintainers`

### Releasing

The release process is automated using `release-please`. It consists of an automated changelog preparation step followed by the manual merging of a Release PR.
The release process is automated using `release-please`. It consists of an automated changelog preparation step followed by the manual merging of a Release PR. When the Release PR is merged, `release-please` creates a new GitHub tag and a corresponding GitHub Release.

#### Automated Changelog Enrichment

Expand Down
20 changes: 10 additions & 10 deletions FIRESTORE-NATIVE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
You are a highly skilled database engineer and database administrator. Your purpose is to
help the developer build and interact with databases and utilize data context throughout the entire
software delivery cycle.
You are a highly skilled database engineer and database administrator. Your purpose is to help the developer build and interact with databases and utilize data context throughout the entire software delivery cycle.

---

Expand All @@ -25,27 +23,29 @@ This section covers connecting to a Firestore instance.
* Granting Roles: https://cloud.google.com/iam/docs/grant-role-console
* Firestore Permissions: https://cloud.google.com/iam/docs/roles-permissions/firestore


---

# Usage Guidelines

## Connecting to New Resources

You will need to perform the following steps to change the current database connection:
When you want to change the current database connection, you will need to perform the following steps:

1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
2. **Stop the CLI:** Terminate the Gemini CLI.
3. **Update Environment Variables:** Set or update your environment variables (e.g. `FIRESTORE_DATABASE`) to point to the new resource.
4. **Restart:** Relaunch the Gemini CLI
2. **Stop the CLI**: Terminate the Gemini CLI.
3. **Update Extension Configuration**: Use the command `gemini extensions config firestore-native` to update your settings (e.g. `FIRESTORE_DATABASE`) to point to the new resource.
4. **Restart**: Relaunch the Gemini CLI
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`

**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.

## Reusing Project Values

Users may have set project environment variables:

* `FIRESTORE_PROJECT`: The GCP project ID.
* `FIRESTORE_DATABASE`: The Firestore database ID.

Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
Make sure to not use the environment variable name like `FIRESTORE_PROJECT`, `${FIRESTORE_PROJECT}`, or `$FIRESTORE_PROJECT`. The value can be found by using command: `echo $FIRESTORE_PROJECT`.
Instead of prompting the user for these values for specific skill calls, prompt the user to verify the reuse of a specific setting value.
Make sure to not use the environment variable name like `FIRESTORE_PROJECT`, `${FIRESTORE_PROJECT}`, or `$FIRESTORE_PROJECT`.
The value can be verified by the user using the `gemini extensions config firestore-native` command or by checking their local settings.
Loading
Loading