开源 Skill
GPT Image 2
为图片生成和编辑选择结构化模板,可调用兼容图像接口或交由宿主图像工具执行。
- 海报与产品视觉
- UI 样机和信息图
- 现有图片局部编辑
把它带到你的 Codex。
第三方内容,请安装前检查。安装将固定到页面标记的版本。
查看原始仓库 ↗显示安装命令
set -euo pipefail
skill_name='GPT Image 2'
source_url='https://github.com/ConardLi/garden-skills'
source_ref='aaf9a82f5efd73e87cc0998edc398e75bfc35901'
source_subdirectory='skills/gpt-image-2'
temp_root=$(mktemp -d)
backup_root="${CODEX_HOME:-$HOME/.codex}/skills-backups"
target_root="${CODEX_HOME:-$HOME/.codex}/skills"
backup_path=""
install_complete="0"
restore_previous() {
if [ "$install_complete" != "1" ]; then
rm -rf "$target_root/$skill_name"
if [ -n "$backup_path" ] && [ -d "$backup_path" ]; then
mv "$backup_path" "$target_root/$skill_name"
fi
fi
}
cleanup() { rm -rf "$temp_root"; }
trap 'restore_previous; cleanup' EXIT
git clone --filter=blob:none --no-checkout "$source_url" "$temp_root/repo"
git -C "$temp_root/repo" checkout "$source_ref" -- "$source_subdirectory"
test -f "$temp_root/repo/$source_subdirectory/SKILL.md"
mkdir -p "$target_root" "$backup_root"
if [ -e "$target_root/$skill_name" ]; then
backup_path="$backup_root/$skill_name-$(date +%Y%m%d-%H%M%S)"
mv "$target_root/$skill_name" "$backup_path"
fi
cp -R "$temp_root/repo/$source_subdirectory" "$target_root/$skill_name"
test -f "$target_root/$skill_name/SKILL.md"
install_complete="1"
printf 'Installed %s\n' "$target_root/$skill_name"
if [ -n "$backup_path" ]; then printf 'Backup %s\n' "$backup_path"; fi