# How to Install the gpt-image-2-style-library Package: 6 Methods Explained

> Discover six gpt-image-2-style-library installation methods. Explore agent-specific skills CLI, npm global installs, and GitHub Packages registry for flexible setup.

- Repository: [苍何/awesome-gpt-image-2](https://github.com/freestylefly/awesome-gpt-image-2)
- Tags: how-to-guide
- Published: 2026-09-05

---

**The gpt-image-2-style-library package supports six distinct installation methods ranging from agent-specific skill installation via the `skills` CLI to traditional npm global installs and GitHub Packages registry access.**

The `gpt-image-2-style-library` is distributed as part of the `freestylefly/awesome-gpt-image-2` repository and provides style utilities for GPT image generation workflows. Whether you are integrating it into Claude Code, Codex, or generic Node.js environments, the package offers flexible installation pathways documented in the repository's [`README.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/README.md) and implemented in `agents/skills/gpt-image-2-style-library/bin/install.mjs`.

## Installation Methods Overview

The package can be installed via agent-specific skill managers, npm CLI utilities, or the GitHub Packages registry. Each method targets different workflows: rapid prototyping in AI agent environments, permanent global CLI access, or authenticated enterprise installs.

### Method 1: Quick Install for Agent Skills (Recommended)

The fastest way to install the library into specific AI agent environments uses the `skills` CLI tool. This method copies the skill files directly into agent-specific directories such as `~/.codex/skills` or `~/.claude/skills`.

According to the source code in `bin/install.mjs`, this approach invokes the `install` command which copies assets including [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md), `agents/`, `assets/`, and `references/` directories to the target location.

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

```

### Method 2: Install to Every Supported Local Agent

To deploy the skill across all recognized agent environments simultaneously, use the `--all` flag with the `skills` CLI. This shortcut eliminates the need to specify individual agents.

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

```

### Method 3: Claude Code Plugin Marketplace Registration

For Claude Code users, the repository can be registered as a marketplace plugin and installed via the Claude Code UI. This method requires running commands inside the Claude Code environment rather than the standard shell.

```text
/plugin marketplace add freestylefly/awesome-gpt-image-2
/plugin install gpt-image-2-style-library@awesome-gpt-image-2

```

### Method 4: Global npm CLI Install

Installing the package globally via npm provides persistent CLI access to the `gpt-image-2-style-library` command. After installation, you can sync the skill files to agent directories using the built-in `install` command.

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

```

### Method 5: Local npx Install (No Global)

For one-off usage or CI/CD pipelines where global installation is undesirable, use `npx` to execute the CLI without persisting the package to your global node_modules. This runs the `install` command defined in `bin/install.mjs` ephemerally.

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

```

### Method 6: GitHub Packages Registry

Enterprise users or those requiring authenticated access can install from the GitHub Packages registry under the `@freestylefly` scope. This method requires authentication via personal access token.

```bash
npm login --scope=@freestylefly --registry=https://npm.pkg.github.com
npm install -g @freestylefly/gpt-image-2-style-library --registry=https://npm.pkg.github.com
gpt-image-2-style-library install all

```

## How the Installation Works

All installation methods ultimately invoke the logic defined in `agents/skills/gpt-image-2-style-library/bin/install.mjs`. This Node.js module handles the distribution of skill assets by copying [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md), the `agents/` directory, `assets/`, and `references/` into the appropriate target directories for Codex, Claude Code, or shared agent folders.

The [`package.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/package.json) in [`agents/skills/gpt-image-2-style-library/package.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/agents/skills/gpt-image-2-style-library/package.json) defines the binary entry point that exposes the `gpt-image-2-style-library` CLI command, while [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md) provides human-readable documentation that gets distributed alongside the code.

## Summary

- **Agent-specific installs** use `npx skills add` with `--agent` flags to copy files directly to `~/.codex/skills` or `~/.claude/skills`.
- **Universal installation** via `npx skills add --all` deploys to every supported agent environment at once.
- **Claude Code Marketplace** integration allows GUI-based installation through `/plugin` commands.
- **Global npm install** provides persistent CLI access using `npm install -g gpt-image-2-style-library`.
- **Ephemeral execution** via `npx gpt-image-2-style-library` avoids global package pollution.
- **GitHub Packages** requires authentication to the `@freestylefly` scope but offers enterprise-grade distribution.

## Frequently Asked Questions

### Do I need to authenticate to install from GitHub Packages?

Yes, installing from the GitHub Packages registry requires authentication. You must run `npm login --scope=@freestylefly --registry=https://npm.pkg.github.com` and provide a personal access token with `read:packages` permissions before executing the global install command.

### What files does the installer copy to my agent directories?

According to `bin/install.mjs`, the installer copies [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md), the `agents/` directory, `assets/`, and `references/` folders into the target agent skill directories such as `~/.codex/skills` or `~/.claude/skills`.

### Can I use the package without installing it globally?

Yes, you can run `npx gpt-image-2-style-library install all` to execute the installation script without persisting the package to your global node_modules. This is ideal for CI pipelines or temporary environments.

### Which installation method is best for Claude Code users?

Claude Code users have two optimal paths: use the Plugin Marketplace method (`/plugin marketplace add` followed by `/plugin install`) for GUI-based management, or use the `skills` CLI with `--agent claude-code` for command-line automation.