How to Use Garden Skills with Gemini CLI: Complete Setup and Integration Guide

Yes, Garden Skills fully supports the Gemini CLI through a native extension manifest system that requires no additional adapters, as confirmed by the "✅ Tested" compatibility mark in the repository's README.

The ConardLi/garden-skills repository provides production-ready Agent Skills that integrate seamlessly with multiple AI coding agents. If you want to use garden skills with Gemini CLI, the framework offers first-class support through standard extension manifests that register skills as native Gemini commands, enabling direct invocation from prompts without glue code.

Verifying Gemini CLI Compatibility in the Source Code

Before installing, you can verify support directly in the source documentation. The repository's top-level README.md contains a compatibility matrix that explicitly marks Gemini CLI as "✅ Tested" according to the ConardLi/garden-skills source code. This confirmation means the skills load and execute correctly without requiring platform-specific workarounds.

The compatibility table serves as the single source of truth for integration status across different AI agents, and Gemini CLI's inclusion in the tested column indicates full manifest compliance.

How the Extension Manifest System Works

Garden Skills utilizes a declarative manifest system that Gemini CLI natively understands. Each skill package includes a manifest.json file that describes its interface, runtime requirements, and execution scripts.

In skills/gpt-image-2/manifest.json, the manifest follows the Agent Skills specification and declares:

  • Category and skill metadata
  • Required environment variables (e.g., ENABLE_GARDEN_IMAGEGEN)
  • Execution scripts (e.g., scripts/generate.js)
  • Input/output schemas for type-safe invocation

When you install a Garden Skill, Gemini CLI reads this manifest file to register the skill as a native extension. The manifest location at skills/gpt-image-2/manifest.json serves as the entry point that tells Gemini how to parse inputs and route commands to the appropriate runtime handlers.

Installing Garden Skills via Gemini CLI

Installation follows the standard Gemini extension workflow. You can install directly from a release package or the repository.


# 1️⃣ Install the skill package from a release archive

gemini extension install https://github.com/ConardLi/garden-skills/releases/download/gpt-image-2-v1.0.0/gpt-image-2-1.0.0.zip

# 2️⃣ Verify the skill registered correctly

gemini extension list | grep gpt-image-2

# → gpt-image-2   Image generation / prompting

Once installed, Gemini CLI parses the manifest.json automatically, making the skill available immediately without configuration files or environment setup beyond the standard API keys.

Runtime Modes and Automatic Environment Detection

Garden Skills implement intelligent mode detection logic that adapts to the execution environment. As documented in skills/gpt-image-2/SKILL.md, the system automatically selects between three execution strategies when running under Gemini CLI:

  • Mode A – Garden local generation: Executes when ENABLE_GARDEN_IMAGEGEN is set and an OpenAI API key is present, generating images locally through the Garden runtime.
  • Mode B – Host-native delegation: Delegates to host-native tools when available (e.g., system image generators).
  • Mode C – Prompt-only advisor: Falls back to returning a high-quality, structured prompt for the user to feed into external image tools when no local generation capability is detected.

This mode detection happens automatically when you invoke the skill, ensuring optimal behavior regardless of whether your Gemini CLI environment has local image generation capabilities configured.

Practical Examples: CLI and Programmatic Usage

You can invoke Garden Skills directly from Gemini CLI prompts or programmatically from Node.js scripts running under the CLI.

Command-Line Invocation

Use natural language prompts that reference the skill by name:

gemini "Generate a poster about the evolution of LLMs using the gpt-image-2 skill."

Gemini loads the skill, runs its mode detection, and either:

  • Calls the local image API (Mode A) and returns the image URL, or
  • Returns a high-quality prompt for the user to feed into another image tool (Mode C)

Programmatic Usage

For scripted workflows, import the CLI's skill invocation API:

import { invokeSkill } from '@gemini/cli';

async function createPoster() {
  const result = await invokeSkill('gpt-image-2', {
    template: 'infographic',
    fields: {
      title: 'LLM Evolution 2017‑2026',
      style: 'dark‑space',
    },
  });
  console.log('Image URL:', result.image);
}

createPoster();

The invokeSkill function accepts the skill identifier (matching the name in manifest.json) and a configuration object that maps to the skill's input schema defined in the manifest.

Summary

  • Garden Skills are fully compatible with Gemini CLI, as verified by the "✅ Tested" status in README.md.
  • Each skill registers via a manifest.json file (e.g., skills/gpt-image-2/manifest.json) that Gemini CLI parses as a native extension.
  • Install skills using gemini extension install with direct URLs to release packages.
  • Automatic mode detection (Modes A, B, and C) ensures correct execution whether local image tools are available or not.
  • Skills can be invoked via natural language prompts or programmatically using the @gemini/cli API.

Frequently Asked Questions

Is Gemini CLI officially supported by Garden Skills?

Yes. According to the ConardLi/garden-skills source code, the repository's README.md includes a compatibility matrix that explicitly marks Gemini CLI as "✅ Tested". This indicates first-class support where skills load without additional adapters.

What file does Gemini CLI read to load a Garden Skill?

Gemini CLI reads the manifest.json file located in each skill's directory (e.g., skills/gpt-image-2/manifest.json). This JSON file defines the skill's inputs, outputs, required environment variables, and execution scripts following the Agent Skills specification.

How does Garden Skills handle image generation when using Gemini CLI without local tools?

When local generation tools are unavailable, the skill's mode detection logic (as defined in skills/gpt-image-2/SKILL.md) automatically falls back to Mode C (Prompt-only advisor). Instead of generating an image, it returns a high-quality, structured prompt that you can use with external image generation services.

Can I invoke Garden Skills programmatically from a Node.js script running under Gemini CLI?

Yes. You can import the invokeSkill function from @gemini/cli and call it with the skill identifier and parameters. This programmatic approach respects the same manifest.json configuration and mode detection logic as command-line invocations.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →