[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FCRY35J5ZCHGG1TSAQDFHD":3,"skill-same:01M6FCRY35J5ZCHGG1TSAQDFHD":52},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M6FCRY35J5ZCHGG1TSAQDFHD","background-remove",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmichaelboeding\u002Fskills\u002Fbackground-remove\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24],"remove","background remove","2026-11-10 10:12:30",false,"# Background Remove Skill\n\nRemove backgrounds from images using AI (rembg\u002FU2-Net) or built-in methods.\n\n**Output:** PNG or WebP with transparent background.\n\n## Quick Examples\n\n| User Says | What Happens |\n|-----------|--------------|\n| \"Remove the background from this photo\" | AI removes background, outputs PNG |\n| \"Make this image transparent\" | Removes background, preserves subject |\n| \"Cut out the product from this image\" | Isolates subject with clean edges |\n| \"Remove backgrounds from all images in \u002Fphotos\" | Batch processes multiple images |\n| \"Quick background removal, white background\" | Uses fast built-in method |\n\n## Prerequisites\n\n- `rembg` - AI-based background removal (recommended)\n  ```bash\n  pip install rembg\n  # Or with GPU acceleration (faster, requires CUDA)\n  pip install rembg[gpu]\n  ```\n\n- `Pillow` - Required for image processing\n  ```bash\n  pip install Pillow\n  ```\n\nThe first run will download the U2-Net model (~170MB) which is cached for future use.\n\n## Methods\n\n| Method | Description | Best For |\n|--------|-------------|----------|\n| **rembg** | AI-based using U2-Net model | Complex images, photos, products (default) |\n| **builtin** | White-to-transparent conversion | Icons, graphics with clean white backgrounds |\n\n## Workflow\n\n### Step 1: Gather Requirements (REQUIRED)\n\nUse the `AskUserQuestion` tool for each question. Ask ONE question at a time.\n\n**Q1: Image Source**\n> \"Which image(s) should I remove the background from?\n>\n> Please provide the file path or paste the image.\"\n\n*Wait for response.*\n\n**Q2: Method (Optional)**\n> \"Which removal method?\n>\n> - **AI** (rembg) - Best quality, works on any image (default)\n> - **Built-in** - Faster, best for white backgrounds\"\n\n*Wait for response. Default to AI if user doesn't specify.*\n\n**Q3: Output Location (Optional)**\n> \"Where should I save the result?\n>\n> - Same location with `_nobg` suffix (default)\n> - Custom path\"\n\n*Wait for response.*\n\n### Step 2: Execute Background Removal\n\n**Single image:**\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"\u002Fpath\u002Fto\u002Fimage.jpg\" \\\n  -o \"\u002Fpath\u002Fto\u002Foutput.png\"\n```\n\n**Batch processing:**\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"\u002Fpath\u002Fto\u002Fimg1.jpg\" \"\u002Fpath\u002Fto\u002Fimg2.png\" \"\u002Fpath\u002Fto\u002Fimg3.webp\" \\\n  -o \"\u002Fpath\u002Fto\u002Foutput_folder\"\n```\n\n**Using built-in method (faster for white backgrounds):**\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"\u002Fpath\u002Fto\u002Ficon.png\" \\\n  -m builtin\n```\n\n### Step 3: Deliver Result\n\n1. Show the result to the user\n2. Confirm the background was removed successfully\n3. Offer to:\n   - Process additional images\n   - Try a different method if quality isn't satisfactory\n   - Adjust output format (PNG vs WebP)\n\n## Script Parameters\n\n| Parameter | Short | Description | Default |\n|-----------|-------|-------------|---------|\n| `--input` | `-i` | Input image path(s) | Required |\n| `--output` | `-o` | Output path or directory | Auto-generated with `_nobg` suffix |\n| `--method` | `-m` | Removal method (rembg, builtin) | rembg |\n\n## Output Formats\n\nThe output format is determined by the file extension:\n\n| Extension | Format | Notes |\n|-----------|--------|-------|\n| `.png` | PNG | Best quality, larger file (default) |\n| `.webp` | WebP | Good compression, modern format |\n\n## Integration with Other Skills\n\nThis skill can be called by other skills that need background removal:\n\n### From Python (import)\n```python\nimport sys\nsys.path.insert(0, \"${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\")\nfrom background_remove import remove_background\n\nresult = remove_background(\"\u002Fpath\u002Fto\u002Fimage.png\", \"\u002Fpath\u002Fto\u002Foutput.png\", method=\"rembg\")\nif result.get(\"success\"):\n    print(f\"Saved to: {result['file']}\")\nelse:\n    print(f\"Error: {result['error']}\")\n```\n\n### From Command Line\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"\u002Fpath\u002Fto\u002Fimage.png\" \\\n  -o \"\u002Fpath\u002Fto\u002Foutput.png\" \\\n  -m rembg\n```\n\n## Error Handling\n\n**rembg not installed:**\n```\nrembg not installed. Install with: pip install rembg[gpu] (or pip install rembg for CPU-only)\n```\nThe script will automatically fall back to the built-in method.\n\n**Image not found:**\n```\nImage not found: \u002Fpath\u002Fto\u002Fimage.png\n```\n\n**Processing failed:**\n- Try a different method\n- Check if the image file is corrupted\n- Ensure sufficient memory for large images\n\n## Tips for Best Results\n\n1. **Use rembg for photos** - AI handles complex edges (hair, fur, transparent objects)\n2. **Use builtin for graphics** - Faster for icons\u002Flogos with clean white backgrounds\n3. **Check edges** - If edges are rough, the AI method usually gives better results\n4. **Batch process** - Process multiple images at once for efficiency\n5. **GPU acceleration** - Install `rembg[gpu]` for faster processing on NVIDIA GPUs\n\n## Examples\n\n### Remove background from a photo\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"product_photo.jpg\" \\\n  -o \"product_transparent.png\"\n```\n\n### Batch process a folder\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i photos\u002F*.jpg \\\n  -o \"transparent_photos\u002F\"\n```\n\n### Fast removal for icons (white background)\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"icon.png\" \\\n  -m builtin\n```\n\n### Output as WebP (smaller file size)\n```bash\npython3 ${SKILL_PATH}\u002Fskills\u002Fbackground-remove\u002Fscripts\u002Fbackground_remove.py \\\n  -i \"photo.jpg\" \\\n  -o \"result.webp\"\n```\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fmichaelboeding\u002Fskills\u002Fbackground-remove",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill background-remove",{"tool":44,"command":45},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill background-remove",{"tool":47,"command":48},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill background-remove","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmichaelboeding\u002Fskills\u002Fbackground-remove\u002FSKILL.md",true,[],[53,63,73,82,88,95],{"skillNo":54,"name":55,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":59,"publishedAt":25},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[58],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[60,61,62],"model","model hierarchy","model hierarchy skill",{"skillNo":64,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":69,"publishedAt":25},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[68],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[70,71,72],"MCP","zoom","zoom mcp",{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":25},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[79,80,81,71],"sdk","zoom apps sdk","apps",{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":25},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[84],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":94,"publishedAt":25},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[93],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[90],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":25},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[97]]