[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71BY86MPBGVP93891DG7B05":3,"skill-same:01M71BY86MPBGVP93891DG7B05":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M71BY86MPBGVP93891DG7B05","bria-ai",null,"AI image generation, editing, and background removal API via Bria.ai — remove backgrounds to get transparent PNGs and cutouts, generate images from text prompts, and edit photos with natural language instructions. Also create product photography and lifestyle shots, replace or blur backgrounds, upscale resolution, restyle, and batch-generate visual assets. Use this skill whenever the user wants to remove a background, create transparent PNGs, generate, edit, modify, or transform any image — including hero images, banners, social media visuals, product photos, illustrations, icons, thumbnails, ad creatives, or marketing materials. Also triggers on cutout, inpainting, outpainting, object removal or addition, photo restoration, style transfer, image enhancement, relight, reseason, sketch-to-photo, or any visual content creation. Commercially safe, royalty-free. 20+ specialized endpoints for e-commerce, web design, and content pipelines.","strmt7\u002Fai_skills_collection_benchmarked","strmt7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F28989754?v=4","01M71929P914SWKQ7QJV24NBBY","Stratos","01M71929Q9VGKQ7PWYR95VSQQQ",1,"MIT","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcreative-media-design\u002Flatest-release-creative\u002Fbria-ai\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcreative-media-design\u002Flatest-release-creative\u002Fbria-ai\u002FSKILL.md",[],[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"bria ai","remove","visual content","create product","enhancement","e-commerce","free","content creation","photography","thumbnails","design","edit","specialized","text","Media","batch","generate","create","safe","image","2026-11-10 10:12:30",false,"---\nname: bria-ai\ndescription: AI image generation, editing, and background removal API via Bria.ai — remove backgrounds to get transparent PNGs and cutouts, generate images from text prompts, and edit photos with natural language instructions. Also create product photography and lifestyle shots, replace or blur backgrounds, upscale resolution, restyle, and batch-generate visual assets. Use this skill whenever the user wants to remove a background, create transparent PNGs, generate, edit, modify, or transform any image — including hero images, banners, social media visuals, product photos, illustrations, icons, thumbnails, ad creatives, or marketing materials. Also triggers on cutout, inpainting, outpainting, object removal or addition, photo restoration, style transfer, image enhancement, relight, reseason, sketch-to-photo, or any visual content creation. Commercially safe, royalty-free. 20+ specialized endpoints for e-commerce, web design, and content pipelines.\nlicense: MIT\nmetadata:\n  author: Bria AI\n  version: \"1.3.1\"\n---\n\n# Bria — AI Image Generation, Editing & Background Removal\n\nCommercially safe, royalty-free image generation and editing through 20+ API endpoints. Generate from text, edit with natural language, remove backgrounds, create product shots, and build automated image pipelines.\n\nFor additional endpoint details beyond what is documented here, see the [Bria API reference for agents](https:\u002F\u002Fdocs.bria.ai\u002Fllms.txt).\n\n## When to Use This Skill\n\nUse this skill when the user wants to:\n- **Generate images** — \"create an image of...\", \"make me a banner\", \"generate a hero image\", \"I need a product photo\"\n- **Edit images** — \"change the background\", \"make it look like winter\", \"add a vase to the table\", \"remove the person\"\n- **Remove\u002Freplace backgrounds** — \"make the background transparent\", \"cut out the product\", \"replace with a studio background\"\n- **Product photography** — \"create a lifestyle shot\", \"place this product in a kitchen scene\", \"e-commerce packshot\"\n- **Enhance\u002Ftransform** — \"upscale this image\", \"make it higher resolution\", \"restyle as oil painting\", \"change the lighting\"\n- **Batch\u002Fpipeline** — \"generate 10 product images\", \"process all these images\", \"remove backgrounds in bulk\"\n\nThis skill handles the full spectrum of AI image operations. If the user mentions images, photos, visuals, or any visual content creation — use this skill.\n\n---\n\n## What You Can Build\n\n- **E-commerce product catalog** — Generate product photos, remove backgrounds for transparent PNGs, place products in lifestyle scenes (kitchen, office, outdoor), create packshots with consistent style\n- **Landing page visuals** — Generate hero images, abstract tech backgrounds, team photos, and section illustrations — all matching your brand aesthetic\n- **Social media content** — Instagram posts (1:1), Stories\u002FReels (9:16), LinkedIn banners (16:9), ad creatives — batch-generate variants for A\u002FB testing\n- **Marketing campaign assets** — Seasonal transformations (summer→winter), restyle product shots for different markets, create localized visuals at scale\n- **Photo restoration pipeline** — Restore old damaged photos, colorize black & white images, upscale low-res photos to 4x, enhance quality automatically\n- **Brand asset toolkit** — Remove backgrounds from logos, blend artwork onto products (t-shirts, mugs), create consistent product photography across your entire catalog\n- **AI-powered design workflows** — Chain operations: generate→edit→remove background→place in scene→upscale — all automated through API pipelines\n\n---\n\n## Setup — Authentication\n\nBefore making any API call, you need a valid Bria access token.\n\n### Step 1: Check for existing credentials\n\n```bash\nif [ -f ~\u002F.bria\u002Fcredentials ]; then\n  BRIA_ACCESS_TOKEN=$(grep '^access_token=' \"$HOME\u002F.bria\u002Fcredentials\" | cut -d= -f2-)\n  BRIA_API_KEY=$(grep '^api_token=' \"$HOME\u002F.bria\u002Fcredentials\" | cut -d= -f2-)\nfi\nif [ -z \"$BRIA_ACCESS_TOKEN\" ]; then\n  echo \"NO_CREDENTIALS\"\nelif [ -n \"$BRIA_API_KEY\" ]; then\n  echo \"READY\"\nelse\n  echo \"CREDENTIALS_FOUND\"\nfi\n```\n\nIf the output is `READY`, skip straight to making API calls — no introspection needed.\nIf the output is `CREDENTIALS_FOUND`, skip to Step 3.\nIf the output is `NO_CREDENTIALS`, proceed to Step 2.\n\n### Step 2: Authenticate via device authorization\n\nStart the device authorization flow:\n\n**2a. Request a device code:**\n\n```bash\nDEVICE_RESPONSE=$(curl -s -X POST \"https:\u002F\u002Fengine.prod.bria-api.com\u002Fv2\u002Fauth\u002Fdevice\u002Fauthorize\" \\\n  -H \"Content-Type: application\u002Fjson\")\necho \"$DEVICE_RESPONSE\"\n```\n\nParse the response fields:\n- `device_code` — used to poll for the token (keep this, don't show to user)\n- `user_code` — the code the user must enter (e.g. `BRIA-XXXX`)\n- `interval` — seconds between poll attempts\n\n**2b. Show the user a single sign-in link.** Tell them exactly this — nothing more:\n\n> **Connect your Bria account:** [Click here to sign in](https:\u002F\u002Fplatform.bria.ai\u002Fdevice\u002Fverify?user_code={user_code})\n> Your code is **{user_code}** — it's already filled in.\n\nDo NOT show two links. Do NOT show the raw URL separately. Do NOT use `verification_uri` from the API response. Keep it to one clickable link.\n\n**2c. Poll for the token.** After showing the user the code, immediately start polling. Try up to 60 times with the given interval (default 5 seconds):\n\n```bash\nfor i in $(seq 1 60); do\n  TOKEN_RESPONSE=$(curl -s -X POST \"https:\u002F\u002Fengine.prod.bria-api.com\u002Fv2\u002Fauth\u002Ftoken\" \\\n    -d \"grant_type=urn:ietf:params:oauth:grant-type:device_code\" \\\n    -d \"device_code=$DEVICE_CODE\")\n  ACCESS_TOKEN=$(printf '%s' \"$TOKEN_RESPONSE\" | sed -n 's\u002F.*\"access_token\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\n  if [ -n \"$ACCESS_TOKEN\" ]; then\n    BRIA_ACCESS_TOKEN=\"$ACCESS_TOKEN\"\n    REFRESH_TOKEN=$(printf '%s' \"$TOKEN_RESPONSE\" | sed -n 's\u002F.*\"refresh_token\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\n    mkdir -p ~\u002F.bria\n    printf 'access_token=%s\\nrefresh_token=%s\\n' \"$BRIA_ACCESS_TOKEN\" \"$REFRESH_TOKEN\" > \"$HOME\u002F.bria\u002Fcredentials\"\n    echo \"AUTHENTICATED\"\n    break\n  fi\n  sleep 5\ndone\n```\n\nIf the output contains `AUTHENTICATED`, proceed to Step 3. Otherwise the code expired — start over from Step 2a.\n\n**Do not proceed with any API call until authentication is confirmed.**\n\n### Step 3: Verify billing status and resolve API key\n\nIntrospect the bearer token to check billing status and obtain the real API key for Bria API calls:\n\n```bash\nINTROSPECT=$(curl -s -X POST \"https:\u002F\u002Fengine.prod.bria-api.com\u002Fv2\u002Fauth\u002Ftoken\u002Fintrospect\" \\\n  -d \"token=$BRIA_ACCESS_TOKEN\")\nBILLING_STATUS=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"billing_status\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\nif [ \"$BILLING_STATUS\" = \"blocked\" ]; then\n  BILLING_MSG=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"billing_message\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\n  echo \"BILLING_ERROR: $BILLING_MSG\"\nfi\nACTIVE=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"active\" *: *\\([^,}]*\\).*\u002F\\1\u002Fp' | tr -d ' ')\nif [ \"$ACTIVE\" = \"false\" ]; then\n  # Clear stale tokens so re-auth starts fresh (credentials file is re-created in Step 2c)\n  printf '' > \"$HOME\u002F.bria\u002Fcredentials\"\n  echo \"TOKEN_EXPIRED\"\nfi\nBRIA_API_KEY=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"api_token\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\nif [ -n \"$BRIA_API_KEY\" ]; then\n  grep -v '^api_token=' \"$HOME\u002F.bria\u002Fcredentials\" > \"$HOME\u002F.bria\u002Fcredentials.tmp\" 2>\u002Fdev\u002Fnull || true\n  printf 'api_token=%s\\n' \"$BRIA_API_KEY\" >> \"$HOME\u002F.bria\u002Fcredentials.tmp\"\n  mv \"$HOME\u002F.bria\u002Fcredentials.tmp\" \"$HOME\u002F.bria\u002Fcredentials\"\nfi\n```\n\nInterpret the output:\n- If it prints `BILLING_ERROR: ...` — relay the message to the user exactly as shown and **stop**. Do not make any API calls.\n- If it prints `TOKEN_EXPIRED` — the session is no longer valid. Tell the user their session expired and restart from Step 2.\n- Otherwise, `BRIA_API_KEY` now contains the real API key and is cached for future calls. Proceed to the next section.\n\n---\n\n## Core Capabilities\n\n| Need | Capability | Use Case |\n|------|------------|----------|\n| Generate images from text | FIBO Generate | Hero images, product shots, illustrations, social media images, banners |\n| Edit images by text instruction | FIBO-Edit | Change colors, modify objects, transform scenes |\n| Edit image region with mask | GenFill\u002FErase | Precise inpainting, add\u002Freplace specific regions |\n| Add\u002FReplace\u002FRemove objects | Text-based editing | Add vase, replace apple with pear, remove table |\n| Remove background (transparent PNG) | RMBG-2.0 | Extract subjects for overlays, logos, cutouts |\n| Replace\u002Fblur\u002Ferase background | Background ops | Change, blur, or remove backgrounds |\n| Expand\u002Foutpaint images | Outpainting | Extend boundaries, change aspect ratios |\n| Upscale image resolution | Super Resolution | Increase resolution 2x or 4x |\n| Enhance image quality | Enhancement | Improve lighting, colors, details |\n| Restyle images | Restyle | Oil painting, anime, cartoon, 3D render |\n| Change lighting | Relight | Golden hour, spotlight, dramatic lighting |\n| Change season | Reseason | Spring, summer, autumn, winter |\n| Composite\u002Fblend images | Image Blending | Apply textures, logos, merge images |\n| Restore old photos | Restoration | Fix old\u002Fdamaged photos |\n| Colorize images | Colorization | Add color to B&W, or convert to B&W |\n| Sketch to photo | Sketch2Image | Convert drawings to realistic photos |\n| Create product lifestyle shots | Lifestyle Shot | Place products in scenes for e-commerce |\n| Integrate products into scenes | Product Integrate | Embed products at exact coordinates |\n\n## How to Call Any Endpoint\n\nUse `bria_call` for all API calls. It handles URL passthrough, local file base64 encoding, JSON construction, API call, and async polling in a single function call. The API key is auto-loaded from `~\u002F.bria\u002Fcredentials`.\n\n**First**, source the helper script at `references\u002Fcode-examples\u002Fbria_client.sh` (resolve relative to this skill's directory).\n\n```bash\nsource \u003CSKILL_DIR>\u002Freferences\u002Fcode-examples\u002Fbria_client.sh\n\n# Generate (no image input — pass empty string)\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fgenerate \"\" '\"prompt\": \"your description\", \"aspect_ratio\": \"16:9\", \"sync\": true')\n\n# Remove background\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit\u002Fremove_background \"\u002Fpath\u002Fto\u002Flocal\u002Fimage.png\")\n\n# Replace background\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit\u002Freplace_background \"https:\u002F\u002Fexample.com\u002Fimg.jpg\" '\"prompt\": \"sunset beach\"')\n\n# Edit image (uses images array — pass --key images)\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit \"\u002Fpath\u002Fto\u002Fimage.png\" --key images '\"instruction\": \"make it look warmer\"')\n\n# Upscale\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit\u002Fincrease_resolution \"https:\u002F\u002Fexample.com\u002Fimg.jpg\" '\"scale\": 4')\n\n# Lifestyle shot\nRESULT=$(bria_call \u002Fv1\u002Fproduct\u002Flifestyle_shot_by_text \"\u002Fpath\u002Fto\u002Fproduct.png\" '\"prompt\": \"modern kitchen countertop\"')\n\necho \"$RESULT\"\n```\n\n**Calling convention:** `bria_call \u003Cendpoint> \u003Cimage_or_empty> [--key \u003Cjson_key>] [extra JSON fields...]`\n- Pass a URL, local file path, or `\"\"` (empty) for endpoints without image input\n- Use `--key images` when the endpoint expects an `images` array instead of `image`\n- Extra JSON fields are appended as key-value pairs: `'\"key\": \"value\"'`\n- Returns the result image URL on success, or prints an error to stderr\n\n**Generation options:** Aspect ratios `1:1`, `16:9`, `4:3`, `9:16`, `3:4`. Resolution `1MP` (default) or `4MP` (more detail, +30s). Pass `\"sync\": true` for single images.\n\n> **Advanced**: For precise control over generation, use the **vgl** skill for structured VGL JSON prompts instead of natural language.\n\nSee **[API Endpoints Reference](references\u002Fapi-endpoints.md)** for full parameter documentation on all 20+ endpoints.\n\n---\n\n## Prompt Engineering Tips\n\n- **Style**: \"professional product photography\" vs \"casual snapshot\", \"flat design illustration\" vs \"3D rendered\"\n- **Lighting**: \"soft natural light\", \"studio lighting\", \"dramatic shadows\"\n- **Background**: \"white studio\", \"gradient\", \"blurred office\", \"transparent\"\n- **Composition**: \"centered\", \"rule of thirds\", \"negative space on left for text\"\n- **Quality keywords**: \"high quality\", \"professional\", \"commercial grade\", \"4K\", \"sharp focus\"\n- **Negative prompts**: \"blurry, low quality, pixelated\", \"text, watermark, logo\"\n\n### Recipes by Use Case\n\n**Hero banner (16:9):** `\"Modern tech startup workspace with developers collaborating, bright natural lighting, clean minimal aesthetic\"` — include \"clean background\" or \"minimal\" for text overlay space\n\n**Product photo (1:1):** `\"Professional product photo of [item] on white studio background, soft shadows, commercial photography lighting\"` — then remove background for transparent PNG\n\n**Presentation visual (16:9):** `\"Abstract visualization of data analytics, blue and purple gradient, modern corporate style, clean composition with space for text\"` — common themes: \"abstract technology\", \"business collaboration\", \"minimalist geometric patterns\"\n\n**Instagram post (1:1):** `\"Lifestyle photo of coffee and laptop on wooden desk, morning light, cozy atmosphere\"`\n\n**Story\u002FReel (9:16):** `\"Vertical product showcase of smartphone, floating in gradient background, tech aesthetic\"`\n\n---\n\n## Additional Resources\n\n- **[API Endpoints Reference](references\u002Fapi-endpoints.md)** — Complete endpoint documentation with request\u002Fresponse formats for all 20+ endpoints\n- **[Shell Client (bria_client.sh)](references\u002Fcode-examples\u002Fbria_client.sh)** — Single-function helper: `bria_call` handles auth, base64, JSON, polling\n- **[Full API docs for agents (llms.txt)](https:\u002F\u002Fdocs.bria.ai\u002Fllms.txt)** — Agent-ready Bria API reference; use when this skill's summary is not enough\n\n## Related Skills\n\n- **vgl** — Write structured VGL JSON prompts for precise, deterministic control over FIBO image generation\n- **image-utils** — Classic image manipulation (resize, crop, composite, watermarks) for post-processing\n","# Bria — AI Image Generation, Editing & Background Removal\n\nCommercially safe, royalty-free image generation and editing through 20+ API endpoints. Generate from text, edit with natural language, remove backgrounds, create product shots, and build automated image pipelines.\n\nFor additional endpoint details beyond what is documented here, see the [Bria API reference for agents](https:\u002F\u002Fdocs.bria.ai\u002Fllms.txt).\n\n## When to Use This Skill\n\nUse this skill when the user wants to:\n- **Generate images** — \"create an image of...\", \"make me a banner\", \"generate a hero image\", \"I need a product photo\"\n- **Edit images** — \"change the background\", \"make it look like winter\", \"add a vase to the table\", \"remove the person\"\n- **Remove\u002Freplace backgrounds** — \"make the background transparent\", \"cut out the product\", \"replace with a studio background\"\n- **Product photography** — \"create a lifestyle shot\", \"place this product in a kitchen scene\", \"e-commerce packshot\"\n- **Enhance\u002Ftransform** — \"upscale this image\", \"make it higher resolution\", \"restyle as oil painting\", \"change the lighting\"\n- **Batch\u002Fpipeline** — \"generate 10 product images\", \"process all these images\", \"remove backgrounds in bulk\"\n\nThis skill handles the full spectrum of AI image operations. If the user mentions images, photos, visuals, or any visual content creation — use this skill.\n\n---\n\n## What You Can Build\n\n- **E-commerce product catalog** — Generate product photos, remove backgrounds for transparent PNGs, place products in lifestyle scenes (kitchen, office, outdoor), create packshots with consistent style\n- **Landing page visuals** — Generate hero images, abstract tech backgrounds, team photos, and section illustrations — all matching your brand aesthetic\n- **Social media content** — Instagram posts (1:1), Stories\u002FReels (9:16), LinkedIn banners (16:9), ad creatives — batch-generate variants for A\u002FB testing\n- **Marketing campaign assets** — Seasonal transformations (summer→winter), restyle product shots for different markets, create localized visuals at scale\n- **Photo restoration pipeline** — Restore old damaged photos, colorize black & white images, upscale low-res photos to 4x, enhance quality automatically\n- **Brand asset toolkit** — Remove backgrounds from logos, blend artwork onto products (t-shirts, mugs), create consistent product photography across your entire catalog\n- **AI-powered design workflows** — Chain operations: generate→edit→remove background→place in scene→upscale — all automated through API pipelines\n\n---\n\n## Setup — Authentication\n\nBefore making any API call, you need a valid Bria access token.\n\n### Step 1: Check for existing credentials\n\n```bash\nif [ -f ~\u002F.bria\u002Fcredentials ]; then\n  BRIA_ACCESS_TOKEN=$(grep '^access_token=' \"$HOME\u002F.bria\u002Fcredentials\" | cut -d= -f2-)\n  BRIA_API_KEY=$(grep '^api_token=' \"$HOME\u002F.bria\u002Fcredentials\" | cut -d= -f2-)\nfi\nif [ -z \"$BRIA_ACCESS_TOKEN\" ]; then\n  echo \"NO_CREDENTIALS\"\nelif [ -n \"$BRIA_API_KEY\" ]; then\n  echo \"READY\"\nelse\n  echo \"CREDENTIALS_FOUND\"\nfi\n```\n\nIf the output is `READY`, skip straight to making API calls — no introspection needed.\nIf the output is `CREDENTIALS_FOUND`, skip to Step 3.\nIf the output is `NO_CREDENTIALS`, proceed to Step 2.\n\n### Step 2: Authenticate via device authorization\n\nStart the device authorization flow:\n\n**2a. Request a device code:**\n\n```bash\nDEVICE_RESPONSE=$(curl -s -X POST \"https:\u002F\u002Fengine.prod.bria-api.com\u002Fv2\u002Fauth\u002Fdevice\u002Fauthorize\" \\\n  -H \"Content-Type: application\u002Fjson\")\necho \"$DEVICE_RESPONSE\"\n```\n\nParse the response fields:\n- `device_code` — used to poll for the token (keep this, don't show to user)\n- `user_code` — the code the user must enter (e.g. `BRIA-XXXX`)\n- `interval` — seconds between poll attempts\n\n**2b. Show the user a single sign-in link.** Tell them exactly this — nothing more:\n\n> **Connect your Bria account:** [Click here to sign in](https:\u002F\u002Fplatform.bria.ai\u002Fdevice\u002Fverify?user_code={user_code})\n> Your code is **{user_code}** — it's already filled in.\n\nDo NOT show two links. Do NOT show the raw URL separately. Do NOT use `verification_uri` from the API response. Keep it to one clickable link.\n\n**2c. Poll for the token.** After showing the user the code, immediately start polling. Try up to 60 times with the given interval (default 5 seconds):\n\n```bash\nfor i in $(seq 1 60); do\n  TOKEN_RESPONSE=$(curl -s -X POST \"https:\u002F\u002Fengine.prod.bria-api.com\u002Fv2\u002Fauth\u002Ftoken\" \\\n    -d \"grant_type=urn:ietf:params:oauth:grant-type:device_code\" \\\n    -d \"device_code=$DEVICE_CODE\")\n  ACCESS_TOKEN=$(printf '%s' \"$TOKEN_RESPONSE\" | sed -n 's\u002F.*\"access_token\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\n  if [ -n \"$ACCESS_TOKEN\" ]; then\n    BRIA_ACCESS_TOKEN=\"$ACCESS_TOKEN\"\n    REFRESH_TOKEN=$(printf '%s' \"$TOKEN_RESPONSE\" | sed -n 's\u002F.*\"refresh_token\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\n    mkdir -p ~\u002F.bria\n    printf 'access_token=%s\\nrefresh_token=%s\\n' \"$BRIA_ACCESS_TOKEN\" \"$REFRESH_TOKEN\" > \"$HOME\u002F.bria\u002Fcredentials\"\n    echo \"AUTHENTICATED\"\n    break\n  fi\n  sleep 5\ndone\n```\n\nIf the output contains `AUTHENTICATED`, proceed to Step 3. Otherwise the code expired — start over from Step 2a.\n\n**Do not proceed with any API call until authentication is confirmed.**\n\n### Step 3: Verify billing status and resolve API key\n\nIntrospect the bearer token to check billing status and obtain the real API key for Bria API calls:\n\n```bash\nINTROSPECT=$(curl -s -X POST \"https:\u002F\u002Fengine.prod.bria-api.com\u002Fv2\u002Fauth\u002Ftoken\u002Fintrospect\" \\\n  -d \"token=$BRIA_ACCESS_TOKEN\")\nBILLING_STATUS=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"billing_status\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\nif [ \"$BILLING_STATUS\" = \"blocked\" ]; then\n  BILLING_MSG=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"billing_message\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\n  echo \"BILLING_ERROR: $BILLING_MSG\"\nfi\nACTIVE=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"active\" *: *\\([^,}]*\\).*\u002F\\1\u002Fp' | tr -d ' ')\nif [ \"$ACTIVE\" = \"false\" ]; then\n  # Clear stale tokens so re-auth starts fresh (credentials file is re-created in Step 2c)\n  printf '' > \"$HOME\u002F.bria\u002Fcredentials\"\n  echo \"TOKEN_EXPIRED\"\nfi\nBRIA_API_KEY=$(printf '%s' \"$INTROSPECT\" | sed -n 's\u002F.*\"api_token\" *: *\"\\([^\"]*\\)\".*\u002F\\1\u002Fp')\nif [ -n \"$BRIA_API_KEY\" ]; then\n  grep -v '^api_token=' \"$HOME\u002F.bria\u002Fcredentials\" > \"$HOME\u002F.bria\u002Fcredentials.tmp\" 2>\u002Fdev\u002Fnull || true\n  printf 'api_token=%s\\n' \"$BRIA_API_KEY\" >> \"$HOME\u002F.bria\u002Fcredentials.tmp\"\n  mv \"$HOME\u002F.bria\u002Fcredentials.tmp\" \"$HOME\u002F.bria\u002Fcredentials\"\nfi\n```\n\nInterpret the output:\n- If it prints `BILLING_ERROR: ...` — relay the message to the user exactly as shown and **stop**. Do not make any API calls.\n- If it prints `TOKEN_EXPIRED` — the session is no longer valid. Tell the user their session expired and restart from Step 2.\n- Otherwise, `BRIA_API_KEY` now contains the real API key and is cached for future calls. Proceed to the next section.\n\n---\n\n## Core Capabilities\n\n| Need | Capability | Use Case |\n|------|------------|----------|\n| Generate images from text | FIBO Generate | Hero images, product shots, illustrations, social media images, banners |\n| Edit images by text instruction | FIBO-Edit | Change colors, modify objects, transform scenes |\n| Edit image region with mask | GenFill\u002FErase | Precise inpainting, add\u002Freplace specific regions |\n| Add\u002FReplace\u002FRemove objects | Text-based editing | Add vase, replace apple with pear, remove table |\n| Remove background (transparent PNG) | RMBG-2.0 | Extract subjects for overlays, logos, cutouts |\n| Replace\u002Fblur\u002Ferase background | Background ops | Change, blur, or remove backgrounds |\n| Expand\u002Foutpaint images | Outpainting | Extend boundaries, change aspect ratios |\n| Upscale image resolution | Super Resolution | Increase resolution 2x or 4x |\n| Enhance image quality | Enhancement | Improve lighting, colors, details |\n| Restyle images | Restyle | Oil painting, anime, cartoon, 3D render |\n| Change lighting | Relight | Golden hour, spotlight, dramatic lighting |\n| Change season | Reseason | Spring, summer, autumn, winter |\n| Composite\u002Fblend images | Image Blending | Apply textures, logos, merge images |\n| Restore old photos | Restoration | Fix old\u002Fdamaged photos |\n| Colorize images | Colorization | Add color to B&W, or convert to B&W |\n| Sketch to photo | Sketch2Image | Convert drawings to realistic photos |\n| Create product lifestyle shots | Lifestyle Shot | Place products in scenes for e-commerce |\n| Integrate products into scenes | Product Integrate | Embed products at exact coordinates |\n\n## How to Call Any Endpoint\n\nUse `bria_call` for all API calls. It handles URL passthrough, local file base64 encoding, JSON construction, API call, and async polling in a single function call. The API key is auto-loaded from `~\u002F.bria\u002Fcredentials`.\n\n**First**, source the helper script at `references\u002Fcode-examples\u002Fbria_client.sh` (resolve relative to this skill's directory).\n\n```bash\nsource \u003CSKILL_DIR>\u002Freferences\u002Fcode-examples\u002Fbria_client.sh\n\n# Generate (no image input — pass empty string)\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fgenerate \"\" '\"prompt\": \"your description\", \"aspect_ratio\": \"16:9\", \"sync\": true')\n\n# Remove background\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit\u002Fremove_background \"\u002Fpath\u002Fto\u002Flocal\u002Fimage.png\")\n\n# Replace background\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit\u002Freplace_background \"https:\u002F\u002Fexample.com\u002Fimg.jpg\" '\"prompt\": \"sunset beach\"')\n\n# Edit image (uses images array — pass --key images)\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit \"\u002Fpath\u002Fto\u002Fimage.png\" --key images '\"instruction\": \"make it look warmer\"')\n\n# Upscale\nRESULT=$(bria_call \u002Fv2\u002Fimage\u002Fedit\u002Fincrease_resolution \"https:\u002F\u002Fexample.com\u002Fimg.jpg\" '\"scale\": 4')\n\n# Lifestyle shot\nRESULT=$(bria_call \u002Fv1\u002Fproduct\u002Flifestyle_shot_by_text \"\u002Fpath\u002Fto\u002Fproduct.png\" '\"prompt\": \"modern kitchen countertop\"')\n\necho \"$RESULT\"\n```\n\n**Calling convention:** `bria_call \u003Cendpoint> \u003Cimage_or_empty> [--key \u003Cjson_key>] [extra JSON fields...]`\n- Pass a URL, local file path, or `\"\"` (empty) for endpoints without image input\n- Use `--key images` when the endpoint expects an `images` array instead of `image`\n- Extra JSON fields are appended as key-value pairs: `'\"key\": \"value\"'`\n- Returns the result image URL on success, or prints an error to stderr\n\n**Generation options:** Aspect ratios `1:1`, `16:9`, `4:3`, `9:16`, `3:4`. Resolution `1MP` (default) or `4MP` (more detail, +30s). Pass `\"sync\": true` for single images.\n\n> **Advanced**: For precise control over generation, use the **vgl** skill for structured VGL JSON prompts instead of natural language.\n\nSee **[API Endpoints Reference](references\u002Fapi-endpoints.md)** for full parameter documentation on all 20+ endpoints.\n\n---\n\n## Prompt Engineering Tips\n\n- **Style**: \"professional product photography\" vs \"casual snapshot\", \"flat design illustration\" vs \"3D rendered\"\n- **Lighting**: \"soft natural light\", \"studio lighting\", \"dramatic shadows\"\n- **Background**: \"white studio\", \"gradient\", \"blurred office\", \"transparent\"\n- **Composition**: \"centered\", \"rule of thirds\", \"negative space on left for text\"\n- **Quality keywords**: \"high quality\", \"professional\", \"commercial grade\", \"4K\", \"sharp focus\"\n- **Negative prompts**: \"blurry, low quality, pixelated\", \"text, watermark, logo\"\n\n### Recipes by Use Case\n\n**Hero banner (16:9):** `\"Modern tech startup workspace with developers collaborating, bright natural lighting, clean minimal aesthetic\"` — include \"clean background\" or \"minimal\" for text overlay space\n\n**Product photo (1:1):** `\"Professional product photo of [item] on white studio background, soft shadows, commercial photography lighting\"` — then remove background for transparent PNG\n\n**Presentation visual (16:9):** `\"Abstract visualization of data analytics, blue and purple gradient, modern corporate style, clean composition with space for text\"` — common themes: \"abstract technology\", \"business collaboration\", \"minimalist geometric patterns\"\n\n**Instagram post (1:1):** `\"Lifestyle photo of coffee and laptop on wooden desk, morning light, cozy atmosphere\"`\n\n**Story\u002FReel (9:16):** `\"Vertical product showcase of smartphone, floating in gradient background, tech aesthetic\"`\n\n---\n\n## Additional Resources\n\n- **[API Endpoints Reference](references\u002Fapi-endpoints.md)** — Complete endpoint documentation with request\u002Fresponse formats for all 20+ endpoints\n- **[Shell Client (bria_client.sh)](references\u002Fcode-examples\u002Fbria_client.sh)** — Single-function helper: `bria_call` handles auth, base64, JSON, polling\n- **[Full API docs for agents (llms.txt)](https:\u002F\u002Fdocs.bria.ai\u002Fllms.txt)** — Agent-ready Bria API reference; use when this skill's summary is not enough\n\n## Related Skills\n\n- **vgl** — Write structured VGL JSON prompts for precise, deterministic control over FIBO image generation\n- **image-utils** — Classic image manipulation (resize, crop, composite, watermarks) for post-processing\n",{"name":5,"license":15,"metadata":45,"description":7},{"author":46,"version":47},"Bria AI","1.3.1","main","5c95bcac4646c5aed06bd9aed5235cfc7985aafc","included\u002Fskills\u002Fby-category\u002Fcreative-media-design\u002Flatest-release-creative\u002Fbria-ai",0,"https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked","https:\u002F\u002Fgithub.com\u002Fstrmt7","2026-11-15 03:31:57",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add strmt7\u002Fai_skills_collection_benchmarked --skill bria-ai",{"tool":61,"command":62},"bunx","bunx skills add strmt7\u002Fai_skills_collection_benchmarked --skill bria-ai",{"tool":64,"command":65},"pnpm","pnpm dlx skills add strmt7\u002Fai_skills_collection_benchmarked --skill bria-ai","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcreative-media-design\u002Flatest-release-creative\u002Fbria-ai\u002FSKILL.md",true,[69,74,80],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":16},"LICENSE.txt","LICENSE","许可证",1335,{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fapi-endpoints.md","REFERENCE","参考文档",13043,"https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcreative-media-design\u002Flatest-release-creative\u002Fbria-ai\u002Freferences\u002Fapi-endpoints.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fcode-examples\u002Fbria_client.sh","SCRIPT","脚本",4244,"https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fskills\u002Fby-category\u002Fcreative-media-design\u002Flatest-release-creative\u002Fbria-ai\u002Freferences\u002Fcode-examples\u002Fbria_client.sh",[87,97,105,113,121,129],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":96},"01M7DW2581D1Y3DDP19WB9YDH5","makefile-generator-project-wrappers","Repair Python, Java and generic GNU Make wrappers that report false success, miss changed inputs or clean dependency environments. Preserve the actual project build system and test runner; use when adapting the collection's original Makefile generator.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Frepaired\u002Fskills\u002Fby-category\u002Fcoding-refactoring-repository-automation\u002Flatest-release-devops\u002Fmakefile-generator-project-wrappers\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Frepaired\u002Fskills\u002Fby-category\u002Fcoding-refactoring-repository-automation\u002Flatest-release-devops\u002Fmakefile-generator-project-wrappers\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":96},"01M7DW2211BEE12DKN7WH7W47N","makefile-generator-go","Author or repair GNU Make wrappers for Go modules, retaining Go's dependency discovery and build cache. Use when wrapper timestamps hide embedded-resource changes or build failures; preserve the project's existing build system and real test commands.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Frepaired\u002Fskills\u002Fby-category\u002Fcoding-refactoring-repository-automation\u002Flatest-release-devops\u002Fmakefile-generator-go\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Frepaired\u002Fskills\u002Fby-category\u002Fcoding-refactoring-repository-automation\u002Flatest-release-devops\u002Fmakefile-generator-go\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":96},"01M7DW1XG2S6E2Y8PHH4X8ZDJB","strategic-compact-resume","Checkpoint and resume long agent work when context pressure or a handoff could lose constraints, verified progress, or ownership of active jobs.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Fstrategic-compact-resume\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Fstrategic-compact-resume\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":96},"01M7DW1J8H38SF679MPPAY8HCF","makefile-generator-cpp","Author or repair GNU Make builds for C++ executables, preserving compiler\u002Flinker flags, header dependencies and real project test contracts. Use the optional scaffold for a flat src directory; retain an existing build system unless the task requires changing it.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Fmakefile-generator-cpp\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Fmakefile-generator-cpp\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":96},"01M7DW1EA5ZBYTMGPB4JG1F172","eval-harness-integrity","Design and verify matched coding-agent evaluations when comparing skills, prompts, models, or harnesses using executable acceptance checks and native result evidence.","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Feval-harness-integrity\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Feval-harness-integrity\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":132,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":96},"01M7DW1BG1Y8KTWTXQ86VQXYRJ","eval-harness-evidence","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Feval-harness-evidence\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fstrmt7\u002Fai_skills_collection_benchmarked\u002Fblob\u002Fmain\u002Fincluded\u002Fimproved\u002Fskills\u002Feval-harness-evidence\u002FSKILL.md",[],[]]