[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-letta-visual-identity":3,"mdc--lgppo2-key":34,"related-org-letta-visual-identity":2245,"related-repo-letta-visual-identity":2404},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"visual-identity","generate persistent agent visual identity","Build and maintain a persistent visual identity for your agent using Flux Kontext Pro. Use when the user asks the agent to generate selfies, avatars, character art, or any image that should look like the same person across generations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"letta","Letta","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fletta.png","letta-ai",[13,17,20],{"name":14,"slug":15,"type":16},"Creative","creative","tag",{"name":18,"slug":19,"type":16},"Branding","branding",{"name":21,"slug":22,"type":16},"Image Generation","image-generation",127,"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fskills","2026-07-13T06:25:11.012502",null,20,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"A shared repository for skills. Intended to be used with Letta Code, Claude Code, Codex CLI, and other agents that support skills.","https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fskills\u002Ftree\u002FHEAD\u002Ftools\u002Fvisual-identity","---\nname: \"visual-identity\"\ndescription: \"Build and maintain a persistent visual identity for your agent using Flux Kontext Pro. Use when the user asks the agent to generate selfies, avatars, character art, or any image that should look like the same person across generations.\"\n---\n\n# Visual Identity\n\nBuild a persistent visual identity that stays consistent across sessions. Supports OpenAI (gpt-image-1) and Flux Kontext Pro.\n\nTwo workflows:\n\n1. **Visual identity** (primary): Establish a reference appearance, then generate new scenes that preserve the same face and features. Identity persists in the agent's memory across sessions.\n2. **Text-to-image** (secondary): One-off image generation from a text prompt, no identity persistence.\n\n## When to use\n\n- The user asks \"show me what you look like\" or wants agent selfies\n- The user wants an avatar, profile picture, or character art\n- The user wants to create a visual identity (a consistent character across scenes)\n- The user provides a reference photo and wants variations or new scenes\n- The user asks you to generate or create any image\n\n## Environment\n\nThe script auto-detects which provider to use based on environment variables:\n\n| Priority | Env var | Provider | Notes |\n|----------|---------|----------|-------|\n| 1st | `OPENAI_API_KEY` | OpenAI gpt-image-1 | Recommended. Most users already have this. |\n| 2nd | `BFL_API_KEY` | Flux Kontext Pro | Better face consistency. Requires BFL account. |\n\nYou can override with `--provider openai` or `--provider flux`.\n\nIf neither key is set, guide the user:\n- **OpenAI** (recommended): They likely already have an `OPENAI_API_KEY` set. If not, https:\u002F\u002Fplatform.openai.com\u002Fapi-keys\n- **Flux**: https:\u002F\u002Fapi.bfl.ai to create an account, keys at https:\u002F\u002Fapi.bfl.ai\u002Fauth\u002Flogin, credits at https:\u002F\u002Fapi.bfl.ai\u002Fcredits\n\nNever ask the user to paste the full key in chat.\n\n## Dependencies\n\nInstall if missing (prefer `uv`):\n\n```bash\nuv pip install requests Pillow\n```\n\nIf `uv` is unavailable:\n\n```bash\npip3 install requests Pillow\n```\n\n## Workflow 1: Visual Identity (Character Consistency)\n\nThis is the primary workflow. The goal is to establish a reference appearance and then generate new scenes that preserve the same face, bone structure, and features.\n\n### Step 1: Establish the reference\n\nEither the user provides a photo, or you generate a base character:\n\n**Option A -- User provides a reference photo:**\nThe user pastes or specifies an image file. Save it to the persistent identity directory (see \"Persisting Visual Identity\" below).\n\n**Option B -- Generate a base character from text:**\nUse text-to-image to create the initial character. Be very specific about physical features. Example prompt:\n\n> A portrait of a young woman with shoulder-length auburn hair, green eyes, light freckles, wearing a black leather jacket. Clean background, studio lighting, 3:4 portrait.\n\nSave the result as the reference image.\n\n### Step 2: Generate scenes with the reference\n\nPass the reference image as base64-encoded `input_image`:\n\n```bash\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py edit \\\n  --reference \u002Fpath\u002Fto\u002Fcanonical.jpg \\\n  --prompt \"The same person is sitting at a desk coding late at night, lit by monitor glow\" \\\n  --out \u002Ftmp\u002Fidentity_coding.jpg\n```\n\n### Step 3: Anchor the prompt\n\nAlways include an identity-anchoring phrase in every prompt that uses a reference. This tells the model to preserve facial features:\n\n> Keep his\u002Fher exact face, bone structure, eye color, and hair.\n\nOr more naturally woven into the prompt:\n\n> The same man is relaxing on a tropical beach at sunset, wearing a linen shirt. Golden hour lighting. Keep his exact face, bone structure, eye color, and hair.\n\n### Step 4: Iterate with the user\n\n- Show each result and ask for feedback\n- Adjust scene, clothing, lighting, or setting based on feedback\n- Always reuse the same reference image for consistency\n- If the user wants to change the base appearance, go back to Step 1\n\n### Example session flow\n\n1. User: \"Create a visual identity for me -- here's my photo\"\n2. Agent: Saves reference, generates 2-3 scenes (beach, office, hiking)\n3. User: \"I like the beach one but make me wearing a hat\"\n4. Agent: Regenerates beach scene with hat, same reference\n5. User: \"Now make one of me cooking\"\n6. Agent: New scene with same reference\n\n## Persisting Visual Identity\n\nTwo things persist across sessions: the reference image (binary) and the identity metadata (markdown). They live in different places.\n\n### Reference image: agent data directory\n\nSave the canonical reference image to `~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg`. This is outside memfs because binary images would bloat the git-backed memory repo. The `reference\u002F` directory persists across sessions.\n\n```bash\nmkdir -p ~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\ncp \u002Ftmp\u002Fgenerated_portrait.jpg ~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg\n```\n\n### Identity metadata: memfs\n\nAfter establishing a visual identity, create a memory file at `reference\u002Fvisual-identity.md` in the agent's memory filesystem. This syncs via git like all other memory files.\n\nUse the Memory tool to create it:\n\n```\nmemory(command=\"create\", reason=\"Store visual identity metadata\",\n  file_path=\"reference\u002Fvisual-identity.md\",\n  description=\"Agent's persistent visual identity -- reference image path and appearance description.\",\n  file_text=\"## Reference Image\\n~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg\\n\\n## Appearance\\n- Hair: shoulder-length auburn, slight wave\\n- Eyes: green\\n- Skin: light with freckles\\n- Build: athletic\\n- Distinguishing: small scar above left eyebrow\\n\\n## Anchoring Phrase\\nKeep the exact same face, bone structure, eye color, and hair from the reference image.\\n\\n## History\\n- Established: 2026-04-15\\n- User feedback: \\\"make the hair a bit darker\\\" -> regenerated, approved\")\n```\n\n### Auto-detect on load\n\nWhen this skill is loaded, check the agent's memory tree for `reference\u002Fvisual-identity.md`. If it exists:\n\n- The agent already has an established identity\n- Use the stored reference image path for all image generation requests\n- Prepend the stored anchoring phrase to every prompt\n- Do not ask the user to re-establish their identity\n\nIf it does not exist, the agent has no visual identity yet. Offer to create one if the user asks for images.\n\n### Updating the identity\n\nIf the user wants to change their visual identity:\n\n1. Generate or receive the new reference image\n2. Overwrite `canonical.jpg` in the reference directory\n3. Update the memory file with new appearance details\n4. Note the change in the History section\n\n## Workflow 2: Text-to-Image\n\nFor one-off image generation that does not need identity persistence.\n\n```bash\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"A corgi wearing a tiny space helmet on the moon\" \\\n  --out \u002Ftmp\u002Fcorgi_moon.jpg\n```\n\nOr inline with `requests` (OpenAI):\n\n```python\nimport requests, base64, os\n\nresp = requests.post(\n    \"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fimages\u002Fgenerations\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['OPENAI_API_KEY']}\",\n        \"Content-Type\": \"application\u002Fjson\",\n    },\n    json={\n        \"model\": \"gpt-image-1\",\n        \"prompt\": \"A corgi wearing a tiny space helmet on the moon\",\n        \"n\": 1,\n        \"size\": \"1024x1024\",\n        \"quality\": \"medium\",\n    },\n).json()\n\nimg = base64.b64decode(resp[\"data\"][0][\"b64_json\"])\nwith open(\"\u002Ftmp\u002Fcorgi_moon.png\", \"wb\") as f:\n    f.write(img)\n```\n\n## Parameters\n\n| Parameter | Values | Default | Provider | Notes |\n|-----------|--------|---------|----------|-------|\n| `--prompt` | string | required | Both | Scene description |\n| `--reference` | file path | none | Both | Reference photo for identity mode (edit only) |\n| `--provider` | `openai`, `flux` | auto | Both | Override provider auto-detection |\n| `--aspect-ratio` | `1:1`, `3:4`, `4:3`, `16:9`, `9:16` | `3:4` | Both | Use `3:4` for portraits |\n| `--output-format` | `png`, `jpeg`, `webp` | `png` | Both | |\n| `--quality` | `low`, `medium`, `high` | `medium` | OpenAI | Image quality |\n| `--seed` | integer | random | Flux | Fix for reproducible results |\n| `--safety-tolerance` | 0-6 | 2 | Flux | Higher = more permissive |\n| `--guidance` | 1.5-100 | varies | Flux | Prompt adherence strength |\n\n## Prompting best practices\n\n- Be specific about physical setting, lighting, clothing, and pose\n- For portraits, specify aspect ratio `3:4` or `4:3`\n- For landscapes\u002Fscenes, use `16:9`\n- Include lighting direction: \"golden hour\", \"studio lighting\", \"neon-lit\"\n- Describe clothing and accessories explicitly\n- For identity mode, always include the anchoring phrase about preserving facial features\n- Avoid contradicting the reference photo (e.g., don't say \"blonde hair\" if the reference has dark hair)\n\n## Rate limits and costs\n\n- Maximum 6 concurrent requests per API key\n- Queue times: typically 4-10 seconds, can spike to 2+ minutes under load\n- If a request stays in `Pending` for over 120 seconds, retry once\n- Polling interval: 2 seconds is sufficient\n- Download URLs in the `Ready` response are signed and expire; save images immediately\n\n## CLI reference\n\nFull CLI documentation: `references\u002Fapi.md`\n\nCommon commands:\n\n```bash\n# Text-to-image\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"...\" --out output.jpg\n\n# Reference-based editing (visual identity)\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py edit \\\n  --reference photo.jpg --prompt \"...\" --out output.jpg\n\n# Dry run (show request without sending)\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"...\" --dry-run\n\n# Custom aspect ratio and seed\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"...\" --aspect-ratio 16:9 --seed 42 --out wide.jpg\n```\n\n## Error handling\n\n**OpenAI:**\n- `HTTP 400\u002F422`: Usually a malformed request or content policy violation\n- `HTTP 429`: Rate limited -- wait and retry\n- Missing `OPENAI_API_KEY`: Guide the user to https:\u002F\u002Fplatform.openai.com\u002Fapi-keys\n\n**Flux:**\n- `Insufficient credits`: Direct user to https:\u002F\u002Fapi.bfl.ai\u002Fcredits\n- `HTTP 422`: Usually a malformed request -- check prompt and parameters\n- `Pending` timeout: Retry the request; the queue may be congested\n- Missing `BFL_API_KEY`: Guide the user to https:\u002F\u002Fapi.bfl.ai\n\n**Both:**\n- Image too large for base64: Resize to under 10MB before encoding\n- No API key found: See Environment section\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,53,58,84,91,120,126,131,224,245,250,310,315,321,334,377,389,416,422,427,434,439,449,459,468,473,479,492,604,610,615,623,628,636,642,665,671,704,710,715,721,742,803,809,822,827,837,843,855,878,883,889,894,925,931,936,1015,1028,1211,1217,1626,1632,1686,1692,1736,1742,1753,1758,2099,2105,2113,2155,2163,2218,2226,2239],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Visual Identity",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51],{"type":45,"value":52},"Build a persistent visual identity that stays consistent across sessions. Supports OpenAI (gpt-image-1) and Flux Kontext Pro.",{"type":40,"tag":48,"props":54,"children":55},{},[56],{"type":45,"value":57},"Two workflows:",{"type":40,"tag":59,"props":60,"children":61},"ol",{},[62,74],{"type":40,"tag":63,"props":64,"children":65},"li",{},[66,72],{"type":40,"tag":67,"props":68,"children":69},"strong",{},[70],{"type":45,"value":71},"Visual identity",{"type":45,"value":73}," (primary): Establish a reference appearance, then generate new scenes that preserve the same face and features. Identity persists in the agent's memory across sessions.",{"type":40,"tag":63,"props":75,"children":76},{},[77,82],{"type":40,"tag":67,"props":78,"children":79},{},[80],{"type":45,"value":81},"Text-to-image",{"type":45,"value":83}," (secondary): One-off image generation from a text prompt, no identity persistence.",{"type":40,"tag":85,"props":86,"children":88},"h2",{"id":87},"when-to-use",[89],{"type":45,"value":90},"When to use",{"type":40,"tag":92,"props":93,"children":94},"ul",{},[95,100,105,110,115],{"type":40,"tag":63,"props":96,"children":97},{},[98],{"type":45,"value":99},"The user asks \"show me what you look like\" or wants agent selfies",{"type":40,"tag":63,"props":101,"children":102},{},[103],{"type":45,"value":104},"The user wants an avatar, profile picture, or character art",{"type":40,"tag":63,"props":106,"children":107},{},[108],{"type":45,"value":109},"The user wants to create a visual identity (a consistent character across scenes)",{"type":40,"tag":63,"props":111,"children":112},{},[113],{"type":45,"value":114},"The user provides a reference photo and wants variations or new scenes",{"type":40,"tag":63,"props":116,"children":117},{},[118],{"type":45,"value":119},"The user asks you to generate or create any image",{"type":40,"tag":85,"props":121,"children":123},{"id":122},"environment",[124],{"type":45,"value":125},"Environment",{"type":40,"tag":48,"props":127,"children":128},{},[129],{"type":45,"value":130},"The script auto-detects which provider to use based on environment variables:",{"type":40,"tag":132,"props":133,"children":134},"table",{},[135,164],{"type":40,"tag":136,"props":137,"children":138},"thead",{},[139],{"type":40,"tag":140,"props":141,"children":142},"tr",{},[143,149,154,159],{"type":40,"tag":144,"props":145,"children":146},"th",{},[147],{"type":45,"value":148},"Priority",{"type":40,"tag":144,"props":150,"children":151},{},[152],{"type":45,"value":153},"Env var",{"type":40,"tag":144,"props":155,"children":156},{},[157],{"type":45,"value":158},"Provider",{"type":40,"tag":144,"props":160,"children":161},{},[162],{"type":45,"value":163},"Notes",{"type":40,"tag":165,"props":166,"children":167},"tbody",{},[168,197],{"type":40,"tag":140,"props":169,"children":170},{},[171,177,187,192],{"type":40,"tag":172,"props":173,"children":174},"td",{},[175],{"type":45,"value":176},"1st",{"type":40,"tag":172,"props":178,"children":179},{},[180],{"type":40,"tag":181,"props":182,"children":184},"code",{"className":183},[],[185],{"type":45,"value":186},"OPENAI_API_KEY",{"type":40,"tag":172,"props":188,"children":189},{},[190],{"type":45,"value":191},"OpenAI gpt-image-1",{"type":40,"tag":172,"props":193,"children":194},{},[195],{"type":45,"value":196},"Recommended. Most users already have this.",{"type":40,"tag":140,"props":198,"children":199},{},[200,205,214,219],{"type":40,"tag":172,"props":201,"children":202},{},[203],{"type":45,"value":204},"2nd",{"type":40,"tag":172,"props":206,"children":207},{},[208],{"type":40,"tag":181,"props":209,"children":211},{"className":210},[],[212],{"type":45,"value":213},"BFL_API_KEY",{"type":40,"tag":172,"props":215,"children":216},{},[217],{"type":45,"value":218},"Flux Kontext Pro",{"type":40,"tag":172,"props":220,"children":221},{},[222],{"type":45,"value":223},"Better face consistency. Requires BFL account.",{"type":40,"tag":48,"props":225,"children":226},{},[227,229,235,237,243],{"type":45,"value":228},"You can override with ",{"type":40,"tag":181,"props":230,"children":232},{"className":231},[],[233],{"type":45,"value":234},"--provider openai",{"type":45,"value":236}," or ",{"type":40,"tag":181,"props":238,"children":240},{"className":239},[],[241],{"type":45,"value":242},"--provider flux",{"type":45,"value":244},".",{"type":40,"tag":48,"props":246,"children":247},{},[248],{"type":45,"value":249},"If neither key is set, guide the user:",{"type":40,"tag":92,"props":251,"children":252},{},[253,278],{"type":40,"tag":63,"props":254,"children":255},{},[256,261,263,268,270],{"type":40,"tag":67,"props":257,"children":258},{},[259],{"type":45,"value":260},"OpenAI",{"type":45,"value":262}," (recommended): They likely already have an ",{"type":40,"tag":181,"props":264,"children":266},{"className":265},[],[267],{"type":45,"value":186},{"type":45,"value":269}," set. If not, ",{"type":40,"tag":271,"props":272,"children":276},"a",{"href":273,"rel":274},"https:\u002F\u002Fplatform.openai.com\u002Fapi-keys",[275],"nofollow",[277],{"type":45,"value":273},{"type":40,"tag":63,"props":279,"children":280},{},[281,286,288,294,296,302,304],{"type":40,"tag":67,"props":282,"children":283},{},[284],{"type":45,"value":285},"Flux",{"type":45,"value":287},": ",{"type":40,"tag":271,"props":289,"children":292},{"href":290,"rel":291},"https:\u002F\u002Fapi.bfl.ai",[275],[293],{"type":45,"value":290},{"type":45,"value":295}," to create an account, keys at ",{"type":40,"tag":271,"props":297,"children":300},{"href":298,"rel":299},"https:\u002F\u002Fapi.bfl.ai\u002Fauth\u002Flogin",[275],[301],{"type":45,"value":298},{"type":45,"value":303},", credits at ",{"type":40,"tag":271,"props":305,"children":308},{"href":306,"rel":307},"https:\u002F\u002Fapi.bfl.ai\u002Fcredits",[275],[309],{"type":45,"value":306},{"type":40,"tag":48,"props":311,"children":312},{},[313],{"type":45,"value":314},"Never ask the user to paste the full key in chat.",{"type":40,"tag":85,"props":316,"children":318},{"id":317},"dependencies",[319],{"type":45,"value":320},"Dependencies",{"type":40,"tag":48,"props":322,"children":323},{},[324,326,332],{"type":45,"value":325},"Install if missing (prefer ",{"type":40,"tag":181,"props":327,"children":329},{"className":328},[],[330],{"type":45,"value":331},"uv",{"type":45,"value":333},"):",{"type":40,"tag":335,"props":336,"children":341},"pre",{"className":337,"code":338,"language":339,"meta":340,"style":340},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","uv pip install requests Pillow\n","bash","",[342],{"type":40,"tag":181,"props":343,"children":344},{"__ignoreMap":340},[345],{"type":40,"tag":346,"props":347,"children":350},"span",{"class":348,"line":349},"line",1,[351,356,362,367,372],{"type":40,"tag":346,"props":352,"children":354},{"style":353},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[355],{"type":45,"value":331},{"type":40,"tag":346,"props":357,"children":359},{"style":358},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[360],{"type":45,"value":361}," pip",{"type":40,"tag":346,"props":363,"children":364},{"style":358},[365],{"type":45,"value":366}," install",{"type":40,"tag":346,"props":368,"children":369},{"style":358},[370],{"type":45,"value":371}," requests",{"type":40,"tag":346,"props":373,"children":374},{"style":358},[375],{"type":45,"value":376}," Pillow\n",{"type":40,"tag":48,"props":378,"children":379},{},[380,382,387],{"type":45,"value":381},"If ",{"type":40,"tag":181,"props":383,"children":385},{"className":384},[],[386],{"type":45,"value":331},{"type":45,"value":388}," is unavailable:",{"type":40,"tag":335,"props":390,"children":392},{"className":337,"code":391,"language":339,"meta":340,"style":340},"pip3 install requests Pillow\n",[393],{"type":40,"tag":181,"props":394,"children":395},{"__ignoreMap":340},[396],{"type":40,"tag":346,"props":397,"children":398},{"class":348,"line":349},[399,404,408,412],{"type":40,"tag":346,"props":400,"children":401},{"style":353},[402],{"type":45,"value":403},"pip3",{"type":40,"tag":346,"props":405,"children":406},{"style":358},[407],{"type":45,"value":366},{"type":40,"tag":346,"props":409,"children":410},{"style":358},[411],{"type":45,"value":371},{"type":40,"tag":346,"props":413,"children":414},{"style":358},[415],{"type":45,"value":376},{"type":40,"tag":85,"props":417,"children":419},{"id":418},"workflow-1-visual-identity-character-consistency",[420],{"type":45,"value":421},"Workflow 1: Visual Identity (Character Consistency)",{"type":40,"tag":48,"props":423,"children":424},{},[425],{"type":45,"value":426},"This is the primary workflow. The goal is to establish a reference appearance and then generate new scenes that preserve the same face, bone structure, and features.",{"type":40,"tag":428,"props":429,"children":431},"h3",{"id":430},"step-1-establish-the-reference",[432],{"type":45,"value":433},"Step 1: Establish the reference",{"type":40,"tag":48,"props":435,"children":436},{},[437],{"type":45,"value":438},"Either the user provides a photo, or you generate a base character:",{"type":40,"tag":48,"props":440,"children":441},{},[442,447],{"type":40,"tag":67,"props":443,"children":444},{},[445],{"type":45,"value":446},"Option A -- User provides a reference photo:",{"type":45,"value":448},"\nThe user pastes or specifies an image file. Save it to the persistent identity directory (see \"Persisting Visual Identity\" below).",{"type":40,"tag":48,"props":450,"children":451},{},[452,457],{"type":40,"tag":67,"props":453,"children":454},{},[455],{"type":45,"value":456},"Option B -- Generate a base character from text:",{"type":45,"value":458},"\nUse text-to-image to create the initial character. Be very specific about physical features. Example prompt:",{"type":40,"tag":460,"props":461,"children":462},"blockquote",{},[463],{"type":40,"tag":48,"props":464,"children":465},{},[466],{"type":45,"value":467},"A portrait of a young woman with shoulder-length auburn hair, green eyes, light freckles, wearing a black leather jacket. Clean background, studio lighting, 3:4 portrait.",{"type":40,"tag":48,"props":469,"children":470},{},[471],{"type":45,"value":472},"Save the result as the reference image.",{"type":40,"tag":428,"props":474,"children":476},{"id":475},"step-2-generate-scenes-with-the-reference",[477],{"type":45,"value":478},"Step 2: Generate scenes with the reference",{"type":40,"tag":48,"props":480,"children":481},{},[482,484,490],{"type":45,"value":483},"Pass the reference image as base64-encoded ",{"type":40,"tag":181,"props":485,"children":487},{"className":486},[],[488],{"type":45,"value":489},"input_image",{"type":45,"value":491},":",{"type":40,"tag":335,"props":493,"children":495},{"className":337,"code":494,"language":339,"meta":340,"style":340},"python3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py edit \\\n  --reference \u002Fpath\u002Fto\u002Fcanonical.jpg \\\n  --prompt \"The same person is sitting at a desk coding late at night, lit by monitor glow\" \\\n  --out \u002Ftmp\u002Fidentity_coding.jpg\n",[496],{"type":40,"tag":181,"props":497,"children":498},{"__ignoreMap":340},[499,544,562,590],{"type":40,"tag":346,"props":500,"children":501},{"class":348,"line":349},[502,507,513,518,524,529,534,539],{"type":40,"tag":346,"props":503,"children":504},{"style":353},[505],{"type":45,"value":506},"python3",{"type":40,"tag":346,"props":508,"children":510},{"style":509},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[511],{"type":45,"value":512}," \u003C",{"type":40,"tag":346,"props":514,"children":515},{"style":358},[516],{"type":45,"value":517},"path-to-skil",{"type":40,"tag":346,"props":519,"children":521},{"style":520},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[522],{"type":45,"value":523},"l",{"type":40,"tag":346,"props":525,"children":526},{"style":509},[527],{"type":45,"value":528},">",{"type":40,"tag":346,"props":530,"children":531},{"style":358},[532],{"type":45,"value":533},"\u002Fscripts\u002Fgenerate_image.py",{"type":40,"tag":346,"props":535,"children":536},{"style":358},[537],{"type":45,"value":538}," edit",{"type":40,"tag":346,"props":540,"children":541},{"style":520},[542],{"type":45,"value":543}," \\\n",{"type":40,"tag":346,"props":545,"children":547},{"class":348,"line":546},2,[548,553,558],{"type":40,"tag":346,"props":549,"children":550},{"style":358},[551],{"type":45,"value":552},"  --reference",{"type":40,"tag":346,"props":554,"children":555},{"style":358},[556],{"type":45,"value":557}," \u002Fpath\u002Fto\u002Fcanonical.jpg",{"type":40,"tag":346,"props":559,"children":560},{"style":520},[561],{"type":45,"value":543},{"type":40,"tag":346,"props":563,"children":565},{"class":348,"line":564},3,[566,571,576,581,586],{"type":40,"tag":346,"props":567,"children":568},{"style":358},[569],{"type":45,"value":570},"  --prompt",{"type":40,"tag":346,"props":572,"children":573},{"style":509},[574],{"type":45,"value":575}," \"",{"type":40,"tag":346,"props":577,"children":578},{"style":358},[579],{"type":45,"value":580},"The same person is sitting at a desk coding late at night, lit by monitor glow",{"type":40,"tag":346,"props":582,"children":583},{"style":509},[584],{"type":45,"value":585},"\"",{"type":40,"tag":346,"props":587,"children":588},{"style":520},[589],{"type":45,"value":543},{"type":40,"tag":346,"props":591,"children":593},{"class":348,"line":592},4,[594,599],{"type":40,"tag":346,"props":595,"children":596},{"style":358},[597],{"type":45,"value":598},"  --out",{"type":40,"tag":346,"props":600,"children":601},{"style":358},[602],{"type":45,"value":603}," \u002Ftmp\u002Fidentity_coding.jpg\n",{"type":40,"tag":428,"props":605,"children":607},{"id":606},"step-3-anchor-the-prompt",[608],{"type":45,"value":609},"Step 3: Anchor the prompt",{"type":40,"tag":48,"props":611,"children":612},{},[613],{"type":45,"value":614},"Always include an identity-anchoring phrase in every prompt that uses a reference. This tells the model to preserve facial features:",{"type":40,"tag":460,"props":616,"children":617},{},[618],{"type":40,"tag":48,"props":619,"children":620},{},[621],{"type":45,"value":622},"Keep his\u002Fher exact face, bone structure, eye color, and hair.",{"type":40,"tag":48,"props":624,"children":625},{},[626],{"type":45,"value":627},"Or more naturally woven into the prompt:",{"type":40,"tag":460,"props":629,"children":630},{},[631],{"type":40,"tag":48,"props":632,"children":633},{},[634],{"type":45,"value":635},"The same man is relaxing on a tropical beach at sunset, wearing a linen shirt. Golden hour lighting. Keep his exact face, bone structure, eye color, and hair.",{"type":40,"tag":428,"props":637,"children":639},{"id":638},"step-4-iterate-with-the-user",[640],{"type":45,"value":641},"Step 4: Iterate with the user",{"type":40,"tag":92,"props":643,"children":644},{},[645,650,655,660],{"type":40,"tag":63,"props":646,"children":647},{},[648],{"type":45,"value":649},"Show each result and ask for feedback",{"type":40,"tag":63,"props":651,"children":652},{},[653],{"type":45,"value":654},"Adjust scene, clothing, lighting, or setting based on feedback",{"type":40,"tag":63,"props":656,"children":657},{},[658],{"type":45,"value":659},"Always reuse the same reference image for consistency",{"type":40,"tag":63,"props":661,"children":662},{},[663],{"type":45,"value":664},"If the user wants to change the base appearance, go back to Step 1",{"type":40,"tag":428,"props":666,"children":668},{"id":667},"example-session-flow",[669],{"type":45,"value":670},"Example session flow",{"type":40,"tag":59,"props":672,"children":673},{},[674,679,684,689,694,699],{"type":40,"tag":63,"props":675,"children":676},{},[677],{"type":45,"value":678},"User: \"Create a visual identity for me -- here's my photo\"",{"type":40,"tag":63,"props":680,"children":681},{},[682],{"type":45,"value":683},"Agent: Saves reference, generates 2-3 scenes (beach, office, hiking)",{"type":40,"tag":63,"props":685,"children":686},{},[687],{"type":45,"value":688},"User: \"I like the beach one but make me wearing a hat\"",{"type":40,"tag":63,"props":690,"children":691},{},[692],{"type":45,"value":693},"Agent: Regenerates beach scene with hat, same reference",{"type":40,"tag":63,"props":695,"children":696},{},[697],{"type":45,"value":698},"User: \"Now make one of me cooking\"",{"type":40,"tag":63,"props":700,"children":701},{},[702],{"type":45,"value":703},"Agent: New scene with same reference",{"type":40,"tag":85,"props":705,"children":707},{"id":706},"persisting-visual-identity",[708],{"type":45,"value":709},"Persisting Visual Identity",{"type":40,"tag":48,"props":711,"children":712},{},[713],{"type":45,"value":714},"Two things persist across sessions: the reference image (binary) and the identity metadata (markdown). They live in different places.",{"type":40,"tag":428,"props":716,"children":718},{"id":717},"reference-image-agent-data-directory",[719],{"type":45,"value":720},"Reference image: agent data directory",{"type":40,"tag":48,"props":722,"children":723},{},[724,726,732,734,740],{"type":45,"value":725},"Save the canonical reference image to ",{"type":40,"tag":181,"props":727,"children":729},{"className":728},[],[730],{"type":45,"value":731},"~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg",{"type":45,"value":733},". This is outside memfs because binary images would bloat the git-backed memory repo. The ",{"type":40,"tag":181,"props":735,"children":737},{"className":736},[],[738],{"type":45,"value":739},"reference\u002F",{"type":45,"value":741}," directory persists across sessions.",{"type":40,"tag":335,"props":743,"children":745},{"className":337,"code":744,"language":339,"meta":340,"style":340},"mkdir -p ~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\ncp \u002Ftmp\u002Fgenerated_portrait.jpg ~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg\n",[746],{"type":40,"tag":181,"props":747,"children":748},{"__ignoreMap":340},[749,777],{"type":40,"tag":346,"props":750,"children":751},{"class":348,"line":349},[752,757,762,767,772],{"type":40,"tag":346,"props":753,"children":754},{"style":353},[755],{"type":45,"value":756},"mkdir",{"type":40,"tag":346,"props":758,"children":759},{"style":358},[760],{"type":45,"value":761}," -p",{"type":40,"tag":346,"props":763,"children":764},{"style":358},[765],{"type":45,"value":766}," ~\u002F.letta\u002Fagents\u002F",{"type":40,"tag":346,"props":768,"children":769},{"style":520},[770],{"type":45,"value":771},"$AGENT_ID",{"type":40,"tag":346,"props":773,"children":774},{"style":358},[775],{"type":45,"value":776},"\u002Freference\u002Fvisual-identity\n",{"type":40,"tag":346,"props":778,"children":779},{"class":348,"line":546},[780,785,790,794,798],{"type":40,"tag":346,"props":781,"children":782},{"style":353},[783],{"type":45,"value":784},"cp",{"type":40,"tag":346,"props":786,"children":787},{"style":358},[788],{"type":45,"value":789}," \u002Ftmp\u002Fgenerated_portrait.jpg",{"type":40,"tag":346,"props":791,"children":792},{"style":358},[793],{"type":45,"value":766},{"type":40,"tag":346,"props":795,"children":796},{"style":520},[797],{"type":45,"value":771},{"type":40,"tag":346,"props":799,"children":800},{"style":358},[801],{"type":45,"value":802},"\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg\n",{"type":40,"tag":428,"props":804,"children":806},{"id":805},"identity-metadata-memfs",[807],{"type":45,"value":808},"Identity metadata: memfs",{"type":40,"tag":48,"props":810,"children":811},{},[812,814,820],{"type":45,"value":813},"After establishing a visual identity, create a memory file at ",{"type":40,"tag":181,"props":815,"children":817},{"className":816},[],[818],{"type":45,"value":819},"reference\u002Fvisual-identity.md",{"type":45,"value":821}," in the agent's memory filesystem. This syncs via git like all other memory files.",{"type":40,"tag":48,"props":823,"children":824},{},[825],{"type":45,"value":826},"Use the Memory tool to create it:",{"type":40,"tag":335,"props":828,"children":832},{"className":829,"code":831,"language":45},[830],"language-text","memory(command=\"create\", reason=\"Store visual identity metadata\",\n  file_path=\"reference\u002Fvisual-identity.md\",\n  description=\"Agent's persistent visual identity -- reference image path and appearance description.\",\n  file_text=\"## Reference Image\\n~\u002F.letta\u002Fagents\u002F$AGENT_ID\u002Freference\u002Fvisual-identity\u002Fcanonical.jpg\\n\\n## Appearance\\n- Hair: shoulder-length auburn, slight wave\\n- Eyes: green\\n- Skin: light with freckles\\n- Build: athletic\\n- Distinguishing: small scar above left eyebrow\\n\\n## Anchoring Phrase\\nKeep the exact same face, bone structure, eye color, and hair from the reference image.\\n\\n## History\\n- Established: 2026-04-15\\n- User feedback: \\\"make the hair a bit darker\\\" -> regenerated, approved\")\n",[833],{"type":40,"tag":181,"props":834,"children":835},{"__ignoreMap":340},[836],{"type":45,"value":831},{"type":40,"tag":428,"props":838,"children":840},{"id":839},"auto-detect-on-load",[841],{"type":45,"value":842},"Auto-detect on load",{"type":40,"tag":48,"props":844,"children":845},{},[846,848,853],{"type":45,"value":847},"When this skill is loaded, check the agent's memory tree for ",{"type":40,"tag":181,"props":849,"children":851},{"className":850},[],[852],{"type":45,"value":819},{"type":45,"value":854},". If it exists:",{"type":40,"tag":92,"props":856,"children":857},{},[858,863,868,873],{"type":40,"tag":63,"props":859,"children":860},{},[861],{"type":45,"value":862},"The agent already has an established identity",{"type":40,"tag":63,"props":864,"children":865},{},[866],{"type":45,"value":867},"Use the stored reference image path for all image generation requests",{"type":40,"tag":63,"props":869,"children":870},{},[871],{"type":45,"value":872},"Prepend the stored anchoring phrase to every prompt",{"type":40,"tag":63,"props":874,"children":875},{},[876],{"type":45,"value":877},"Do not ask the user to re-establish their identity",{"type":40,"tag":48,"props":879,"children":880},{},[881],{"type":45,"value":882},"If it does not exist, the agent has no visual identity yet. Offer to create one if the user asks for images.",{"type":40,"tag":428,"props":884,"children":886},{"id":885},"updating-the-identity",[887],{"type":45,"value":888},"Updating the identity",{"type":40,"tag":48,"props":890,"children":891},{},[892],{"type":45,"value":893},"If the user wants to change their visual identity:",{"type":40,"tag":59,"props":895,"children":896},{},[897,902,915,920],{"type":40,"tag":63,"props":898,"children":899},{},[900],{"type":45,"value":901},"Generate or receive the new reference image",{"type":40,"tag":63,"props":903,"children":904},{},[905,907,913],{"type":45,"value":906},"Overwrite ",{"type":40,"tag":181,"props":908,"children":910},{"className":909},[],[911],{"type":45,"value":912},"canonical.jpg",{"type":45,"value":914}," in the reference directory",{"type":40,"tag":63,"props":916,"children":917},{},[918],{"type":45,"value":919},"Update the memory file with new appearance details",{"type":40,"tag":63,"props":921,"children":922},{},[923],{"type":45,"value":924},"Note the change in the History section",{"type":40,"tag":85,"props":926,"children":928},{"id":927},"workflow-2-text-to-image",[929],{"type":45,"value":930},"Workflow 2: Text-to-Image",{"type":40,"tag":48,"props":932,"children":933},{},[934],{"type":45,"value":935},"For one-off image generation that does not need identity persistence.",{"type":40,"tag":335,"props":937,"children":939},{"className":337,"code":938,"language":339,"meta":340,"style":340},"python3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"A corgi wearing a tiny space helmet on the moon\" \\\n  --out \u002Ftmp\u002Fcorgi_moon.jpg\n",[940],{"type":40,"tag":181,"props":941,"children":942},{"__ignoreMap":340},[943,979,1003],{"type":40,"tag":346,"props":944,"children":945},{"class":348,"line":349},[946,950,954,958,962,966,970,975],{"type":40,"tag":346,"props":947,"children":948},{"style":353},[949],{"type":45,"value":506},{"type":40,"tag":346,"props":951,"children":952},{"style":509},[953],{"type":45,"value":512},{"type":40,"tag":346,"props":955,"children":956},{"style":358},[957],{"type":45,"value":517},{"type":40,"tag":346,"props":959,"children":960},{"style":520},[961],{"type":45,"value":523},{"type":40,"tag":346,"props":963,"children":964},{"style":509},[965],{"type":45,"value":528},{"type":40,"tag":346,"props":967,"children":968},{"style":358},[969],{"type":45,"value":533},{"type":40,"tag":346,"props":971,"children":972},{"style":358},[973],{"type":45,"value":974}," generate",{"type":40,"tag":346,"props":976,"children":977},{"style":520},[978],{"type":45,"value":543},{"type":40,"tag":346,"props":980,"children":981},{"class":348,"line":546},[982,986,990,995,999],{"type":40,"tag":346,"props":983,"children":984},{"style":358},[985],{"type":45,"value":570},{"type":40,"tag":346,"props":987,"children":988},{"style":509},[989],{"type":45,"value":575},{"type":40,"tag":346,"props":991,"children":992},{"style":358},[993],{"type":45,"value":994},"A corgi wearing a tiny space helmet on the moon",{"type":40,"tag":346,"props":996,"children":997},{"style":509},[998],{"type":45,"value":585},{"type":40,"tag":346,"props":1000,"children":1001},{"style":520},[1002],{"type":45,"value":543},{"type":40,"tag":346,"props":1004,"children":1005},{"class":348,"line":564},[1006,1010],{"type":40,"tag":346,"props":1007,"children":1008},{"style":358},[1009],{"type":45,"value":598},{"type":40,"tag":346,"props":1011,"children":1012},{"style":358},[1013],{"type":45,"value":1014}," \u002Ftmp\u002Fcorgi_moon.jpg\n",{"type":40,"tag":48,"props":1016,"children":1017},{},[1018,1020,1026],{"type":45,"value":1019},"Or inline with ",{"type":40,"tag":181,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":45,"value":1025},"requests",{"type":45,"value":1027}," (OpenAI):",{"type":40,"tag":335,"props":1029,"children":1033},{"className":1030,"code":1031,"language":1032,"meta":340,"style":340},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import requests, base64, os\n\nresp = requests.post(\n    \"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fimages\u002Fgenerations\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['OPENAI_API_KEY']}\",\n        \"Content-Type\": \"application\u002Fjson\",\n    },\n    json={\n        \"model\": \"gpt-image-1\",\n        \"prompt\": \"A corgi wearing a tiny space helmet on the moon\",\n        \"n\": 1,\n        \"size\": \"1024x1024\",\n        \"quality\": \"medium\",\n    },\n).json()\n\nimg = base64.b64decode(resp[\"data\"][0][\"b64_json\"])\nwith open(\"\u002Ftmp\u002Fcorgi_moon.png\", \"wb\") as f:\n    f.write(img)\n","python",[1034],{"type":40,"tag":181,"props":1035,"children":1036},{"__ignoreMap":340},[1037,1045,1054,1062,1070,1079,1088,1097,1106,1115,1124,1133,1142,1151,1160,1168,1177,1185,1194,1203],{"type":40,"tag":346,"props":1038,"children":1039},{"class":348,"line":349},[1040],{"type":40,"tag":346,"props":1041,"children":1042},{},[1043],{"type":45,"value":1044},"import requests, base64, os\n",{"type":40,"tag":346,"props":1046,"children":1047},{"class":348,"line":546},[1048],{"type":40,"tag":346,"props":1049,"children":1051},{"emptyLinePlaceholder":1050},true,[1052],{"type":45,"value":1053},"\n",{"type":40,"tag":346,"props":1055,"children":1056},{"class":348,"line":564},[1057],{"type":40,"tag":346,"props":1058,"children":1059},{},[1060],{"type":45,"value":1061},"resp = requests.post(\n",{"type":40,"tag":346,"props":1063,"children":1064},{"class":348,"line":592},[1065],{"type":40,"tag":346,"props":1066,"children":1067},{},[1068],{"type":45,"value":1069},"    \"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fimages\u002Fgenerations\",\n",{"type":40,"tag":346,"props":1071,"children":1073},{"class":348,"line":1072},5,[1074],{"type":40,"tag":346,"props":1075,"children":1076},{},[1077],{"type":45,"value":1078},"    headers={\n",{"type":40,"tag":346,"props":1080,"children":1082},{"class":348,"line":1081},6,[1083],{"type":40,"tag":346,"props":1084,"children":1085},{},[1086],{"type":45,"value":1087},"        \"Authorization\": f\"Bearer {os.environ['OPENAI_API_KEY']}\",\n",{"type":40,"tag":346,"props":1089,"children":1091},{"class":348,"line":1090},7,[1092],{"type":40,"tag":346,"props":1093,"children":1094},{},[1095],{"type":45,"value":1096},"        \"Content-Type\": \"application\u002Fjson\",\n",{"type":40,"tag":346,"props":1098,"children":1100},{"class":348,"line":1099},8,[1101],{"type":40,"tag":346,"props":1102,"children":1103},{},[1104],{"type":45,"value":1105},"    },\n",{"type":40,"tag":346,"props":1107,"children":1109},{"class":348,"line":1108},9,[1110],{"type":40,"tag":346,"props":1111,"children":1112},{},[1113],{"type":45,"value":1114},"    json={\n",{"type":40,"tag":346,"props":1116,"children":1118},{"class":348,"line":1117},10,[1119],{"type":40,"tag":346,"props":1120,"children":1121},{},[1122],{"type":45,"value":1123},"        \"model\": \"gpt-image-1\",\n",{"type":40,"tag":346,"props":1125,"children":1127},{"class":348,"line":1126},11,[1128],{"type":40,"tag":346,"props":1129,"children":1130},{},[1131],{"type":45,"value":1132},"        \"prompt\": \"A corgi wearing a tiny space helmet on the moon\",\n",{"type":40,"tag":346,"props":1134,"children":1136},{"class":348,"line":1135},12,[1137],{"type":40,"tag":346,"props":1138,"children":1139},{},[1140],{"type":45,"value":1141},"        \"n\": 1,\n",{"type":40,"tag":346,"props":1143,"children":1145},{"class":348,"line":1144},13,[1146],{"type":40,"tag":346,"props":1147,"children":1148},{},[1149],{"type":45,"value":1150},"        \"size\": \"1024x1024\",\n",{"type":40,"tag":346,"props":1152,"children":1154},{"class":348,"line":1153},14,[1155],{"type":40,"tag":346,"props":1156,"children":1157},{},[1158],{"type":45,"value":1159},"        \"quality\": \"medium\",\n",{"type":40,"tag":346,"props":1161,"children":1163},{"class":348,"line":1162},15,[1164],{"type":40,"tag":346,"props":1165,"children":1166},{},[1167],{"type":45,"value":1105},{"type":40,"tag":346,"props":1169,"children":1171},{"class":348,"line":1170},16,[1172],{"type":40,"tag":346,"props":1173,"children":1174},{},[1175],{"type":45,"value":1176},").json()\n",{"type":40,"tag":346,"props":1178,"children":1180},{"class":348,"line":1179},17,[1181],{"type":40,"tag":346,"props":1182,"children":1183},{"emptyLinePlaceholder":1050},[1184],{"type":45,"value":1053},{"type":40,"tag":346,"props":1186,"children":1188},{"class":348,"line":1187},18,[1189],{"type":40,"tag":346,"props":1190,"children":1191},{},[1192],{"type":45,"value":1193},"img = base64.b64decode(resp[\"data\"][0][\"b64_json\"])\n",{"type":40,"tag":346,"props":1195,"children":1197},{"class":348,"line":1196},19,[1198],{"type":40,"tag":346,"props":1199,"children":1200},{},[1201],{"type":45,"value":1202},"with open(\"\u002Ftmp\u002Fcorgi_moon.png\", \"wb\") as f:\n",{"type":40,"tag":346,"props":1204,"children":1205},{"class":348,"line":27},[1206],{"type":40,"tag":346,"props":1207,"children":1208},{},[1209],{"type":45,"value":1210},"    f.write(img)\n",{"type":40,"tag":85,"props":1212,"children":1214},{"id":1213},"parameters",[1215],{"type":45,"value":1216},"Parameters",{"type":40,"tag":132,"props":1218,"children":1219},{},[1220,1249],{"type":40,"tag":136,"props":1221,"children":1222},{},[1223],{"type":40,"tag":140,"props":1224,"children":1225},{},[1226,1231,1236,1241,1245],{"type":40,"tag":144,"props":1227,"children":1228},{},[1229],{"type":45,"value":1230},"Parameter",{"type":40,"tag":144,"props":1232,"children":1233},{},[1234],{"type":45,"value":1235},"Values",{"type":40,"tag":144,"props":1237,"children":1238},{},[1239],{"type":45,"value":1240},"Default",{"type":40,"tag":144,"props":1242,"children":1243},{},[1244],{"type":45,"value":158},{"type":40,"tag":144,"props":1246,"children":1247},{},[1248],{"type":45,"value":163},{"type":40,"tag":165,"props":1250,"children":1251},{},[1252,1284,1315,1358,1431,1481,1533,1564,1595],{"type":40,"tag":140,"props":1253,"children":1254},{},[1255,1264,1269,1274,1279],{"type":40,"tag":172,"props":1256,"children":1257},{},[1258],{"type":40,"tag":181,"props":1259,"children":1261},{"className":1260},[],[1262],{"type":45,"value":1263},"--prompt",{"type":40,"tag":172,"props":1265,"children":1266},{},[1267],{"type":45,"value":1268},"string",{"type":40,"tag":172,"props":1270,"children":1271},{},[1272],{"type":45,"value":1273},"required",{"type":40,"tag":172,"props":1275,"children":1276},{},[1277],{"type":45,"value":1278},"Both",{"type":40,"tag":172,"props":1280,"children":1281},{},[1282],{"type":45,"value":1283},"Scene description",{"type":40,"tag":140,"props":1285,"children":1286},{},[1287,1296,1301,1306,1310],{"type":40,"tag":172,"props":1288,"children":1289},{},[1290],{"type":40,"tag":181,"props":1291,"children":1293},{"className":1292},[],[1294],{"type":45,"value":1295},"--reference",{"type":40,"tag":172,"props":1297,"children":1298},{},[1299],{"type":45,"value":1300},"file path",{"type":40,"tag":172,"props":1302,"children":1303},{},[1304],{"type":45,"value":1305},"none",{"type":40,"tag":172,"props":1307,"children":1308},{},[1309],{"type":45,"value":1278},{"type":40,"tag":172,"props":1311,"children":1312},{},[1313],{"type":45,"value":1314},"Reference photo for identity mode (edit only)",{"type":40,"tag":140,"props":1316,"children":1317},{},[1318,1327,1344,1349,1353],{"type":40,"tag":172,"props":1319,"children":1320},{},[1321],{"type":40,"tag":181,"props":1322,"children":1324},{"className":1323},[],[1325],{"type":45,"value":1326},"--provider",{"type":40,"tag":172,"props":1328,"children":1329},{},[1330,1336,1338],{"type":40,"tag":181,"props":1331,"children":1333},{"className":1332},[],[1334],{"type":45,"value":1335},"openai",{"type":45,"value":1337},", ",{"type":40,"tag":181,"props":1339,"children":1341},{"className":1340},[],[1342],{"type":45,"value":1343},"flux",{"type":40,"tag":172,"props":1345,"children":1346},{},[1347],{"type":45,"value":1348},"auto",{"type":40,"tag":172,"props":1350,"children":1351},{},[1352],{"type":45,"value":1278},{"type":40,"tag":172,"props":1354,"children":1355},{},[1356],{"type":45,"value":1357},"Override provider auto-detection",{"type":40,"tag":140,"props":1359,"children":1360},{},[1361,1370,1407,1415,1419],{"type":40,"tag":172,"props":1362,"children":1363},{},[1364],{"type":40,"tag":181,"props":1365,"children":1367},{"className":1366},[],[1368],{"type":45,"value":1369},"--aspect-ratio",{"type":40,"tag":172,"props":1371,"children":1372},{},[1373,1379,1380,1386,1387,1393,1394,1400,1401],{"type":40,"tag":181,"props":1374,"children":1376},{"className":1375},[],[1377],{"type":45,"value":1378},"1:1",{"type":45,"value":1337},{"type":40,"tag":181,"props":1381,"children":1383},{"className":1382},[],[1384],{"type":45,"value":1385},"3:4",{"type":45,"value":1337},{"type":40,"tag":181,"props":1388,"children":1390},{"className":1389},[],[1391],{"type":45,"value":1392},"4:3",{"type":45,"value":1337},{"type":40,"tag":181,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":45,"value":1399},"16:9",{"type":45,"value":1337},{"type":40,"tag":181,"props":1402,"children":1404},{"className":1403},[],[1405],{"type":45,"value":1406},"9:16",{"type":40,"tag":172,"props":1408,"children":1409},{},[1410],{"type":40,"tag":181,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":45,"value":1385},{"type":40,"tag":172,"props":1416,"children":1417},{},[1418],{"type":45,"value":1278},{"type":40,"tag":172,"props":1420,"children":1421},{},[1422,1424,1429],{"type":45,"value":1423},"Use ",{"type":40,"tag":181,"props":1425,"children":1427},{"className":1426},[],[1428],{"type":45,"value":1385},{"type":45,"value":1430}," for portraits",{"type":40,"tag":140,"props":1432,"children":1433},{},[1434,1443,1466,1474,1478],{"type":40,"tag":172,"props":1435,"children":1436},{},[1437],{"type":40,"tag":181,"props":1438,"children":1440},{"className":1439},[],[1441],{"type":45,"value":1442},"--output-format",{"type":40,"tag":172,"props":1444,"children":1445},{},[1446,1452,1453,1459,1460],{"type":40,"tag":181,"props":1447,"children":1449},{"className":1448},[],[1450],{"type":45,"value":1451},"png",{"type":45,"value":1337},{"type":40,"tag":181,"props":1454,"children":1456},{"className":1455},[],[1457],{"type":45,"value":1458},"jpeg",{"type":45,"value":1337},{"type":40,"tag":181,"props":1461,"children":1463},{"className":1462},[],[1464],{"type":45,"value":1465},"webp",{"type":40,"tag":172,"props":1467,"children":1468},{},[1469],{"type":40,"tag":181,"props":1470,"children":1472},{"className":1471},[],[1473],{"type":45,"value":1451},{"type":40,"tag":172,"props":1475,"children":1476},{},[1477],{"type":45,"value":1278},{"type":40,"tag":172,"props":1479,"children":1480},{},[],{"type":40,"tag":140,"props":1482,"children":1483},{},[1484,1493,1516,1524,1528],{"type":40,"tag":172,"props":1485,"children":1486},{},[1487],{"type":40,"tag":181,"props":1488,"children":1490},{"className":1489},[],[1491],{"type":45,"value":1492},"--quality",{"type":40,"tag":172,"props":1494,"children":1495},{},[1496,1502,1503,1509,1510],{"type":40,"tag":181,"props":1497,"children":1499},{"className":1498},[],[1500],{"type":45,"value":1501},"low",{"type":45,"value":1337},{"type":40,"tag":181,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":45,"value":1508},"medium",{"type":45,"value":1337},{"type":40,"tag":181,"props":1511,"children":1513},{"className":1512},[],[1514],{"type":45,"value":1515},"high",{"type":40,"tag":172,"props":1517,"children":1518},{},[1519],{"type":40,"tag":181,"props":1520,"children":1522},{"className":1521},[],[1523],{"type":45,"value":1508},{"type":40,"tag":172,"props":1525,"children":1526},{},[1527],{"type":45,"value":260},{"type":40,"tag":172,"props":1529,"children":1530},{},[1531],{"type":45,"value":1532},"Image quality",{"type":40,"tag":140,"props":1534,"children":1535},{},[1536,1545,1550,1555,1559],{"type":40,"tag":172,"props":1537,"children":1538},{},[1539],{"type":40,"tag":181,"props":1540,"children":1542},{"className":1541},[],[1543],{"type":45,"value":1544},"--seed",{"type":40,"tag":172,"props":1546,"children":1547},{},[1548],{"type":45,"value":1549},"integer",{"type":40,"tag":172,"props":1551,"children":1552},{},[1553],{"type":45,"value":1554},"random",{"type":40,"tag":172,"props":1556,"children":1557},{},[1558],{"type":45,"value":285},{"type":40,"tag":172,"props":1560,"children":1561},{},[1562],{"type":45,"value":1563},"Fix for reproducible results",{"type":40,"tag":140,"props":1565,"children":1566},{},[1567,1576,1581,1586,1590],{"type":40,"tag":172,"props":1568,"children":1569},{},[1570],{"type":40,"tag":181,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":45,"value":1575},"--safety-tolerance",{"type":40,"tag":172,"props":1577,"children":1578},{},[1579],{"type":45,"value":1580},"0-6",{"type":40,"tag":172,"props":1582,"children":1583},{},[1584],{"type":45,"value":1585},"2",{"type":40,"tag":172,"props":1587,"children":1588},{},[1589],{"type":45,"value":285},{"type":40,"tag":172,"props":1591,"children":1592},{},[1593],{"type":45,"value":1594},"Higher = more permissive",{"type":40,"tag":140,"props":1596,"children":1597},{},[1598,1607,1612,1617,1621],{"type":40,"tag":172,"props":1599,"children":1600},{},[1601],{"type":40,"tag":181,"props":1602,"children":1604},{"className":1603},[],[1605],{"type":45,"value":1606},"--guidance",{"type":40,"tag":172,"props":1608,"children":1609},{},[1610],{"type":45,"value":1611},"1.5-100",{"type":40,"tag":172,"props":1613,"children":1614},{},[1615],{"type":45,"value":1616},"varies",{"type":40,"tag":172,"props":1618,"children":1619},{},[1620],{"type":45,"value":285},{"type":40,"tag":172,"props":1622,"children":1623},{},[1624],{"type":45,"value":1625},"Prompt adherence strength",{"type":40,"tag":85,"props":1627,"children":1629},{"id":1628},"prompting-best-practices",[1630],{"type":45,"value":1631},"Prompting best practices",{"type":40,"tag":92,"props":1633,"children":1634},{},[1635,1640,1656,1666,1671,1676,1681],{"type":40,"tag":63,"props":1636,"children":1637},{},[1638],{"type":45,"value":1639},"Be specific about physical setting, lighting, clothing, and pose",{"type":40,"tag":63,"props":1641,"children":1642},{},[1643,1645,1650,1651],{"type":45,"value":1644},"For portraits, specify aspect ratio ",{"type":40,"tag":181,"props":1646,"children":1648},{"className":1647},[],[1649],{"type":45,"value":1385},{"type":45,"value":236},{"type":40,"tag":181,"props":1652,"children":1654},{"className":1653},[],[1655],{"type":45,"value":1392},{"type":40,"tag":63,"props":1657,"children":1658},{},[1659,1661],{"type":45,"value":1660},"For landscapes\u002Fscenes, use ",{"type":40,"tag":181,"props":1662,"children":1664},{"className":1663},[],[1665],{"type":45,"value":1399},{"type":40,"tag":63,"props":1667,"children":1668},{},[1669],{"type":45,"value":1670},"Include lighting direction: \"golden hour\", \"studio lighting\", \"neon-lit\"",{"type":40,"tag":63,"props":1672,"children":1673},{},[1674],{"type":45,"value":1675},"Describe clothing and accessories explicitly",{"type":40,"tag":63,"props":1677,"children":1678},{},[1679],{"type":45,"value":1680},"For identity mode, always include the anchoring phrase about preserving facial features",{"type":40,"tag":63,"props":1682,"children":1683},{},[1684],{"type":45,"value":1685},"Avoid contradicting the reference photo (e.g., don't say \"blonde hair\" if the reference has dark hair)",{"type":40,"tag":85,"props":1687,"children":1689},{"id":1688},"rate-limits-and-costs",[1690],{"type":45,"value":1691},"Rate limits and costs",{"type":40,"tag":92,"props":1693,"children":1694},{},[1695,1700,1705,1718,1723],{"type":40,"tag":63,"props":1696,"children":1697},{},[1698],{"type":45,"value":1699},"Maximum 6 concurrent requests per API key",{"type":40,"tag":63,"props":1701,"children":1702},{},[1703],{"type":45,"value":1704},"Queue times: typically 4-10 seconds, can spike to 2+ minutes under load",{"type":40,"tag":63,"props":1706,"children":1707},{},[1708,1710,1716],{"type":45,"value":1709},"If a request stays in ",{"type":40,"tag":181,"props":1711,"children":1713},{"className":1712},[],[1714],{"type":45,"value":1715},"Pending",{"type":45,"value":1717}," for over 120 seconds, retry once",{"type":40,"tag":63,"props":1719,"children":1720},{},[1721],{"type":45,"value":1722},"Polling interval: 2 seconds is sufficient",{"type":40,"tag":63,"props":1724,"children":1725},{},[1726,1728,1734],{"type":45,"value":1727},"Download URLs in the ",{"type":40,"tag":181,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":45,"value":1733},"Ready",{"type":45,"value":1735}," response are signed and expire; save images immediately",{"type":40,"tag":85,"props":1737,"children":1739},{"id":1738},"cli-reference",[1740],{"type":45,"value":1741},"CLI reference",{"type":40,"tag":48,"props":1743,"children":1744},{},[1745,1747],{"type":45,"value":1746},"Full CLI documentation: ",{"type":40,"tag":181,"props":1748,"children":1750},{"className":1749},[],[1751],{"type":45,"value":1752},"references\u002Fapi.md",{"type":40,"tag":48,"props":1754,"children":1755},{},[1756],{"type":45,"value":1757},"Common commands:",{"type":40,"tag":335,"props":1759,"children":1761},{"className":337,"code":1760,"language":339,"meta":340,"style":340},"# Text-to-image\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"...\" --out output.jpg\n\n# Reference-based editing (visual identity)\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py edit \\\n  --reference photo.jpg --prompt \"...\" --out output.jpg\n\n# Dry run (show request without sending)\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"...\" --dry-run\n\n# Custom aspect ratio and seed\npython3 \u003Cpath-to-skill>\u002Fscripts\u002Fgenerate_image.py generate \\\n  --prompt \"...\" --aspect-ratio 16:9 --seed 42 --out wide.jpg\n",[1762],{"type":40,"tag":181,"props":1763,"children":1764},{"__ignoreMap":340},[1765,1774,1809,1839,1846,1854,1889,1926,1933,1941,1976,2000,2007,2015,2050],{"type":40,"tag":346,"props":1766,"children":1767},{"class":348,"line":349},[1768],{"type":40,"tag":346,"props":1769,"children":1771},{"style":1770},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1772],{"type":45,"value":1773},"# Text-to-image\n",{"type":40,"tag":346,"props":1775,"children":1776},{"class":348,"line":546},[1777,1781,1785,1789,1793,1797,1801,1805],{"type":40,"tag":346,"props":1778,"children":1779},{"style":353},[1780],{"type":45,"value":506},{"type":40,"tag":346,"props":1782,"children":1783},{"style":509},[1784],{"type":45,"value":512},{"type":40,"tag":346,"props":1786,"children":1787},{"style":358},[1788],{"type":45,"value":517},{"type":40,"tag":346,"props":1790,"children":1791},{"style":520},[1792],{"type":45,"value":523},{"type":40,"tag":346,"props":1794,"children":1795},{"style":509},[1796],{"type":45,"value":528},{"type":40,"tag":346,"props":1798,"children":1799},{"style":358},[1800],{"type":45,"value":533},{"type":40,"tag":346,"props":1802,"children":1803},{"style":358},[1804],{"type":45,"value":974},{"type":40,"tag":346,"props":1806,"children":1807},{"style":520},[1808],{"type":45,"value":543},{"type":40,"tag":346,"props":1810,"children":1811},{"class":348,"line":564},[1812,1816,1820,1825,1829,1834],{"type":40,"tag":346,"props":1813,"children":1814},{"style":358},[1815],{"type":45,"value":570},{"type":40,"tag":346,"props":1817,"children":1818},{"style":509},[1819],{"type":45,"value":575},{"type":40,"tag":346,"props":1821,"children":1822},{"style":358},[1823],{"type":45,"value":1824},"...",{"type":40,"tag":346,"props":1826,"children":1827},{"style":509},[1828],{"type":45,"value":585},{"type":40,"tag":346,"props":1830,"children":1831},{"style":358},[1832],{"type":45,"value":1833}," --out",{"type":40,"tag":346,"props":1835,"children":1836},{"style":358},[1837],{"type":45,"value":1838}," output.jpg\n",{"type":40,"tag":346,"props":1840,"children":1841},{"class":348,"line":592},[1842],{"type":40,"tag":346,"props":1843,"children":1844},{"emptyLinePlaceholder":1050},[1845],{"type":45,"value":1053},{"type":40,"tag":346,"props":1847,"children":1848},{"class":348,"line":1072},[1849],{"type":40,"tag":346,"props":1850,"children":1851},{"style":1770},[1852],{"type":45,"value":1853},"# Reference-based editing (visual identity)\n",{"type":40,"tag":346,"props":1855,"children":1856},{"class":348,"line":1081},[1857,1861,1865,1869,1873,1877,1881,1885],{"type":40,"tag":346,"props":1858,"children":1859},{"style":353},[1860],{"type":45,"value":506},{"type":40,"tag":346,"props":1862,"children":1863},{"style":509},[1864],{"type":45,"value":512},{"type":40,"tag":346,"props":1866,"children":1867},{"style":358},[1868],{"type":45,"value":517},{"type":40,"tag":346,"props":1870,"children":1871},{"style":520},[1872],{"type":45,"value":523},{"type":40,"tag":346,"props":1874,"children":1875},{"style":509},[1876],{"type":45,"value":528},{"type":40,"tag":346,"props":1878,"children":1879},{"style":358},[1880],{"type":45,"value":533},{"type":40,"tag":346,"props":1882,"children":1883},{"style":358},[1884],{"type":45,"value":538},{"type":40,"tag":346,"props":1886,"children":1887},{"style":520},[1888],{"type":45,"value":543},{"type":40,"tag":346,"props":1890,"children":1891},{"class":348,"line":1090},[1892,1896,1901,1906,1910,1914,1918,1922],{"type":40,"tag":346,"props":1893,"children":1894},{"style":358},[1895],{"type":45,"value":552},{"type":40,"tag":346,"props":1897,"children":1898},{"style":358},[1899],{"type":45,"value":1900}," photo.jpg",{"type":40,"tag":346,"props":1902,"children":1903},{"style":358},[1904],{"type":45,"value":1905}," --prompt",{"type":40,"tag":346,"props":1907,"children":1908},{"style":509},[1909],{"type":45,"value":575},{"type":40,"tag":346,"props":1911,"children":1912},{"style":358},[1913],{"type":45,"value":1824},{"type":40,"tag":346,"props":1915,"children":1916},{"style":509},[1917],{"type":45,"value":585},{"type":40,"tag":346,"props":1919,"children":1920},{"style":358},[1921],{"type":45,"value":1833},{"type":40,"tag":346,"props":1923,"children":1924},{"style":358},[1925],{"type":45,"value":1838},{"type":40,"tag":346,"props":1927,"children":1928},{"class":348,"line":1099},[1929],{"type":40,"tag":346,"props":1930,"children":1931},{"emptyLinePlaceholder":1050},[1932],{"type":45,"value":1053},{"type":40,"tag":346,"props":1934,"children":1935},{"class":348,"line":1108},[1936],{"type":40,"tag":346,"props":1937,"children":1938},{"style":1770},[1939],{"type":45,"value":1940},"# Dry run (show request without sending)\n",{"type":40,"tag":346,"props":1942,"children":1943},{"class":348,"line":1117},[1944,1948,1952,1956,1960,1964,1968,1972],{"type":40,"tag":346,"props":1945,"children":1946},{"style":353},[1947],{"type":45,"value":506},{"type":40,"tag":346,"props":1949,"children":1950},{"style":509},[1951],{"type":45,"value":512},{"type":40,"tag":346,"props":1953,"children":1954},{"style":358},[1955],{"type":45,"value":517},{"type":40,"tag":346,"props":1957,"children":1958},{"style":520},[1959],{"type":45,"value":523},{"type":40,"tag":346,"props":1961,"children":1962},{"style":509},[1963],{"type":45,"value":528},{"type":40,"tag":346,"props":1965,"children":1966},{"style":358},[1967],{"type":45,"value":533},{"type":40,"tag":346,"props":1969,"children":1970},{"style":358},[1971],{"type":45,"value":974},{"type":40,"tag":346,"props":1973,"children":1974},{"style":520},[1975],{"type":45,"value":543},{"type":40,"tag":346,"props":1977,"children":1978},{"class":348,"line":1126},[1979,1983,1987,1991,1995],{"type":40,"tag":346,"props":1980,"children":1981},{"style":358},[1982],{"type":45,"value":570},{"type":40,"tag":346,"props":1984,"children":1985},{"style":509},[1986],{"type":45,"value":575},{"type":40,"tag":346,"props":1988,"children":1989},{"style":358},[1990],{"type":45,"value":1824},{"type":40,"tag":346,"props":1992,"children":1993},{"style":509},[1994],{"type":45,"value":585},{"type":40,"tag":346,"props":1996,"children":1997},{"style":358},[1998],{"type":45,"value":1999}," --dry-run\n",{"type":40,"tag":346,"props":2001,"children":2002},{"class":348,"line":1135},[2003],{"type":40,"tag":346,"props":2004,"children":2005},{"emptyLinePlaceholder":1050},[2006],{"type":45,"value":1053},{"type":40,"tag":346,"props":2008,"children":2009},{"class":348,"line":1144},[2010],{"type":40,"tag":346,"props":2011,"children":2012},{"style":1770},[2013],{"type":45,"value":2014},"# Custom aspect ratio and seed\n",{"type":40,"tag":346,"props":2016,"children":2017},{"class":348,"line":1153},[2018,2022,2026,2030,2034,2038,2042,2046],{"type":40,"tag":346,"props":2019,"children":2020},{"style":353},[2021],{"type":45,"value":506},{"type":40,"tag":346,"props":2023,"children":2024},{"style":509},[2025],{"type":45,"value":512},{"type":40,"tag":346,"props":2027,"children":2028},{"style":358},[2029],{"type":45,"value":517},{"type":40,"tag":346,"props":2031,"children":2032},{"style":520},[2033],{"type":45,"value":523},{"type":40,"tag":346,"props":2035,"children":2036},{"style":509},[2037],{"type":45,"value":528},{"type":40,"tag":346,"props":2039,"children":2040},{"style":358},[2041],{"type":45,"value":533},{"type":40,"tag":346,"props":2043,"children":2044},{"style":358},[2045],{"type":45,"value":974},{"type":40,"tag":346,"props":2047,"children":2048},{"style":520},[2049],{"type":45,"value":543},{"type":40,"tag":346,"props":2051,"children":2052},{"class":348,"line":1162},[2053,2057,2061,2065,2069,2074,2079,2084,2090,2094],{"type":40,"tag":346,"props":2054,"children":2055},{"style":358},[2056],{"type":45,"value":570},{"type":40,"tag":346,"props":2058,"children":2059},{"style":509},[2060],{"type":45,"value":575},{"type":40,"tag":346,"props":2062,"children":2063},{"style":358},[2064],{"type":45,"value":1824},{"type":40,"tag":346,"props":2066,"children":2067},{"style":509},[2068],{"type":45,"value":585},{"type":40,"tag":346,"props":2070,"children":2071},{"style":358},[2072],{"type":45,"value":2073}," --aspect-ratio",{"type":40,"tag":346,"props":2075,"children":2076},{"style":358},[2077],{"type":45,"value":2078}," 16:9",{"type":40,"tag":346,"props":2080,"children":2081},{"style":358},[2082],{"type":45,"value":2083}," --seed",{"type":40,"tag":346,"props":2085,"children":2087},{"style":2086},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2088],{"type":45,"value":2089}," 42",{"type":40,"tag":346,"props":2091,"children":2092},{"style":358},[2093],{"type":45,"value":1833},{"type":40,"tag":346,"props":2095,"children":2096},{"style":358},[2097],{"type":45,"value":2098}," wide.jpg\n",{"type":40,"tag":85,"props":2100,"children":2102},{"id":2101},"error-handling",[2103],{"type":45,"value":2104},"Error handling",{"type":40,"tag":48,"props":2106,"children":2107},{},[2108],{"type":40,"tag":67,"props":2109,"children":2110},{},[2111],{"type":45,"value":2112},"OpenAI:",{"type":40,"tag":92,"props":2114,"children":2115},{},[2116,2127,2138],{"type":40,"tag":63,"props":2117,"children":2118},{},[2119,2125],{"type":40,"tag":181,"props":2120,"children":2122},{"className":2121},[],[2123],{"type":45,"value":2124},"HTTP 400\u002F422",{"type":45,"value":2126},": Usually a malformed request or content policy violation",{"type":40,"tag":63,"props":2128,"children":2129},{},[2130,2136],{"type":40,"tag":181,"props":2131,"children":2133},{"className":2132},[],[2134],{"type":45,"value":2135},"HTTP 429",{"type":45,"value":2137},": Rate limited -- wait and retry",{"type":40,"tag":63,"props":2139,"children":2140},{},[2141,2143,2148,2150],{"type":45,"value":2142},"Missing ",{"type":40,"tag":181,"props":2144,"children":2146},{"className":2145},[],[2147],{"type":45,"value":186},{"type":45,"value":2149},": Guide the user to ",{"type":40,"tag":271,"props":2151,"children":2153},{"href":273,"rel":2152},[275],[2154],{"type":45,"value":273},{"type":40,"tag":48,"props":2156,"children":2157},{},[2158],{"type":40,"tag":67,"props":2159,"children":2160},{},[2161],{"type":45,"value":2162},"Flux:",{"type":40,"tag":92,"props":2164,"children":2165},{},[2166,2182,2193,2203],{"type":40,"tag":63,"props":2167,"children":2168},{},[2169,2175,2177],{"type":40,"tag":181,"props":2170,"children":2172},{"className":2171},[],[2173],{"type":45,"value":2174},"Insufficient credits",{"type":45,"value":2176},": Direct user to ",{"type":40,"tag":271,"props":2178,"children":2180},{"href":306,"rel":2179},[275],[2181],{"type":45,"value":306},{"type":40,"tag":63,"props":2183,"children":2184},{},[2185,2191],{"type":40,"tag":181,"props":2186,"children":2188},{"className":2187},[],[2189],{"type":45,"value":2190},"HTTP 422",{"type":45,"value":2192},": Usually a malformed request -- check prompt and parameters",{"type":40,"tag":63,"props":2194,"children":2195},{},[2196,2201],{"type":40,"tag":181,"props":2197,"children":2199},{"className":2198},[],[2200],{"type":45,"value":1715},{"type":45,"value":2202}," timeout: Retry the request; the queue may be congested",{"type":40,"tag":63,"props":2204,"children":2205},{},[2206,2207,2212,2213],{"type":45,"value":2142},{"type":40,"tag":181,"props":2208,"children":2210},{"className":2209},[],[2211],{"type":45,"value":213},{"type":45,"value":2149},{"type":40,"tag":271,"props":2214,"children":2216},{"href":290,"rel":2215},[275],[2217],{"type":45,"value":290},{"type":40,"tag":48,"props":2219,"children":2220},{},[2221],{"type":40,"tag":67,"props":2222,"children":2223},{},[2224],{"type":45,"value":2225},"Both:",{"type":40,"tag":92,"props":2227,"children":2228},{},[2229,2234],{"type":40,"tag":63,"props":2230,"children":2231},{},[2232],{"type":45,"value":2233},"Image too large for base64: Resize to under 10MB before encoding",{"type":40,"tag":63,"props":2235,"children":2236},{},[2237],{"type":45,"value":2238},"No API key found: See Environment section",{"type":40,"tag":2240,"props":2241,"children":2242},"style",{},[2243],{"type":45,"value":2244},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2246,"total":2403},[2247,2265,2280,2292,2304,2318,2330,2341,2353,2369,2380,2392],{"slug":2248,"name":2248,"fn":2249,"description":2250,"org":2251,"tags":2252,"stars":2262,"repoUrl":2263,"updatedAt":2264},"acquiring-skills","discover and install agent skills","Discover and install skills from Hermes, ClawHub, GitHub, and other registries. Load this skill whenever a user asks for a capability you don't already have — image generation, social media, email, calendar, finance, DevOps, search, browser automation, etc.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2253,2256,2259],{"name":2254,"slug":2255,"type":16},"Agents","agents",{"name":2257,"slug":2258,"type":16},"Automation","automation",{"name":2260,"slug":2261,"type":16},"GitHub","github",2831,"https:\u002F\u002Fgithub.com\u002Fletta-ai\u002Fletta-code","2026-07-13T06:22:58.45767",{"slug":2266,"name":2267,"fn":2268,"description":2269,"org":2270,"tags":2271,"stars":2262,"repoUrl":2263,"updatedAt":2279},"context-doctor","Context Doctor","repair system prompt and memory degradation","Identify and repair degradation in system prompt, external memory, and skills preventing you from following instructions or remembering information as well as you should.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2272,2273,2276],{"name":2254,"slug":2255,"type":16},{"name":2274,"slug":2275,"type":16},"AI Context","ai-context",{"name":2277,"slug":2278,"type":16},"Debugging","debugging","2026-07-13T06:22:50.151002",{"slug":2281,"name":2281,"fn":2282,"description":2283,"org":2284,"tags":2285,"stars":2262,"repoUrl":2263,"updatedAt":2291},"converting-mcps-to-skills","connect MCP servers to create skills","Connect to MCP (Model Context Protocol) servers and create skills for repeated use. Load when a user wants to use an MCP server, connect to external tools via MCP, or when they mention MCP, model context protocol, or specific MCP servers.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2286,2287,2288],{"name":2254,"slug":2255,"type":16},{"name":2257,"slug":2258,"type":16},{"name":2289,"slug":2290,"type":16},"MCP","mcp","2026-07-13T06:23:37.646079",{"slug":2293,"name":2293,"fn":2294,"description":2295,"org":2296,"tags":2297,"stars":2262,"repoUrl":2263,"updatedAt":2303},"creating-mods","create and edit Letta Code mods","Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle\u002Fturn events, scoped conversation helpers, panels, and capability-gated behavior. Use when asked to make a mod, add an agent-callable tool, add a slash command, add a local provider\u002Fmodel adapter, transform turns, react to app events, or add lightweight mod UI outside the dedicated \u002Fstatusline flow.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2298,2299,2300],{"name":2254,"slug":2255,"type":16},{"name":2257,"slug":2258,"type":16},{"name":2301,"slug":2302,"type":16},"Coding","coding","2026-07-23T05:42:38.133565",{"slug":2305,"name":2305,"fn":2306,"description":2307,"org":2308,"tags":2309,"stars":2262,"repoUrl":2263,"updatedAt":2317},"creating-skills","create and update agent skills","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Letta Code's capabilities with specialized knowledge, workflows, or tool integrations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2310,2311,2314],{"name":2254,"slug":2255,"type":16},{"name":2312,"slug":2313,"type":16},"Documentation","documentation",{"name":2315,"slug":2316,"type":16},"Plugin Development","plugin-development","2026-07-13T06:22:56.998659",{"slug":2319,"name":2319,"fn":2320,"description":2321,"org":2322,"tags":2323,"stars":2262,"repoUrl":2263,"updatedAt":2329},"customizing-commands","create and manage Letta slash commands","Creates, edits, and enables Letta Code mod-provided slash commands. Use when the user asks to add a custom \u002Fcommand, slash command, command shortcut, scoped conversation-backed command, or command-driven panel behavior.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2324,2325,2326],{"name":2254,"slug":2255,"type":16},{"name":2257,"slug":2258,"type":16},{"name":2327,"slug":2328,"type":16},"CLI","cli","2026-07-13T06:23:18.266798",{"slug":2331,"name":2331,"fn":2332,"description":2333,"org":2334,"tags":2335,"stars":2262,"repoUrl":2263,"updatedAt":2340},"customizing-statusline","customize Letta Code statusline mods","Creates, edits, and migrates Letta Code statusline mods. Use when handling the \u002Fstatusline command or continuing work started by \u002Fstatusline.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2336,2337],{"name":2327,"slug":2328,"type":16},{"name":2338,"slug":2339,"type":16},"Engineering","engineering","2026-07-13T06:23:27.465985",{"slug":2342,"name":2342,"fn":2343,"description":2344,"org":2345,"tags":2346,"stars":2262,"repoUrl":2263,"updatedAt":2352},"dispatching-coding-agents","dispatch stateless coding agents","Dispatch stateless coding agents (Claude Code or Codex) via Bash. Use when you're stuck, need a second opinion, or need parallel research on a hard problem. They have no memory — you must provide all context.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2347,2348,2349],{"name":2254,"slug":2255,"type":16},{"name":2301,"slug":2302,"type":16},{"name":2350,"slug":2351,"type":16},"Multi-Agent","multi-agent","2026-07-26T05:46:56.388845",{"slug":2354,"name":2354,"fn":2355,"description":2356,"org":2357,"tags":2358,"stars":2262,"repoUrl":2263,"updatedAt":2368},"editing-letta-code-desktop-preferences","edit Letta Code Desktop preferences","Edits Letta Code Desktop (LCD) preferences by safely reading and updating ~\u002F.letta\u002Fdesktop_preferences.json. Use only when the user asks to change current Desktop\u002FLCD settings such as theme, default working directory, remote access preference, or remote environment name via the preferences JSON.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2359,2362,2365],{"name":2360,"slug":2361,"type":16},"Configuration","configuration",{"name":2363,"slug":2364,"type":16},"Desktop","desktop",{"name":2366,"slug":2367,"type":16},"Themes","themes","2026-07-13T06:23:41.407811",{"slug":2370,"name":2370,"fn":2371,"description":2372,"org":2373,"tags":2374,"stars":2262,"repoUrl":2263,"updatedAt":2379},"finding-agents","locate and manage agents on server","Find other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2375,2376],{"name":2254,"slug":2255,"type":16},{"name":2377,"slug":2378,"type":16},"Management","management","2026-07-16T06:02:17.297841",{"slug":2381,"name":2381,"fn":2382,"description":2383,"org":2384,"tags":2385,"stars":2262,"repoUrl":2263,"updatedAt":2391},"generating-mod-envs","generate Letta mod learning environments","Generates and reviews mod learning env JSON files for Letta Code local mods. Use when asked to teach, learn, or optimize a mod behavior; create, draft, validate, improve, or explain envs for `\u002Fmods learn --env`; or design evaluation scenarios, memory fixtures, requiredResultMarkers, requiredTraceMarkers, negative controls, and candidate diversity hints.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2386,2387,2390],{"name":2254,"slug":2255,"type":16},{"name":2388,"slug":2389,"type":16},"AI Infrastructure","ai-infrastructure",{"name":2360,"slug":2361,"type":16},"2026-07-13T06:23:08.838181",{"slug":22,"name":22,"fn":2393,"description":2394,"org":2395,"tags":2396,"stars":2262,"repoUrl":2263,"updatedAt":2402},"generate images from text prompts","Generate images from text prompts (and optionally edit\u002Fremix input images). Use when the user asks to create, generate, draw, render, or edit an image, illustration, logo, icon, diagram, or photo.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2397,2398,2401],{"name":14,"slug":15,"type":16},{"name":2399,"slug":2400,"type":16},"Graphics","graphics",{"name":21,"slug":22,"type":16},"2026-07-13T06:23:06.189403",69,{"items":2405,"total":2517},[2406,2420,2435,2454,2467,2488,2498],{"slug":2407,"name":2407,"fn":2408,"description":2409,"org":2410,"tags":2411,"stars":23,"repoUrl":24,"updatedAt":2419},"1password","manage secrets with 1Password CLI","Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading\u002Finjecting\u002Frunning secrets via op.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2412,2415,2416],{"name":2413,"slug":2414,"type":16},"Authentication","authentication",{"name":2327,"slug":2328,"type":16},{"name":2417,"slug":2418,"type":16},"Security","security","2026-07-13T06:24:39.504387",{"slug":2421,"name":2421,"fn":2422,"description":2423,"org":2424,"tags":2425,"stars":23,"repoUrl":24,"updatedAt":2434},"agent-slack","automate Slack messaging and workflows","Slack automation CLI — read\u002Fsend\u002Fsearch messages, browse threads and channels, manage channels, download attachments, look up users, and run workflows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2426,2427,2428,2431],{"name":2257,"slug":2258,"type":16},{"name":2327,"slug":2328,"type":16},{"name":2429,"slug":2430,"type":16},"Messaging","messaging",{"name":2432,"slug":2433,"type":16},"Slack","slack","2026-07-13T06:23:51.908511",{"slug":2436,"name":2436,"fn":2437,"description":2438,"org":2439,"tags":2440,"stars":23,"repoUrl":24,"updatedAt":2453},"ai-news","fetch and summarize AI news","Fetch and summarize recent AI news from curated RSS feeds (Hugging Face, VentureBeat, The Verge, OpenAI, Anthropic, DeepMind, etc.) and YouTube channels (Yannic Kilcher, Two Minute Papers, AI Explained, etc.). Also fetches full transcripts for specific YouTube videos. Use when the user asks about recent AI news, what's happened in AI lately, summaries of AI research or product announcements, or wants a digest of what's going on in the AI space.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2441,2444,2447,2450],{"name":2442,"slug":2443,"type":16},"Communications","communications",{"name":2445,"slug":2446,"type":16},"LLM","llm",{"name":2448,"slug":2449,"type":16},"Research","research",{"name":2451,"slug":2452,"type":16},"Summarization","summarization","2026-07-13T06:24:20.520223",{"slug":2455,"name":2455,"fn":2456,"description":2457,"org":2458,"tags":2459,"stars":23,"repoUrl":24,"updatedAt":2466},"creating-letta-code-channels","build and debug Letta Code channels","Builds and debugs Letta Code channels, including first-party channel adapters and dynamic user channel plugins under ~\u002F.letta\u002Fchannels. Use when adding Telegram, WhatsApp, Bluesky, Slack, Discord, or custom channel support; testing channel routing, pairing, MessageChannel, runtime dependencies, or channel plugin manifests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2460,2461,2464,2465],{"name":2254,"slug":2255,"type":16},{"name":2462,"slug":2463,"type":16},"API Development","api-development",{"name":2429,"slug":2430,"type":16},{"name":2432,"slug":2433,"type":16},"2026-07-13T06:25:55.843495",{"slug":2468,"name":2468,"fn":2469,"description":2470,"org":2471,"tags":2472,"stars":23,"repoUrl":24,"updatedAt":2487},"datadog","query Datadog observability data","Query Datadog observability data (logs, metrics, monitors, dashboards, hosts) via direct API. Use when investigating production issues, checking monitors, searching logs, or accessing Datadog data.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2473,2475,2478,2481,2484],{"name":2474,"slug":2468,"type":16},"Datadog",{"name":2476,"slug":2477,"type":16},"Logs","logs",{"name":2479,"slug":2480,"type":16},"Metrics","metrics",{"name":2482,"slug":2483,"type":16},"Monitoring","monitoring",{"name":2485,"slug":2486,"type":16},"Observability","observability","2026-07-13T06:24:27.990605",{"slug":2489,"name":2489,"fn":2490,"description":2491,"org":2492,"tags":2493,"stars":23,"repoUrl":24,"updatedAt":2497},"discord","automate Discord server and channel tasks","Discord automation CLI — send\u002Fread\u002Fsearch messages, manage channels and servers, react, create threads, pin messages, and look up users.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2494,2495,2496],{"name":2257,"slug":2258,"type":16},{"name":2327,"slug":2328,"type":16},{"name":2429,"slug":2430,"type":16},"2026-07-13T06:24:26.62387",{"slug":2499,"name":2499,"fn":2500,"description":2501,"org":2502,"tags":2503,"stars":23,"repoUrl":24,"updatedAt":2516},"doc","create and edit Word documents","Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus the bundled `scripts\u002Frender_docx.py` for visual checks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2504,2507,2510,2513],{"name":2505,"slug":2506,"type":16},"Documents","documents",{"name":2508,"slug":2509,"type":16},"DOCX","docx",{"name":2511,"slug":2512,"type":16},"Office","office",{"name":2514,"slug":2515,"type":16},"Word","word","2026-07-13T06:23:44.299568",45]