技能 codex-pet
🦀

codex-pet

中風險 ⚙️ 外部命令🌐 網路存取📁 檔案系統存取🔑 環境變數

從任何圖片打造自訂 Codex 寵物

也可從以下取得: agentspace-so

從單一參考圖片建立自訂動畫 Codex 寵物精靈圖表。此技能使用 RunComfy GPT Image 2 API 和 ImageMagick 生成像素風格的夥伴,具備 9 種動畫狀態。將結果放入 Codex 寵物資料夾,即可擁有個人化的桌面夥伴。

支援: Claude Codex Code(CC)
⚠️ 64
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「codex-pet」。 Create a codex pet from https://example.com/photo.jpg

預期結果:

Generated pet 'my-pet' installed at ~/.codex/pets/my-pet/ with spritesheet.webp (1536x1872, 9 animation rows) and pet.json manifest. Restart Codex to see the new pet in your selection.

正在使用「codex-pet」。 Make a codex pet named ninja-cat from https://example.com/cat.png with description 'A stealthy feline companion'

預期結果:

Codex Pet 'ninja-cat' created and installed. Spritesheet includes idle, running-right, running-left, waving, jumping, failed, waiting, running, and review animation states. All cells follow required frame counts per Codex specification.

正在使用「codex-pet」。 Adjust my-pet animation to have bigger idle movement

預期結果:

Idle row modified: shift changed from shift:0:-1 to shift:0:-2 for stronger breathing effect. Updated spritesheet.webp written to ~/.codex/pets/my-pet/. Reload Codex to preview changes.

安全審計

中風險
v1 • 5/28/2026

This is a legitimate Codex Pet generator that uses RunComfy CLI and ImageMagick to create animated pet spritesheets. The static analysis flagged many patterns (97 command usages, filesystem access) but these are all legitimate tool invocations. The external commands (`runcomfy run`, `magick`) use hardcoded arguments derived from skill logic, not user-controlled shell input. Network calls go only to runcomfy.net endpoints. Path traversal in PET_NAME is a low concern as writes are scoped to the ~/.codex/pets sandbox. Environment variable access is explicit and documented (RUNCOMFY_TOKEN). No credential exfiltration, no data theft patterns, no command injection vectors confirmed. Skill performs exactly what it claims: generates pet spritesheets via API + ImageMagick transforms.

1
已掃描檔案
348
分析行數
7
發現項
1
審計總數
中風險問題 (1)
Path Injection via PET_NAME in mkdir/cp Commands
PET_NAME user input is interpolated into mkdir and cp paths without sanitization. A malicious PET_NAME like '../../etc' could escape the intended ~/.codex/pets/ directory. This is a LOW-to-MEDIUM risk because: (1) writes are scoped to local filesystem only, (2) no privilege escalation apparent, (3) Codex pet directories are user-controlled workspace. However, the shell commands at lines 242-245 concatenate PET_NAME directly into mkdir/cp with no validation.
低風險問題 (2)
Hidden File in Home Directory Access
Skill accesses ~/.config/runcomfy/token.json to store API credentials. This is standard configuration file access for authenticated CLI tools, documented openly in the Security & Privacy section. Not a security vulnerability but worth noting for transparency.
External URL fetch in Image Processing Pipeline
The skill accepts a SOURCE_URL parameter and fetches external images. This is standard for image generation workflows but introduces a data boundary concern: external images are processed by RunComfy's servers. Documented as a known risk.
審計者: claude

品質評分

38
架構
100
可維護性
87
內容
42
社群
56
安全
83
規範符合性

你能建構什麼

打造個人 Codex 夥伴

拿一張自己、寵物或角色的照片,將它變成 Codex 桌面夥伴。此技能會將您的圖片轉換為漂浮在程式碼編輯器上的 Q 版像素風格。

批次生成寵物精靈圖表

處理多個來源圖片,為團隊建立多個 Codex 寵物。每個寵物都會與 Codex 內建寵物並排安裝,讓團隊任何人都能選擇最愛。

原型設計新寵物動畫

快速生成並測試寵物列的自訂動畫時序。調整 ImageMagick 微轉換數值來改變動畫風格,無需重新生成整個精靈圖表。

試試這些提示

基本寵物生成
Create a codex pet from this image: [SOURCE_IMAGE_URL]
命名寵物並附描述
Make me a codex pet named [PET_NAME] based on [IMAGE_URL]. Description: [PET_DESCRIPTION]
自訂動畫調整
Adjust [PET_NAME] animation: change idle bob to shift:0:-2, make running cycle faster with shift:3:0
偵錯失敗的生成
Retry generating [PET_NAME] with tighter identity preservation: emphasize [SPECIFIC_FEATURES] from original image

最佳實務

  • 使用正方形或接近正方形的來源圖片,以獲得 192x208 像素儲存格的最佳效果
  • 選擇輪廓清晰、色彩簡單的圖片,以便進行乾淨的色鍵處理
  • 當身份保留很重要時,在提示詞改進中描述特定特徵

避免

  • 不要使用帶有洋紅色背景的來源圖片(會與色鍵預留位置衝突)
  • 避免將複雜的多角色場景作為單一來源圖片餵入
  • 透過 skills CLI 安裝時不要跳過反引號程式碼區塊

常見問題

這與 OpenAI 的 hatch-pet 技能有何不同?
此技能使用 Google 的 RunComfy CLI,而非 Codex Pro 的 $imagegen 系統。它只需要 RUNCOMFY_TOKEN,不需要 Codex Pro 存取權。輸出格式相同,因此 Codex 會同等對待兩者。
為什麼動畫使用 ImageMagick 轉換而非生成不同的畫格?
Codex 的內建寵物使用相同方法。動畫是刻意設計成細微的。一個標準姿勢加上 1-2 像素的轉換能產生相同效果,無需生成 72 張個別圖片。
如果我的來源圖片有接近洋紅色的色彩會怎樣?
將色鍵從 #FF00FF 切換為青色 (#00FFFF) 或綠色 (#00FF00)。同時更新提示詞和後處理模糊閾值。
我可以不使用 RunComfy 帳戶嗎?
不行,需要具備 API 權杖的 RunComfy 帳戶。此技能會呼叫 RunComfy GPT Image 2 編輯端點作為其圖片生成後端。
寵物會安裝在哪裡?
檔案會寫入 ${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/。重新啟動 Codex 或重新載入寵物清單以查看新的自訂寵物。
為什麼技能說它使用弱密碼學演算法?
這指的是刻意簡單的 ImageMagick 轉換(位移、旋轉)用於動畫。它們不是密碼學演算法。ImageMagick 是一個影像處理工具,不是密碼學程式庫。

開發者詳情

檔案結構

📄 SKILL.md