npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hermes-image2-skill

v0.2.0

Published

Install the Image2 generation skill for popular AI agents.

Downloads

25

Readme

Image2 Skill for AI Agents

为 Hermes Agent、Codex、Claude Code、OpenCode 及兼容 Agent Skills 的工具安装 image2-image-generation Skill。

Skill 固定使用模型 gpt-image-2 调用 POST /v1/images/generations。首次请求失败后至少重试三次,即最多请求四次。

安装

一次安装到所有支持的 Agent:

npx hermes-image2-skill install

也可以只安装到指定 Agent:

npx hermes-image2-skill install --agent hermes
npx hermes-image2-skill install --agent codex
npx hermes-image2-skill install --agent claude
npx hermes-image2-skill install --agent opencode
npx hermes-image2-skill install --agent agents
npx hermes-image2-skill install --agent codex,claude

支持的默认位置:

| Agent | 安装位置 | |---|---| | Hermes Agent | ${HERMES_HOME:-~/.hermes}/skills/media/image2-image-generation | | Codex | ${CODEX_HOME:-~/.codex}/skills/image2-image-generation | | Claude Code | ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/image2-image-generation | | OpenCode | ${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-~/.config}/opencode}/skills/image2-image-generation | | 通用 Agent Skills | ${AGENTS_HOME:-~/.agents}/skills/image2-image-generation |

查看目标与状态:

npx hermes-image2-skill list-agents
npx hermes-image2-skill status
npx hermes-image2-skill status --agent codex

目标中存在不同内容时,安装器会在修改任何目录前整体停止。确认替换时使用:

npx hermes-image2-skill install --force

安装后重启 Agent 或开启新会话,使 Skill 索引重新加载。

配置凭据

推荐成对设置环境变量:

export baseUrl="https://example.com/v1"
export apiKey="your-api-key"

也支持大写别名:

export IMAGE2_BASE_URL="https://example.com/v1"
export IMAGE2_API_KEY="your-api-key"

如果没有设置 Image2 环境变量,Skill 会尝试复用 Codex 配置:

  • ${CODEX_HOME:-~/.codex}/config.toml 当前 provider 的 base_url
  • ${CODEX_HOME:-~/.codex}/auth.json 的 OPENAI_API_KEY

Skill 不会打印、复制或修改 Codex API Key。只有 OAuth token、没有 OPENAI_API_KEY 的 Codex 登录不能作为图片接口凭据。

Claude Code、OpenCode 或其他 Agent 运行该 Skill 时,同样可以使用上述 Image2 环境变量。Agent 本身的模型登录凭据不会被推测或读取,Codex 的明确兼容回退除外。

缺少全部可用配置时,脚本以退出码 2 停止,并提示用户设置 baseUrl / apiKey 或配置可复用的 Codex provider。

直接测试

将 <skill-dir> 替换为当前 Agent 安装的 Skill 目录:

python3 <skill-dir>/scripts/generate.py \
  --prompt "A friendly cartoon puppy" \
  --size 1024x1024 \
  --output "$PWD/puppy.png"

全局安装 CLI

npm install -g hermes-image2-skill
hermes-image2-skill install

普通 npm install 不会修改 Agent 配置目录。只有显式运行 install 命令才会复制 Skill。

开发与发布

npm test
npm run pack:check
npm login
npm publish

创建 GitHub 仓库后:

git remote add origin <github-repository-url>
git push -u origin main

安全说明

  • API Key 不写入仓库、Skill 文件或命令参数。
  • 显式环境变量必须成对提供,不会与 Codex 凭据混用。
  • 默认全 Agent 安装会先检查每个目标;发生冲突时不会留下部分安装状态。
  • --force 只替换所选 Agent 中同名 Skill 的目录。

License

MIT