# What Is Mode C in the gpt-image-2 Skill? The Complete Guide to Prompt-Advisor Fallback

> Discover Mode C in gpt-image-2 skill. Learn how this advisor fallback mode generates high-quality image prompts, even without image generation capabilities.

- Repository: [ConardLi/garden-skills](https://github.com/ConardLi/garden-skills)
- Tags: deep-dive
- Published: 2026-09-02

---

**Mode C is the "Advisor" fallback mode in the gpt-image-2 skill that acts as a pure prompt-consultant, generating high-quality image prompts without attempting any API calls when the host environment lacks image generation capabilities.**

The gpt-image-2 skill in the ConardLi/garden-skills repository operates in three distinct runtime modes, with Mode C serving as a critical fallback that ensures users retain access to professional prompt engineering even when image generation tools are unavailable. This mode transforms the skill into a structured prompt-writing assistant that prepares ready-to-use prompts for external tools like ChatGPT, Midjourney, or DALL·E 3.

## How Mode C Detection Works

The skill determines its runtime mode by executing [`skills/gpt-image-2/scripts/check-mode.js`](https://github.com/ConardLi/garden-skills/blob/main/skills/gpt-image-2/scripts/check-mode.js) immediately upon task initiation. This script evaluates the host environment to determine whether full image generation is possible.

Mode C activates when two specific conditions are met:
- The environment variable `ENABLE_GARDEN_IMAGEGEN` is **not set**
- The host agent provides **no built-in image-generation tool**

When both conditions evaluate to true, the skill automatically falls back to Mode C, bypassing all API-dependent functionality. According to the skill documentation in [`skills/gpt-image-2/SKILL.md`](https://github.com/ConardLi/garden-skills/blob/main/skills/gpt-image-2/SKILL.md), this detection occurs before any template processing begins, ensuring the skill never attempts unsupported API calls.

## The Mode C Workflow: Prompt Generation Without APIs

Unlike Mode A (which calls [`scripts/generate.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/generate.js)) or Mode B (which uses host-native tools), Mode C completes the full prompt preparation workflow but stops before image generation. The skill follows the standard template selection and field-filling process, then renders the final prompt for manual use.

### Prompt Preparation and Rendering

When operating in Mode C, the skill executes the following sequence:
1. **Template Selection**: Loads the specified template from the `references/` directory
2. **Field Population**: Injects user-provided values into template variables
3. **Prompt Rendering**: Generates the complete, formatted prompt text
4. **File Persistence**: Saves the rendered prompt to disk
5. **User Display**: Outputs the prompt with usage instructions

### Output Location and File Structure

Mode C saves all generated prompts to a dedicated directory using a timestamped naming convention:

```

garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md

```

For example, a brand poster task started on April 24, 2026 at 15:30:45 would save to [`garden-gpt-image-2/prompt/brand-poster-20260424-153045.md`](https://github.com/ConardLi/garden-skills/blob/main/garden-gpt-image-2/prompt/brand-poster-20260424-153045.md). Each file contains the complete, formatted prompt ready for copy-paste into external image generation platforms.

### User Interaction Model

After saving the file, Mode C explicitly informs the user that **"it has not generated an image"** and provides a recommendation to paste the rendered prompt into compatible tools such as ChatGPT, Midjourney, or DALL·E 3. This transparent communication ensures users understand they are receiving a prompt advisory service rather than image files.

## Mode C vs. Mode A: Key Differences

Understanding the boundaries between operational modes prevents workflow errors:

**Mode A (Full Generation)**
- Calls [`skills/gpt-image-2/scripts/generate.js`](https://github.com/ConardLi/garden-skills/blob/main/skills/gpt-image-2/scripts/generate.js) for image creation
- Calls [`skills/gpt-image-2/scripts/edit.js`](https://github.com/ConardLi/garden-skills/blob/main/skills/gpt-image-2/scripts/edit.js) for image modification
- Requires `ENABLE_GARDEN_IMAGEGEN` environment variable or native host tools
- Produces actual image files

**Mode C (Prompt Advisor)**
- Never invokes [`generate.js`](https://github.com/ConardLi/garden-skills/blob/main/generate.js) or [`edit.js`](https://github.com/ConardLi/garden-skills/blob/main/edit.js)
- Requires only Node.js runtime and template access
- Produces markdown prompt files only
- Explicitly notifies users of the non-generation status

As implemented in the ConardLi/garden-skills repository, Mode C ensures the skill remains functional in restricted environments while maintaining the structured approach to prompt engineering defined in [`skills/gpt-image-2/references/prompt-writing.md`](https://github.com/ConardLi/garden-skills/blob/main/skills/gpt-image-2/references/prompt-writing.md).

## Practical Example: Running Mode C Locally

To verify you are operating in Mode C or to intentionally use the prompt-advisor functionality, execute the mode detection script:

```bash

# Detect current runtime mode

node skills/gpt-image-2/scripts/check-mode.js

# Expected output: mode = C

```

To run a complete task in Mode C without image generation:

```bash
node skills/gpt-image-2/scripts/run-task.js \
  --template references/poster-and-campaigns/brand-poster.md \
  --field title="Eco-Friendly Water Bottle" \
  --field style="minimalist, pastel"

```

**Expected Output:**

```

✅ Mode C selected – acting as a prompt advisor
📄 Prompt saved to garden-gpt-image-2/prompt/brand-poster-20260424-153045.md
🗒️ Prompt:
"Create a minimalist pastel poster for an eco-friendly water bottle..."

💡 You can now paste the above prompt into any image tool (ChatGPT, Midjourney, DALL·E 3, etc.).

```

Note that in Mode C, the `--template` and `--field` arguments function identically to other modes, but the execution stops after the prompt rendering phase.

## Summary

- **Mode C** is the prompt-advisor fallback in gpt-image-2 that activates when `ENABLE_GARDEN_IMAGEGEN` is unset and no host image tools are available.
- The mode is detected by [`scripts/check-mode.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/check-mode.js) before any task processing begins.
- Mode C executes the full template workflow but saves output to `garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md` rather than generating images.
- The skill explicitly excludes [`scripts/generate.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/generate.js) and [`scripts/edit.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/edit.js) from Mode C execution, reserving these for Mode A only.
- Users receive ready-to-use prompts formatted for direct input into external generation platforms like ChatGPT, Midjourney, or DALL·E 3.

## Frequently Asked Questions

### What triggers Mode C in the gpt-image-2 skill?

Mode C triggers automatically when the [`scripts/check-mode.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/check-mode.js) script detects that the `ENABLE_GARDEN_IMAGEGEN` environment variable is not defined and the host agent provides no built-in image-generation capability. This dual-condition check ensures the skill only attempts API calls in supported environments.

### How is Mode C different from Mode A?

Mode A executes [`scripts/generate.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/generate.js) and [`scripts/edit.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/edit.js) to produce actual image files, requiring either the `ENABLE_GARDEN_IMAGEGEN` environment variable or native host tools. Mode C skips these scripts entirely, acting solely as a prompt-consultant that prepares text files for manual use in external image generators.

### Where does Mode C save the generated prompts?

Mode C persists rendered prompts to `garden-gpt-image-2/prompt/<task-slug>-<timestamp>.md` using the task identifier and current timestamp to ensure unique filenames. This directory structure keeps prompt assets organized and easily accessible for copy-paste workflows.

### Can I manually force the skill to use Mode C?

While Mode C typically activates automatically based on environment detection, you can ensure it runs by unsetting `ENABLE_GARDEN_IMAGEGEN` and removing access to host image tools before executing [`scripts/run-task.js`](https://github.com/ConardLi/garden-skills/blob/main/scripts/run-task.js). The [`check-mode.js`](https://github.com/ConardLi/garden-skills/blob/main/check-mode.js) script will then confirm Mode C selection before proceeding with the prompt-only workflow.