# How to Install the GPT-Image2 Agent Skill into Local Agent Folders

> Easily install the GPT-Image2 agent skill into local agent folders using Skill-CLI commands. Deploy to specific agents or all directories simultaneously with this quick guide.

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

---

**To install the GPT‑Image2 agent skill into local agent folders, use the Skill‑CLI command `npx skills add freestylefly/awesome-gpt-image-2 --skill gpt-image-2-style-library --global --copy` for specific agents, or `npx skills add freestylefly/awesome-gpt-image-2 --global --all --copy` to deploy across all supported directories simultaneously.**

The `freestylefly/awesome-gpt-image-2` repository distributes the **GPT‑Image2 agent skill** as an npm package that generates a shared *style library* ([`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json)) and a ready‑to‑run skill definition. When executed according to the source code in `scripts/install-style-skill.mjs`, the installation process copies these resources into the standard local skill directories recognized by Claude Code, Codex, and generic agent runtimes.

## Installation Methods

The repository provides four distinct pathways to deploy the skill. Choose the method that matches your authentication setup and target agents.

### Method 1: Skill-CLI (Recommended)

The Skill‑CLI approach allows precise targeting of specific agents. According to the README section **"Quick Install for Agent Skills"** (lines 44‑56), you can install the skill exclusively for Claude Code and Codex while skipping generic agent directories.

Run the following command to copy the skill to only the specified agent folders:

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

```

The `--global` flag ensures the skill is placed in the user’s home directory rather than a local project folder, while `--copy` physically duplicates the files into `~/.claude/skills` and `~/.codex/skills` rather than symlinking.

### Method 2: Install to All Supported Agents

To deploy the skill to every local agent folder that the `skills` utility recognizes—including the generic `~/.agents/skills` location—omit the `--agent` flag and use `--all`:

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

```

This command iterates through all detected agent configurations and copies [`agents/skills/gpt-image-2-style-library/SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/agents/skills/gpt-image-2-style-library/SKILL.md) alongside the generated library data into each respective directory.

### Method 3: npm CLI

You can install the package globally and invoke its built‑in installer directly. This method is documented in the README section **"npm CLI"** (lines 71‑82).

First, install the package globally:

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

```

Then execute the installation script:

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

```

The `install all` command—implemented in `scripts/install-style-skill.mjs`—writes the skill files to `~/.codex/skills`, `~/.claude/skills`, and `~/.agents/skills` in a single operation.

### Method 4: GitHub Packages

If you prefer to consume the package directly from the GitHub Package Registry without using the public npm registry, authenticate and install using the scoped package name:

```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

```

Alternatively, avoid a global install by using `npx`:

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

```

## Target Directory Structure

Once installation completes, the skill occupies the following paths within your home directory:

- **`~/.codex/skills`** – Used by the Codex UI to discover available skills.
- **`~/.claude/skills`** – Used by the Claude Code CLI.
- **`~/.agents/skills`** – The generic location for any agent following the `skills` convention.

Each directory receives a copy of **[`agents/skills/gpt-image-2-style-library/SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/agents/skills/gpt-image-2-style-library/SKILL.md)** and references the master **[`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json)** containing all style definitions. The generation logic in `scripts/generate-style-skill.mjs` ensures that the JSON library stays synchronized with the website and the agent skill, maintaining a single source of truth for prompt templates.

## Post-Installation Verification

After any installation method finishes, **restart the agent process** or reload the UI so the newly added skill is discovered. You can verify successful deployment by invoking the skill by name:

```text
Use gpt-image-2-style-library to create an infographic prompt about Codex.

```

If the agent recognizes the command, the skill files are correctly placed and accessible.

## Summary

- **Install the GPT‑Image2 agent skill into local agent folders** using Skill‑CLI, npm CLI, or GitHub Packages depending on your registry preferences.
- The Skill‑CLI command `npx skills add freestylefly/awesome-gpt-image-2 --global --all --copy` deploys to `~/.codex/skills`, `~/.claude/skills`, and `~/.agents/skills` simultaneously.
- The npm package generates [`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json) via `scripts/generate-style-skill.mjs` and copies resources using `scripts/install-style-skill.mjs`.
- Always restart your agent after installation to refresh the skill discovery cache.

## Frequently Asked Questions

### Which local agent folders are supported by the GPT‑Image2 skill?

The installation scripts target three standard directories: `~/.codex/skills` for the Codex UI, `~/.claude/skills` for Claude Code CLI, and `~/.agents/skills` for generic agent implementations. These paths are hardcoded in `scripts/install-style-skill.mjs` as the default deployment targets.

### How can I install the skill without using the Skill‑CLI?

You can install the `gpt-image-2-style-library` package globally via npm (`npm install -g gpt-image-2-style-library`) and then run `gpt-image-2-style-library install all`. This bypasses the Skill‑CLI entirely while writing the same files to the local agent directories. You may also use `npx gpt-image-2-style-library install all` to avoid a permanent global installation.

### Do I need to restart my agent after installing the skill?

Yes. After you install the GPT‑Image2 agent skill into local agent folders, you must restart the agent process or reload the UI. Agents cache the skill list at startup, so new entries in `~/.claude/skills` or `~/.codex/skills` will not appear until the next initialization cycle.

### Is the style data synchronized between the website and the agent skill?

Yes. The repository maintains a single source of truth through [`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json). The script `scripts/generate-style-skill.mjs` regenerates this file from the source case data, ensuring that both the web interface and the local agent skill reference identical style definitions and prompt templates.