ImageForge for Openclaw

A structured AI agent skill for generating and editing raster images using the NextAI Code image API.

nextai
v0.1.1
Jul 9, 2026
0
521
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install nextai-image-forge

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install nextai-image-forge using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ImageForge?

ImageForge is a technical utility designed for AI agents to generate and edit raster images through the fixed NextAI Code image API. By integrating with Openclaw Skills, it enforces a structured execution gate that guarantees configuration and design requirements are met before making paid provider calls. The skill acts as an intelligent intermediary, handling image briefs, setup diagnostics, and API interaction securely.

The framework prevents common issues like vague generation requests and incomplete API setups by introducing a strict verification gate. By using a helper script, agents can reliably manage preflight checks, configure credentials locally, and write standardized output images directly to the workspace.

ImageForge Use Cases

  • Generating custom raster images based on highly structured, approved design briefs.
  • Editing existing raster images by applying text-based instructions alongside a single source file.
  • Automating configuration readiness checks for AI image workflows without hardcoding API keys.
  • Structuring AI agent behavior to prevent wasteful API calls through a collaborative design review process.

How ImageForge Works

  1. Execution Gate Validation: Every invocation starts by running the ensure-ready command to verify the configuration and local environment.
  2. Configuration Setup: If preflight fails, the helper script automatically spins up a local web server to capture credentials securely.
  3. Image Brief Brainstorming: The agent reads the local image brief reference and conducts a structured question-and-answer workflow with the user.
  4. Design Confirmation: The agent proposes design directions and receives formal approval or a direct instruction bypass before proceeding.
  5. API Request Dispatching: The helper invokes the NextAI Code API to generate or edit the asset, writing a PNG to the project root.
  6. Completion Reporting: The agent reports the final image path, dimensions, and diagnostic status.

ImageForge Setup

To use ImageForge with Openclaw Skills, run the configuration setup through the helper script to initialize environment variables and local configs.

First, resolve the script path and run the readiness check:

WORKSPACE_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
IMAGE_FORGE_SCRIPT=""
for candidate in "$WORKSPACE_ROOT/.agents/skills/image-forge/scripts/image_forge.py" "$PWD/.agents/skills/image-forge/scripts/image_forge.py" "$HOME/.agents/skills/image-forge/scripts/image_forge.py"; do
  if [ -f "$candidate" ]; then IMAGE_FORGE_SCRIPT="$candidate"; break; fi
done

python3 "$IMAGE_FORGE_SCRIPT" ensure-ready

If credentials are missing, the command automatically hosts a local setup page at 127.0.0.1. Enter your API key and default model (such as gpt-image-2) to authorize NextAI Code API requests.

ImageForge Data Schema & Taxonomy

The skill organizes its configuration, assets, and workflows using specific directory paths and local JSON schemas.

Directory & File Layout

Path Type Purpose
.image-forge/config.json Project Config Defines defaultModel and outputDir
~/.config/image-forge/secrets.json User Secret Securely stores the apiKey locally
references/image-brief.md Documentation Contains the structured brief template
[project_root]/*.png Output Generated and edited image files

Configuration Schema

Configuration variables are resolved in the following priority order:

  • Fixed API Endpoint: https://www.nextai-code.com/v1
  • Environment Variables: IMAGE_FORGE_API_KEY, IMAGE_FORGE_MODEL
  • Project Configuration File
  • User Configuration File

ImageForge Advanced Features

  • Automatic Setup Server: Runs a secure, tokenized local web server on port 127.0.0.1 to collect credentials without exposing keys in shell histories.
  • Image Brief Enforcement: Validates that image requests contain comprehensive background details, preventing incomplete API payloads.
  • Direct Bypass Mode: Allows power users to skip interactive clarification steps by supplying the --direct flag during invocation.
  • Built-in Diagnostics: Provides a diagnostic suite (doctor and check-version commands) to troubleshoot network connectivity and manage skill updates.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*