Communitygithub.com

PrunaAI/pruna-skills

在有人明確要求最快、最便宜的圖片生成時使用——情緒板、批量面板或快速迭代——不需要受控的照片級真實感或圖中文字時。

pruna-skills 是什麼?

此技能專門優化簡單、快速的圖片生成,適用於情緒板、批量面板或快速迭代等場景。它使用`p-image`工具,通過短提示直接生成圖片,不支援提示放大或高級控制。其核心在於「動態且忠實的提示設計」:每個提示必須新鮮且具體,嚴守用戶請求的主體、產品或場景,同時通過隨機種子儀式引入至少兩個自由軸(如相機角度、光線、材質)來增加多樣性。技能支援 Pruna API 的非同步和同步 HTTP 調用,需要設置 `PRUNA_API_KEY`。當用戶需要更多控制(如圖中文字、照片級真實感)或進行圖片編輯、影片生成時,應改用 `p-image-ideogram`、`p-image-edit` 或 `p-video-2` 等相關技能。它整合了 `generation-diversity`、`image-prompting` 和 `pruna-api` 三個輔助技能,以確保提示品質和 API 調用的安全性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/PrunaAI/pruna-skills/tree/HEAD/skills/image/p-image

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

先決條件

在生成前,請先安裝並載入以下技能(如果已透過 @pruna 在上下文中,則可跳過):

技能描述安裝指令
generation-diversity在撰寫任何生成提示時使用——種子儀式、明確結構、場景軸線以及在付費 API 調用前的品質把關。npx skills add PrunaAI/pruna-skills@generation-diversity -y
image-prompting在為任何生成模型設計靜態圖像提示時使用——構圖、角色設定、編輯、試穿以及照片級真實感的人物。npx skills add PrunaAI/pruna-skills@image-prompting -y
pruna-api在進行任何 Pruna 或 Replicate HTTP 調用前使用——憑證管理、上傳/輪詢/下載、批量處理以及代理安全性。npx skills add PrunaAI/pruna-skills@pruna-api -y

或者一次性安裝完整套件:npx skills add PrunaAI/pruna-skills@pruna -y

請遵循每個技能的生成前 / 設計章節——不要在此處重複指南內容。

代理習慣

路由: 對於簡單、快速的圖片生成,使用 `p-image` 並配合簡短提示。當圖片生成需要更多控制(圖片中的文字、包含十六進位顏色和邊界框的結構化 JSON、高細節照片級真實感)時,請使用 `p-image-ideogram`(預設**thinking: high、prompt_upsampling: true**;若要對同一模型進行更快的處理,可使用 low + prompt_upsampling: false + 明確提示)。對於編輯或影片,請使用 `p-image-edit` 或 `p-video-2`——不要重新執行圖片生成。

在第一個回覆中,用反引號標示 `p-image`,確認 PRUNA_API_KEY 已設定(若未設定,則停止並提供來自 pruna-api 的註冊連結),然後詢問提示 / 寬高比(開放式輸入 → generation-diversity 的釐清輸入)。在撰寫提示時,請遵循提示設計(動態且忠實)——不要貼上技能範例。

提示設計(動態且忠實)

每個 input.prompt 必須新鮮且具體,且必須保留用戶的要求。多樣性絕不能覆蓋簡報。

要做的事不要做的事
執行 generation-diversity 的隨機種子儀式;在提示中說明;輪換至少 2 個自由軸(相機、光線、設定紋理、渲染類別)複製此技能中的 curl 範例(otter DJ、corgi cowboy 等)或重複使用先前會話的提示
先鎖定用戶要求的事實(主體、產品、品牌提示、必須保留的道具、如被請求則需可讀文字)將主體替換成忽略請求的「更酷」場景
使用具體名詞、凍結的動作、材質、位置進行擴展(image-prompting 黃金規則)僅使用模糊的情緒字串(cool product vibe, neon)
在用戶尚未鎖定措辭時,在 POST 前顯示草擬的提示 + aspect_ratio在未經批准的情況下,使用不同的主體進行無聲重新生成

忠實度檢查(付費前): 如果您從提示中移除了用戶指定的主體/產品/場景,那就是錯誤的——請重寫。自由軸僅用來填補簡報中未指定的部分。

在顯示草擬的提示時,仍要標示 `p-image`(指南有助於設計;此工具負責調用)。

Pruna 注意: p-image 沒有提示放大功能——具體語言是整個設計的關鍵。除非用戶明確要求在表面上有文字,否則避免使用密集的可讀字體。

何時不使用

請改用其他技能:

技能描述安裝指令
p-image-ideogram當圖片生成需要更多控制時使用——照片級真實感結果、圖片中的文字,或包含十六進位顏色和邊界框的結構化 JSON。更簡單的圖片生成、編輯和影片則使用套件中的其他技能。npx skills add PrunaAI/pruna-skills@p-image-ideogram -y
p-image-edit當有人想要編輯現有照片時使用——更換服裝或背景、從參考圖像合成,或套用提示驅動的編輯。npx skills add PrunaAI/pruna-skills@p-image-edit -y
p-image-try-on當有人想要虛擬試穿時使用——以參考照片中的衣物為人物穿衣,適用於時尚或電子商務。npx skills add PrunaAI/pruna-skills@p-image-try-on -y

HTTP(curl)

創建(非同步——建議使用)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image' \
  -d '{
    "input": {
      "prompt": "Disco ball reflections on an otter DJ scratching vinyl at a packed 1970s roller rink, fish-eye lens, glitter confetti mid-air, funky energy",
      "aspect_ratio": "9:16"
    }
  }'

輪詢和下載:請遵循 pruna-api。

在撰寫提示前,先完成 generation-diversity 的隨機種子儀式——不要將儀式字串作為 API seed 傳遞。可選的 api_seed 僅在用戶要求可重複性時使用。

創建(同步——僅快速測試)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image' \
  -H 'Try-Sync: true' \
  -d '{"input":{"prompt":"Corgi cowboy lassoing a runaway taco truck through Monument Valley dust storm, pulp western poster energy, dynamic diagonal composition","aspect_ratio":"16:9"}}'

生成流程

每次都要遵循 generation-diversity 的靜態圖像提示流程:

  1. 鎖定簡報——用戶主體、產品、格式、任何表面上的文字。
  2. 種子儀式——新鮮字串;衍生自由軸(相機、光線、render_category_tag、未設定時的 aspect_ratio)。
  3. 草擬明確提示——提示設計(動態且忠實) + image-prompting 黃金規則;付費前進行忠實度檢查。
  4. 確認——除非措辭已鎖定,否則顯示 prompt + aspect_ratio。
  5. POST——使用下方的非同步 curl;透過 pruna-api 輪詢;在超解析度/影片處理前執行 p-image 品質檢查清單。

寬高比: 在 input 中傳遞 aspect_ratio;如果輸出尺寸不符(例如要求 16:9,結果是直立),使用提示中的明確措辭(如 horizontal wide / vertical)重試一次。

情緒板 / 批次: 每個獨立靜態圖像執行新的種子儀式;當格式未鎖定時,不同面板使用不同的 aspect_ratio。

圖片批准後 → 編輯: 將輸出 URL 交給 p-image-edit 處理——不要為同一主體再次執行圖片生成。

必要輸入

  • prompt(字串)

常見可選欄位

  • aspect_ratio:1:1、16:9、9:16、4:3、3:4、3:2、2:3、custom(需搭配 width / height,且為 16 的倍數,範圍 256–1440)
  • seed、lora_weights、lora_scale、hf_api_token、disable_safety_checker

典型的後續步驟

此技能後常見的後續操作:

技能描述安裝指令
p-image-edit當有人想要編輯現有照片時使用——更換服裝或背景、從參考圖像合成,或套用提示驅動的編輯。npx skills add PrunaAI/pruna-skills@p-image-edit -y
p-image-try-on當有人想要虛擬試穿時使用——以參考照片中的衣物為人物穿衣,適用於時尚或電子商務。npx skills add PrunaAI/pruna-skills@p-image-try-on -y
p-image-upscale當有人想要對現有圖像進行超解析度或銳利化,以用於印刷、大範圍裁切或更高品質的交付時使用。npx skills add PrunaAI/pruna-skills@p-image-upscale -y
p-video-2-pro當有人想要從文字或開始/結束影格生成電影級短片時使用——產品廣告、紀錄片鏡頭或搭配生成音訊的對話。不適用於 1080p、匯入的音軌或僅有說話者的主持人。npx skills add PrunaAI/pruna-skills@p-video-2-pro -y
p-video-2當有人想要從文字、圖像或匯入的音訊生成精緻的短片時使用——1080p B-roll、開始/結束影格動畫,或搭配混合音軌的運動鏡頭。不適用於電影級生成音訊剪輯或僅有說話者的主持人。npx skills add PrunaAI/pruna-skills@p-video-2 -y
p-video當有人想要從文字或圖像生成簡單的短片時使用——快速 B-roll、草稿或開始/結束影格動畫。不適用於需要電影級生成、最高品質、緊湊唇形同步或 1080p 匯入音訊的簡報。npx skills add PrunaAI/pruna-skills@p-video -y
avatar-single-scene當有人想要一個精緻的主持人單鏡頭場景時使用——一個說話的人物,帶有輸入和批准把關。npx skills add PrunaAI/pruna-skills@avatar-single-scene -y
avatar-multi-scene當有人想要同一個人物主持多個剪輯時使用——多段式 UGC、對比影片,或混合說話和動畫場景以保持連續性。npx skills add PrunaAI/pruna-skills@avatar-multi-scene -y

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

PrunaAI/pruna-skills

Use when someone needs spoken narration or voiceover — explainer tracks, documentary lines, or voice to pair with generated video.

PrunaAI/pruna-skills

Use when someone wants an original AI song with vocals — sung lyrics, a style prompt track, or source audio for a music video.

PrunaAI/pruna-skills

Use when someone needs word-level timestamps from audio — lyric alignment, cut-safe line boundaries, or caption source timing before burn-in with video-editing.

PrunaAI/pruna-skills

Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.

PrunaAI/pruna-skills

Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits.

PrunaAI/pruna-skills

Use when crafting video or motion prompts for any generative model — dramaturgy, camera, physics-safe motion, frame anchors, and clip chaining.

PrunaAI/pruna-skills

Use when someone wants to edit an existing photo — change outfits or backgrounds, compose from reference images, or apply prompt-driven edits.

PrunaAI/pruna-skills

Use when someone wants virtual try-on — dress a person in clothes from reference photos for fashion or ecommerce.

PrunaAI/pruna-skills

Use when installing the full Pruna generative media suite — all guides, tools, and workflows in one package.

PrunaAI/pruna-skills

Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants to edit an existing video with a text instruction — recolor, restyle, remove or add objects, change environment or lighting, update on-screen text, or apply optional reference-guided product and accessory edits. Not for a new clip from scratch or ffmpeg assembly.

PrunaAI/pruna-skills

Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p.

相關技能