How to Use npx to Add the awesome-gpt-image-2 Skill to AI Agents

Run npx skills add freestylefly/awesome-gpt-image-2 --skill gpt-image-2-style-library --agent claude-code codex --global --yes --copy to install the GPT-Image2 style library skill for local AI agents.

The freestylefly/awesome-gpt-image-2 repository distributes an Agent Skill called gpt-image-2-style-library that converts natural language intent into structured GPT-Image2 prompts using curated visual styles and templates. This skill can be added to Claude Code, Codex, and other compatible agents using npx without manually cloning the repository or copying files by hand.

What Is the gpt-image-2-style-library Skill?

The gpt-image-2-style-library is an Agent Skill that provides AI agents with access to GPT-Image2 visual styles, templates, and example cases. When invoked, it transforms user requests into ready-to-run image generation prompts.

According to the source code, the skill definition lives in agents/skills/gpt-image-2-style-library/SKILL.md, which contains the skill's metadata and workflow instructions. The actual style data is sourced from data/style-library.json and compiled into the skill package. This architecture separates the presentation logic (defined in SKILL.md) from the underlying style definitions stored in the JSON data file.

Prerequisites

Before running the npx command, ensure you have:

  • Node.js and npm installed on your system
  • The skills CLI available globally. Install it first if you haven't already:
npm install -g skills

Installing the Skill with npx

The repository provides specific npx commands to register the skill with your local agent's global skill directory (located at ~/.codex/skills, ~/.claude/skills, or equivalent paths for other agents).

Install for Specific Agents

To add only the gpt-image-2-style-library skill for Claude Code and Codex, run:

npx skills add freestylefly/awesome-gpt-image-2 \
  --skill gpt-image-2-style-library \
  --agent claude-code codex \
  --global --yes --copy

This copies the skill files from agents/skills/gpt-image-2-style-library/ into each agent's global skills folder, making it available across all local projects.

Install All Available Skills

If you want to install every skill provided by the repository for all supported agents, use the --all flag:

npx skills add freestylefly/awesome-gpt-image-2 \
  --global --all --copy

As documented in README.md (lines 66-74), this shortcut eliminates the need to specify individual skill names or agent types.

Understanding the Command Flags

The npx command uses several flags to control installation behavior:

  • --skill gpt-image-2-style-library – Selects the specific skill located in agents/skills/gpt-image-2-style-library/
  • --agent claude-code codex – Targets the installation for Claude Code and Codex (supports multiple agents in one command)
  • --global – Writes files to the agent's global skill directory rather than a local project folder
  • --yes – Automatically confirms prompts without interactive confirmation
  • --copy – Performs a physical file copy instead of creating a symlink, ensuring the skill remains functional even if the original repository is removed

Using the Installed Skill

After installation completes, the skill appears in your agent's available skill list. You can invoke it directly in prompts:

Use gpt-image-2-style-library to create an infographic prompt about renewable energy.

The agent will reference the installed skill files in ~/.codex/skills/gpt-image-2-style-library/ or ~/.claude/skills/gpt-image-2-style-library/ to generate responses based on the templates defined in the source data/style-library.json.

Alternative Installation via npm Scripts

The repository also exposes npm scripts in package.json for local development and manual installation:


# Regenerate the skill from data/style-library.json

npm run generate:style-skill

# Install the skill locally

npm run install:skill

These scripts provide alternatives to the npx workflow when working with a cloned copy of the repository.

Summary

  • The gpt-image-2-style-library skill enables GPT-Image2 prompt generation through curated visual templates defined in data/style-library.json.
  • Use npx skills add freestylefly/awesome-gpt-image-2 with the --skill, --agent, and --global flags to install the skill for Claude Code and Codex.
  • The --copy flag ensures the skill persists independently of the source repository.
  • Installed skills reside in ~/.codex/skills/ or ~/.claude/skills/ and activate automatically during agent conversations.

Frequently Asked Questions

Which AI agents support the awesome-gpt-image-2 skill?

The skill supports Claude Code, Codex, Cursor, and other agents that implement the skill directory specification. You can specify multiple agents in a single command using the --agent flag followed by the agent identifiers (e.g., claude-code codex). The skill metadata in agents/skills/gpt-image-2-style-library/SKILL.md defines the compatibility layer for these agents.

Where does npx install the skill files?

When using the --global flag, npx copies skill files into the agent-specific global directories: ~/.codex/skills/gpt-image-2-style-library/ for Claude Code and ~/.claude/skills/gpt-image-2-style-library/ for Claude Desktop. The --copy flag ensures these are standalone copies rather than symlinks, preventing breakage if the original repository is deleted.

Do I need to keep the repository cloned after installation?

No. When you use the --copy flag, the npx skills add command creates independent copies of the skill files in your agent's global directory. The skill functions entirely from those copied files, making the original repository optional for runtime operation.

How do I update the skill to the latest version?

Re-run the original npx command with the --yes flag to overwrite the existing installation with the latest version from the repository. Since the command pulls directly from freestylefly/awesome-gpt-image-2, it always installs the most recent commit from the default branch, updating both the SKILL.md definitions and the underlying data/style-library.json content.

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 →