简介
Stella Selfie
原始描述
Generate persona-consistent selfie images and send to any OpenClaw channel. Supports Gemini, fal, and laozhang.ai providers, multi-reference avatar blending.
通过你的 Agent 添加
安装目录:stella-selfie/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: stella-selfie
description: Generate persona-consistent selfie images and send to any OpenClaw channel. Supports Gemini, fal, and laozhang.ai providers, multi-reference avatar blending.
allowed-tools: Bash(npm:) Bash(node:) Bash(openclaw:*) Read Write
metadata:
openclaw:
always: true
requires:
env:
- GEMINI_API_KEY
- FAL_KEY
- LAOZHANG_API_KEY
bins:
- node
install:
- kind: node
package: "@google/genai"
- kind: node
package: "@fal-ai/client"
primaryEnv: GEMINI_API_KEY
emoji: "📸"
homepage: https://github.com/tower1229/Stella
Stella Selfie
Generate persona-consistent selfie images using Google Gemini or fal (xAI Grok Imagine) and send them to messaging channels via OpenClaw. Supports multi-reference avatar blending for strong character consistency.
When to Use
- User says "send a pic", "send me a photo", "send a selfie", "发张照片", "发自拍"
- User says "show me what you look like...", "send a pic of you...", "展示你在..."
- User describes a scene: "send a pic wearing...", "send a pic at...", "穿着...发张图"
- User wants the agent to appear in a specific outfit, location, or situation
Prompt Modes
Mode 1: Mirror Selfie (default)
Mode 1: Mirror Selfie (default)
Best for: outfit showcases, full-body shots, fashion content
A mirror selfie of this person, [user's context], showing full body reflection.
Mode 2: Direct Selfie
Best for: close-up portraits, location shots, emotional expressions
A selfie of this person, [user's context], looking into the lens.
Mode 3: Tourist Photo
Best for: outdoor travel scenes where handheld selfie is inconvenient, or explicit travel-photo requests
A travel photo of this person, [user's context], full-body composition, natural candid framing, not a handheld selfie.
Mode Selection Logic
Signal
Auto-Select Mode
Keywords: outfit, wearing, clothes, dress, suit, fashion
mirror
Keywords: cafe, restaurant, beach, park, city, location
direct
Keywords: close-up, portrait, face, eyes, smile
direct
Keywords: full-body, mirror, reflection
mirror
Keywords: travel photo, tourist photo, 旅拍, 打卡照, 风景合影, 他拍
tourist
Outdoor + full-body + no-selfie signal (e.g. "不方便手持/没法自拍")
tourist
Timeline continuity.is_continuing: true (same activity)
direct
Timeline continuity.is_continuing: false (state just changed)
mirror
| Signal | Auto-Select Mode |
|---|---|
| Keywords: outfit, wearing, clothes, dress, suit, fashion | mirror |
| Keywords: cafe, restaurant, beach, park, city, location | direct |
| Keywords: close-up, portrait, face, eyes, smile | direct |
| Keywords: full-body, mirror, reflection | mirror |
| Keywords: travel photo, tourist photo, 旅拍, 打卡照, 风景合影, 他拍 | tourist |
| Outdoor + full-body + no-selfie signal (e.g. "不方便手持/没法自拍") | tourist |
Timeline continuity.is_continuing: true (same activity) |
direct |
Timeline continuity.is_continuing: false (state just changed) |
mirror |
Priority guardrail for tourist: only trigger when explicit travel-photo keywords exist, or when outdoor/travel context clearly includes a no-handheld-selfie signal.
Default mode when no keywords match and timeline is unavailable: mirror
Resolution Keywords
User says
Resolution
(default)
1K
2k, 2048, medium res, 中等分辨率
2K
4k, high res, ultra, 超清, 高分辨率
4K
Step-by-Step Instructions
Step 1: Collect User Input
| User says | Resolution |
|---|---|
| (default) | 1K |
| 2k, 2048, medium res, 中等分辨率 | 2K |
| 4k, high res, ultra, 超清, 高分辨率 | 4K |
Step 1: Collect User Input
Determine from the user's message:
- Explicit context (optional): scene, outfit, location, activity — detect from keywords
- Mode (optional):
mirror,direct, ortourist— auto-detect from keywords if not specified - Target channel: Where to send (e.g.,
#general,@username, channel ID) - Channel provider (optional): Which platform (discord, telegram, whatsapp, slack)
- Resolution (optional): 1K / 2K / 4K — default 1K
- Count (optional): How many images — default 1, only increase if explicitly requested
- Has explicit scene?: Does the request contain any specific scene/outfit/location/activity keywords?
Step 2: Enrich with Timeline Context (Optional)
timeline_resolve is an optional enhancement, not a prerequisite.
- If
timeline_resolveis unavailable in the current environment, skip this step and proceed with Stella's original behavior. - If
timeline_resolveis available, you may use it when the request has no explicit scene keywords, or when the user provided only partial scene details and timeline can safely fill missing reality anchors. - If timeline enrichment is needed, load and follow
references/timeline-integration.md. - Only enable Nano Banana real-world grounding when the prompt can explicitly include a concrete
cityplus an exact local date/time anchor from timeline data. If those anchors are missing, do not claim real-world synchronization. - If timeline returns
fact.status === "empty", is missingresult.consumption, or any error occurs, immediately fall back to Step 3 without mentioning timeline failure to the user.
Never block image generation on timeline availability. Timeline enrichment is always best-effort and must not degrade Stella's original functionality.
Step 3: Assemble Prompt
Select mode from keyword rules first, then assemble the prompt.
If you loaded references/timeline-integration.md and obtained usable timeline context, apply its merge and prompt rules.
Otherwise, use the user's explicit context directly and keep Stella's original fallback behavior:
[mirror] A mirror selfie of this person, [user's explicit context if any], showing full body reflection.
[direct] A selfie of this person, [user's explicit context if any], looking into the lens.
[tourist] A travel photo of this person, [user's explicit context if any], full-body composition, natural candid framing, not a handheld selfie.
Step 4: Generate Image
Run the Stella script:
node {baseDir}/dist/scripts/skill.js \
--prompt "<ASSEMBLED_PROMPT>" \
--target "<TARGET_CHANNEL>" \
--channel "<CHANNEL_PROVIDER>" \
--caption "<CAPTION_TEXT>" \
--resolution "<1K|2K|4K>" \
--count <NUMBER>
Step 5: Confirm Result
After the script completes, confirm to the user:
- Image was generated successfully
- Image was sent to the target channel
- If any error occurred, send a concise actionable failure message
Environment Variables
Stella supports multiple providers and a gateway-backed send path, so its sensitive runtime environment variables
are explicitly declared in metadata.openclaw.requires.env for OpenClaw's env-injection allowlist.
The skill also sets metadata.openclaw.always: true, so these declarations do not become hard load-time gates.
Actual credential validation remains runtime-driven inside skill.js, based on the selected provider.
| Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY |
Required (if Provider=gemini) | Google Gemini API key |
FAL_KEY |
Required (if Provider=fal) | fal.ai API key |
LAOZHANG_API_KEY |
Required (if Provider=laozhang) | laozhang.ai API key (sk-xxx); get it at api.laozhang.ai |
Provider |
Optional | Image provider: gemini, fal, or laozhang |
AvatarBlendEnabled |
Optional | Enable or disable multi-reference avatar blending |
AvatarMaxRefs |
Optional | Maximum number of reference images to blend |
Credential requirements are provider-specific:
- Default
Provider=gemini: requiresGEMINI_API_KEY Provider=fal: requiresFAL_KEYProvider=laozhang: requiresLAOZHANG_API_KEY
Media File Handling (Gemini)
When Provider=gemini, Stella writes generated files to:
~/.openclaw/workspace/stella-selfie/
After successful send, Stella deletes the local file immediately. If send fails, the file is kept for debugging.
Skill Environment Options
Configure in your OpenClaw openclaw.json under skills.entries.stella-selfie.env:
| Option | Default | Description |
|---|---|---|
Provider |
gemini |
Image provider: gemini, fal, or laozhang |
AvatarBlendEnabled |
true |
Enable multi-reference avatar blending |
AvatarMaxRefs |
3 |
Maximum number of reference images to blend |
Note for
Provider=falusers: fal's image editing API only accepts HTTP/HTTPS image URLs. Local file paths (fromAvatar/AvatarsDir) are not supported. ConfigureAvatarsURLsinIDENTITY.mdwith public URLs of your reference images to enable image editing with fal.
Note for
Provider=laozhangusers: laozhang.ai uses the Google-native Gemini API format (gemini-3-pro-image-preview). It requires local reference images fromAvatar/AvatarsDirand does not useAvatarsURLs. Supports 1K/2K/4K resolution and 10 aspect ratios. Get your API key at api.laozhang.ai — remember to configure a billing mode in the token settings before use.
Delivery Path
- Stella sends via
openclaw message send.
- Delivery auth and routing are handled by the local OpenClaw installation, not by skill-level gateway tokens.
External Endpoints And Data Flow
Endpoint / path
When used
Data sent
Google Gemini API
Provider=gemini
Prompt text and selected local reference images from Avatar / AvatarsDir
fal API
Provider=fal
Prompt text and public reference image URLs from AvatarsURLs
laozhang.ai API (api.laozhang.ai)
Provider=laozhang
Prompt text and local reference images (Avatar / AvatarsDir, uploaded as base64)
Local OpenClaw CLI
Always for delivery
Target channel, target id, caption text, and generated media path/URL
Security And Privacy
- Stella reads
~/.openclaw/workspace/IDENTITY.md and local avatar files to build reference context.
- Under
Provider=gemini, selected local avatar images are uploaded to Gemini as part of normal image generation.
- Under
Provider=fal, only public http/https avatar URLs are sent; local avatar files are not uploaded to fal directly.
- Under
Provider=laozhang, local avatar files from Avatar / AvatarsDir are base64-encoded and uploaded to laozhang.ai.
- Generated files (Gemini and laozhang) are written to
~/.openclaw/workspace/stella-selfie/ and deleted after successful send.
User Configuration
openclaw message send.| Endpoint / path | When used | Data sent |
|---|---|---|
| Google Gemini API | Provider=gemini |
Prompt text and selected local reference images from Avatar / AvatarsDir |
| fal API | Provider=fal |
Prompt text and public reference image URLs from AvatarsURLs |
laozhang.ai API (api.laozhang.ai) |
Provider=laozhang |
Prompt text and local reference images (Avatar / AvatarsDir, uploaded as base64) |
| Local OpenClaw CLI | Always for delivery | Target channel, target id, caption text, and generated media path/URL |
Security And Privacy
- Stella reads
~/.openclaw/workspace/IDENTITY.md and local avatar files to build reference context.
- Under
Provider=gemini, selected local avatar images are uploaded to Gemini as part of normal image generation.
- Under
Provider=fal, only public http/https avatar URLs are sent; local avatar files are not uploaded to fal directly.
- Under
Provider=laozhang, local avatar files from Avatar / AvatarsDir are base64-encoded and uploaded to laozhang.ai.
- Generated files (Gemini and laozhang) are written to
~/.openclaw/workspace/stella-selfie/ and deleted after successful send.
User Configuration
~/.openclaw/workspace/IDENTITY.md and local avatar files to build reference context.Provider=gemini, selected local avatar images are uploaded to Gemini as part of normal image generation.Provider=fal, only public http/https avatar URLs are sent; local avatar files are not uploaded to fal directly.Provider=laozhang, local avatar files from Avatar / AvatarsDir are base64-encoded and uploaded to laozhang.ai.~/.openclaw/workspace/stella-selfie/ and deleted after successful send.Before using this skill, you must configure your OpenClaw workspace. See templates/SOUL.fragment.md for the recommended capability snippet to add to your SOUL.md.
Required: IDENTITY.md
Add the following fields to ~/.openclaw/workspace/IDENTITY.md:
Avatar: ./assets/avatar-main.png
AvatarsDir: ./avatars
AvatarsURLs: https://cdn.example.com/ref1.jpg, https://cdn.example.com/ref2.jpg
Avatar: Path to your primary reference image (relative to workspace root)AvatarsDir: Directory containing multiple reference photos of the same character (different styles, scenes, outfits)AvatarsURLs: Comma-separated public URLs of reference images — required forProvider=fal(local files are not supported by fal's API)
Required: avatars/ Directory
Place your reference photos in ~/.openclaw/workspace/avatars/:
- Use
jpg,jpeg,png, orwebpformat - All photos should be of the same character
- Different styles, scenes, outfits, and expressions work best
- Images are selected by creation time (newest first)
Required: SOUL.md
Add the Stella capability block to ~/.openclaw/workspace/SOUL.md. See README.md ("4. SOUL.md") for the copy/paste snippet.
Installation
clawhub install stella-selfie
clawhub install stella-selfie
After installation, complete the configuration steps above before using the skill.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。