How to Use the npx skills CLI to Add the GPT-Image2 Agent Skill

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 as a global agent skill for Claude Code or Codex.

The npx skills CLI is a package-agnostic command-line tool that extends AI agents like Claude Code and Codex with self-contained skill modules. Using the npx skills CLI with the awesome-gpt-image-2 repository allows you to install the gpt-image-2-style-library skill, which provides structured style tags and prompt templates for GPT-Image2 generation.

Installing the GPT-Image2 Style Library Skill

The npx skills CLI downloads the repository, extracts the skill definition, and copies files into your agent's local skill directories. You can install either a single skill or the complete skill set bundled in the repository.

Single Skill Installation

To install only the GPT-Image2 style-library skill, specify the repository, skill name, and target agents:

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

The flags perform the following functions according to the repository's README:

  • --skill gpt-image-2-style-library: Targets the specific skill located in agents/skills/gpt-image-2-style-library/
  • --agent claude-code codex: Installs the skill for both Claude Code and Codex agents
  • --global: Copies the skill to the global agent directories (~/.claude/skills and ~/.codex/skills)
  • --yes: Skips interactive confirmation prompts
  • --copy: Forces a physical file copy rather than creating a symlink

After installation, you must restart your agent for the skill to be discovered. Once loaded, invoke the skill from any chat prompt:

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

Bulk Installation of All Skills

If you want to install every skill bundled in the repository (useful for development environments), use the --all flag:

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

This command copies every skill found under agents/skills/ into your local agent folders, making them immediately available without issuing individual installation commands.

Understanding the Skill Architecture

The GPT-Image2 agent skill is a thin wrapper around the repository's style library data. Understanding the underlying files helps when customizing or debugging the installation.

The Skill Manifest (SKILL.md)

Each skill requires a manifest file that defines its workflow and behavior. For the GPT-Image2 skill, this file is located at:


agents/skills/gpt-image-2-style-library/SKILL.md

This markdown file contains the skill's workflow description and metadata that the agent reads at runtime. It instructs the agent how to present style tags, template categories, and example cases to the user.

The Style Library Data (style-library.json)

The actual content powering the skill resides in:


data/style-library.json

This JSON file defines the master style library, including prompt templates, tags, and example cases. At runtime, the skill reads data/style-library.json to inject context-aware GPT-Image2 prompt structures into your conversation.

Generation and Installation Scripts

The repository includes Node.js scripts that maintain the skill:

  • scripts/generate-style-skill.mjs: Converts data/style-library.json into the skill's static assets and updates SKILL.md
  • scripts/install-style-skill.mjs: Handles the physical copying of skill files into agent directories

These scripts ensure that any updates to the style library are properly propagated to the skill format required by Claude Code and Codex.

Alternative Installation Methods

If you prefer working directly with the repository source rather than using the npx skills CLI, the repository provides npm scripts that perform the same operations.

Using npm Scripts

Clone the repository and run the internal generation and installation scripts:


# Regenerate skill source from the JSON library

npm run generate:style-skill

# Copy the skill into local agent folders

npm run install:skill

These commands execute scripts/generate-style-skill.mjs and scripts/install-style-skill.mjs respectively, producing the same file structure that the npx skills CLI creates automatically.

Summary

  • The npx skills CLI installs agent skills from remote repositories with a single command, eliminating manual file management.
  • The GPT-Image2 agent skill (gpt-image-2-style-library) provides structured prompt templates for GPT-Image2 by reading data/style-library.json at runtime.
  • Use --skill gpt-image-2-style-library for targeted installation, or --all to install every skill in the repository.
  • Key files include agents/skills/gpt-image-2-style-library/SKILL.md (manifest) and data/style-library.json (data source).
  • Always restart your agent after installation to load the new skill into the context window.

Frequently Asked Questions

Do I need to restart Claude Code or Codex after installing a skill?

Yes. Because the npx skills CLI writes files directly to the agents' local skill folders (such as ~/.claude/skills or ~/.codex/skills), the agent process must be restarted to discover and load the new skill manifest. Once restarted, the skill becomes available in your next conversation.

The --copy flag forces the CLI to create a physical copy of the skill files in your agent directory. Without this flag, the CLI might create a symlink pointing back to the downloaded repository. Copying ensures the skill persists even if the temporary download directory is cleaned up, and prevents permission issues across different file systems.

Can I install the skill for only one agent instead of globally?

Yes. Remove the --global flag and specify only the desired agent with --agent. For example, use --agent claude-code (without --global) to install the skill only in your local project's Claude Code configuration rather than the global ~/.claude/skills directory. However, most users prefer --global to make the skill available across all projects.

How do I update the skill after the repository is updated?

Run the same npx skills add command again with the --yes flag to overwrite the existing installation with the latest version from the repository. Alternatively, if you cloned the repository locally, run git pull followed by npm run generate:style-skill and npm run install:skill to regenerate and reinstall the skill from the updated data/style-library.json.

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 →