How to Install the GPT-Image2 Style Library Skill Globally: 3 Methods

You can install the GPT-Image2 style library skill globally using npm, the skills CLI, or npx, making it available across Claude Code, Codex, and other AI agents without per-project setup.

The GPT-Image2 style library skill is distributed as the npm package gpt-image-2-style-library from the freestylefly/awesome-gpt-image-2 repository. A global installation writes the skill to common local agent directories such as ~/.codex/skills and ~/.claude/skills, allowing every supported agent to access the style definitions immediately after a restart.

Prerequisites

Before you install the GPT-Image2 style library skill globally, ensure your environment meets the following requirements:

  • Node.js version 14 or higher installed on your system.
  • One or more supported agents installed locally (Claude Code, Codex, Cursor, or generic Agents CLI).
  • Write permissions to your home directory so the installer can create ~/.codex/skills, ~/.claude/skills, and ~/.agents/skills.

Method 1: Install via npm Global

The simplest way to install GPT-Image2 style library skill globally is through npm’s global package registry. This method permanently installs the CLI on your system and works on any platform with Node.js.

Run the following commands in your terminal:

npm install -g gpt-image-2-style-library
gpt-image-2-style-library install all

The first command installs the package globally. The second command invokes the CLI entry point declared in package.json, which executes scripts/install-style-skill.mjs to copy the skill into every supported agent directory.

Method 2: Install Using the skills CLI

For users of Claude Code, Codex, or Cursor, the skills CLI offers a repository-aware installation method that downloads the skill directly from the source. This approach is ideal when you want to ensure you have the latest version from freestylefly/awesome-gpt-image-2.

Execute the following command:

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

This command clones the repository, extracts the skill definition from agents/skills/gpt-image-2-style-library/SKILL.md, and copies the generated assets into the global skill folders. The --global flag ensures the skill is written to ~/.codex/skills and ~/.claude/skills rather than a local project directory.

Method 3: One-Off Installation with npx

If you prefer not to keep a permanent global npm package, you can run the installer transiently using npx. This method executes the skill installer without leaving the package in your global node_modules.

Run this single command:

npx gpt-image-2-style-library install all

The install all sub-command still writes the skill files to the agent directories (~/.codex/skills, ~/.claude/skills, and ~/.agents/skills), but the package itself is not cached globally after execution.

How the Global Installation Works

When you run gpt-image-2-style-library install all, the script located at scripts/install-style-skill.mjs performs the following actions:

  1. Reads the source data from data/style-library.json, which contains the style definitions shared between the website and the skill.
  2. Generates the final skill artifacts using scripts/generate-style-skill.mjs.
  3. Copies the processed skill into the standard local directories:
    • ~/.codex/skills/ for Codex agent
    • ~/.claude/skills/ for Claude Code
    • ~/.agents/skills/ for generic agent configurations

After the files are written, you must restart your agent session (Claude Code, Codex, etc.) so it can load the new SKILL.md documentation and associated metadata.

Verify Your Installation

To confirm the GPT-Image2 style library skill is available globally, restart your agent and reference the skill in a prompt:

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

If the agent recognizes the skill name and begins applying style conventions from the library, the global installation succeeded.

Summary

  • npm global install (npm install -g gpt-image-2-style-library) permanently installs the CLI and works across all systems.
  • skills CLI (npx skills add) is optimized for Claude Code and Codex users who want direct repository integration.
  • npx (npx gpt-image-2-style-library install all) provides a one-off installation without permanent package retention.
  • The installer writes to ~/.codex/skills, ~/.claude/skills, and ~/.agents/skills via scripts/install-style-skill.mjs.
  • Always restart your agent after installing to load the skill definition from agents/skills/gpt-image-2-style-library/SKILL.md.

Frequently Asked Questions

Where are the global skill files stored after installation?

The installer copies the skill to three standard locations in your home directory: ~/.codex/skills/gpt-image-2-style-library/, ~/.claude/skills/gpt-image-2-style-library/, and ~/.agents/skills/gpt-image-2-style-library/. Each folder contains the SKILL.md file and supporting metadata required by the respective agent.

Do I need to reinstall the skill for every project?

No. When you install the GPT-Image2 style library skill globally using any of the three methods described, it resides in the common agent directories. Claude Code, Codex, and Cursor automatically discover skills in these global locations, so you do not need to repeat the installation inside individual project repositories.

What Node.js version is required to run the installer?

The gpt-image-2-style-library package requires Node.js version 14 or higher. This requirement is defined in the package.json engine fields and enforced by the npm CLI during installation. Older Node versions may fail when executing the modern ES modules used in scripts/install-style-skill.mjs.

How do I update the skill to the latest version from GitHub?

Run the same installation command you originally used. For npm users, execute npm update -g gpt-image-2-style-library followed by gpt-image-2-style-library install all. For skills CLI users, rerun the npx skills add command with the --force flag to overwrite the existing global installation with the latest files from the freestylefly/awesome-gpt-image-2 repository.

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 →