# How to Use the Agent Skill with Claude Code and Codex: Complete Setup Guide

> Master the agent skill with Claude Code and Codex. This guide details the setup process, including the install command for seamless integration. Enhance your workflow today.

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

---

**You can install the GPT-Image-2-Style-Library agent skill into Claude Code and Codex by running the `gpt-image-2-style-library install` command, which copies the skill files into `~/.claude/skills` or `~/.codex/skills` respectively.**

The **GPT-Image-2-Style-Library** from the `freestylefly/awesome-gpt-image-2` repository provides a curated collection of image generation templates packaged as an agent skill. This guide explains how to use the agent skill with Claude Code and Codex to access style templates and generate images directly within your AI coding environment.

## What is the GPT-Image-2-Style-Library Agent Skill?

The **GPT-Image-2-Style-Library** is a specialized agent skill that contains templates, assets, and reference documentation for generating consistent, high-quality images. When installed, it integrates directly into the skill directories used by **Claude Code**, **Codex**, and shared agents, appearing as a browsable library within the agent's UI.

According to the repository source code, the skill is distributed as a complete package including [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md), agent configurations, assets, and reference materials located in `agents/skills/gpt-image-2-style-library/`.

## Prerequisites

Before installing the agent skill, ensure you have:

- **Node.js** installed to run the installation script (`install.mjs`)
- Access to the `awesome-gpt-image-2` repository or the packaged skill directory
- Claude Code or Codex installed locally with access to their respective configuration directories

## Installing the Agent Skill for Claude Code and Codex

The repository provides a unified CLI installer that handles platform-specific directory structures automatically.

### Installing for All Supported Agents

To install the skill across all compatible environments simultaneously, run:

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

```

This command installs the skill into `~/.claude/skills`, `~/.codex/skills`, and `~/.agents/skills` in a single operation.

### Platform-Specific Installation

Target individual agents using the specific command flags:

```bash

# Install only for Claude Code

gpt-image-2-style-library install claude-code

# Install only for Codex

gpt-image-2-style-library install codex

# Install only for shared agents

gpt-image-2-style-library install agents

```

## How the Installation Script Works

The installation logic resides in `agents/skills/gpt-image-2-style-library/bin/install.mjs` and performs three distinct operations:

**1. Target Directory Resolution (lines 35-46)**

The script determines the destination path based on the command argument:
- **Codex**: Uses `~/.codex/skills`
- **Claude Code**: Uses `~/.claude/skills`  
- **Shared agents**: Uses `~/.agents/skills`

**2. File Deployment (lines 57-90)**

For each target, the script:
- Creates the target directory if it does not exist
- Removes any existing version of the skill to prevent conflicts
- Copies the package entries including [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md), `agents`, `assets`, and `references` folders

**3. Confirmation (line 91)**

The script outputs the installation path to confirm successful deployment.

## Activating the Skill in Your Agent

After running the installation command, you must restart your agent session to load the newly installed skill:

1. Close Claude Code or Codex completely
2. Reopen the application
3. The **GPT-Image-2-Style-Library** will appear in the skills list, ready for browsing templates and generating images

The skill's [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md) file provides the human-readable description displayed within the agent's interface, while the `assets` and `references` directories supply the templates and documentation needed for image generation workflows.

## Summary

- The **GPT-Image-2-Style-Library** is installed via `gpt-image-2-style-library install [target]` using the Node.js script at `agents/skills/gpt-image-2-style-library/bin/install.mjs`
- **Claude Code** stores skills in `~/.claude/skills` while **Codex** uses `~/.codex/skills`
- The installation script handles directory creation, old version removal, and file copying automatically (lines 57-90)
- Restart your agent after installation to load the skill into the interface

## Frequently Asked Questions

### Where are the skill files stored on my system?

The installation script places files in platform-specific directories: `~/.claude/skills` for Claude Code, `~/.codex/skills` for Codex, and `~/.agents/skills` for shared agents. These paths are determined by the target parameter you specify when running the install command.

### Can I install the skill for multiple agents at once?

Yes. Run `gpt-image-2-style-library install all` to deploy the skill simultaneously to all supported environments including Claude Code, Codex, and the shared agents directory.

### What files are included in the skill package?

The skill package contains [`SKILL.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/SKILL.md) (the human-readable skill description), an `agents` directory with configurations, an `assets` folder with templates, and a `references` directory with documentation. These are copied from `agents/skills/gpt-image-2-style-library/` into your local agent directories.

### Do I need to restart Claude Code or Codex after installation?

Yes. You must restart the agent session after running the installation script so that Claude Code or Codex can reload its skill registry and recognize the newly installed GPT-Image-2-Style-Library.