
dshark3y/gpt-image-2-skill
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
OpenAI의 gpt-image-2로 이미지 생성 및 편집을 위한 Claude Code 기술
개요
OpenAI의 gpt-image-2 Image API를 통해 이미지를 생성하고 편집하는 작은 스크립트-first Agent Skill. 저장소는 CLI 코드를 유지하므로 에이전트가 작동을 선택하고 API 호출을 발명 대신 플래그를 전달합니다. 배포 가능한 기술이 포함되어 있습니다. 생산 런타임: 4개의 집중된 파이썬 파일. uv는 첫번째 사용에 pinned OpenAI SDK를 해결합니다. - Python 3.10 또는 newer - uv - gpt-image-2에 액세스하는 OpenAI API 키 - 실행 시간에서 API 네트워크 액세스 OpenAI는 GPT 이미지 모델에 대한 API 조직 검증이 필요할 수 있습니다. CI, 호스팅 쉘 및 기존 OpenAI 설정에 대한 선호 : 상호 작용하는 국부적으로 기계를 위해 편리한: 두 번째 명령은 터미널 입력을 숨기고 POSIX의 소유자 전용 권한을 가진 사용자 소유 운영 시스템 구성 디렉토리의 키를 저장합니다. 그것은 결코 gpt-image/로 작성하지 않습니다, 그래서 다시 포장하거나 기술을 구성 된 키를 포함 할 수 없습니다. 그것을 제거:
개요(AI 번역)
OpenAI의 gpt-image-2를 통해 이미지를 생성하고 편집하는 작은 스크립트-first Agent Skill 이미지 API.
저장소는 CLI 코드를 유지하므로 에이전트가 작동을 선택하고 API 호출을 발명 대신 플래그를 전달합니다. 배포 가능한 기술은 ** API 키 없음, .env, 생성 된 이미지, 또는 의존성 캐시 **.
포함되는 것
Production runtime: 4개의 집중된 Python 파일. uv]는 첫번째 사용에 pinned OpenAI SDK를 해결합니다.
요구 사항
- Python 3.10 이상
- [T3]
gpt-image-2에 액세스하는 OpenAI API 키- 런타임에서 API 네트워크 액세스
OpenAI는 GPT 이미지 모델에 대한 API 조직 검증이 필요할 수 있습니다.
기술 수정 없이 구성
CI, 호스팅 쉘 및 기존 OpenAI 설정에 대한 선호 :
상호 작용하는 국부적으로 기계를 위해 편리한:
두 번째 명령은 터미널 입력을 숨기고 POSIX의 소유자 전용 권한을 가진 사용자 소유 운영 시스템 구성 디렉토리의 키를 저장합니다. 그것은 gpt-image/로 작성하지 않습니다, 그래서 다시 포장하거나 기술을 구성 된 키를 포함 할 수 없습니다. 그것을 제거:
SKILL.md], .env]] 스크립트, 프롬프트, 또는 아카이브 옆에 있는 파일들을 넣지 마십시오.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
GPT Image 2 skill
A small, script-first Agent Skill for generating and editing images through OpenAI’s gpt-image-2 Image API.
The repository ships maintained CLI code so an agent chooses an operation and passes flags instead of inventing an API call. The distributable skill contains no API key, .env, generated image, or dependency cache.
What is included
gpt-image/
├── SKILL.md
├── agents/openai.yaml
├── references/prompting-guide.md
└── scripts/
├── _common.py
├── configure.py
├── edit.py
└── generate.py
Production runtime: four focused Python files. uv resolves the pinned OpenAI SDK on first use.
Requirements
- Python 3.10 or newer
uv- An OpenAI API key with access to
gpt-image-2 - API network access from the runtime
OpenAI may require API organization verification for GPT Image models.
Configure without modifying the skill
Preferred for CI, hosted shells, and existing OpenAI setups:
export OPENAI_API_KEY="your-key"
Convenient for an interactive local machine:
python gpt-image/scripts/configure.py
The second command hides terminal input and stores the key in a user-owned operating-system config directory with owner-only permissions on POSIX. It never writes into gpt-image/, so repackaging or updating the skill cannot include the configured key. Remove it with:
python gpt-image/scripts/configure.py --remove
Do not put credentials in SKILL.md, .env files beside the scripts, prompts, or archives. In a hosted environment, the host must inject OPENAI_API_KEY; a skill upload cannot do that for you.
Run directly
Generate:
uv run --script gpt-image/scripts/generate.py \
--prompt "A vintage 1960s travel poster for Kyoto in autumn" \
--size 1024x1536 \
--quality high \
--output kyoto.png
Edit:
uv run --script gpt-image/scripts/edit.py \
--prompt "Replace the sky with a thunderstorm; preserve everything else" \
--images photo.jpg \
--output photo-stormy.png
Composite:
uv run --script gpt-image/scripts/edit.py \
--prompt "Place the dog from Image 2 next to the person in Image 1; match scale and light" \
--images scene.png dog.png \
--output composite.png
Run either script with --help for the complete, current CLI. Existing output files are protected unless --force is supplied.
Install as a local skill
Clone the repository, then copy or link the gpt-image/ directory itself into the skill directory used by your agent. The required layout is /gpt-image/SKILL.md; cloning the whole repository directly to that path leaves the manifest one level too deep.
For example:
git clone https://github.com/dshark3y/gpt-image-2-skill.git
mkdir -p ~/.claude/skills
cp -R gpt-image-2-skill/gpt-image ~/.claude/skills/gpt-image
Restart or reload the agent after installing.
Build a clean archive
추천 도구
다른 키워드를 입력하거나 필터를 제거해 보세요.
설치
npx skillfish add dshark3y/gpt-image-2-skill