[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79MYRP0TNWED6FN043EYMCG":3,"skill-same:01M79MYRP0TNWED6FN043EYMCG":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":43},"01M79MYRP0TNWED6FN043EYMCG","smart-resize",null,"Content-aware image resizing (seam carving). OmniSkill Design crew. Change an image's width, height or aspect ratio, for example a 16:9 photo to 9:16 or a banner to a square, by removing or adding the least interesting pixel paths so subjects keep their shape instead of being squashed or cropped. Protect or remove regions with boxes. Bundled numpy and Pillow script, no model, no GPU, nothing leaves the machine.","IPedrax\u002FOmniSkill","IPedrax","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F64429409?v=4","01M79MSCRSKESGTTRZMGK54KW0","01M79MSCSDY16CNNHW0VRGZFHF",9,"MIT","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fsmart-resize\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: smart-resize\ndescription: Content-aware image resizing (seam carving). OmniSkill Design crew. Change an image's width, height or aspect ratio, for example a 16:9 photo to 9:16 or a banner to a square, by removing or adding the least interesting pixel paths so subjects keep their shape instead of being squashed or cropped. Protect or remove regions with boxes. Bundled numpy and Pillow script, no model, no GPU, nothing leaves the machine.\ndisable-model-invocation: true\n---\n\n# smart-resize\n\n> Reframe without squashing · OmniSkill Design crew\n\nPlain scaling distorts a subject and a crop cuts it off. Seam carving finds the connected path of pixels, top to bottom, with the least visual change (flat sky, blurred background, floor) and removes it, over and over. Paths through busy areas cost more, so faces, products and edges survive. Enlarging runs the same search and duplicates the cheapest paths. The method is from Avidan and Shamir's 2007 paper \"Seam Carving for Content-Aware Image Resizing\", implemented here from scratch, with no code from any other tool.\n\n## Run it\n\n```bash\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --aspect 9:16\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --width 800\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --width 1400 --height 700 --keep 300,120,400,500\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --perc 30 --drop 0,0,200,900\n```\n\nWrite the full path into the command; Bash does not set `CLAUDE_SKILL_DIR`. Needs `numpy` and `Pillow` (`pip install numpy pillow` or `uv run --with numpy --with pillow`).\n\n| Option | Does |\n|---|---|\n| `--width N` \u002F `--height N` | target size on that axis; carves to shrink, inserts seams to grow |\n| `--aspect W:H` | reframes by carving whichever side is too long, so `--aspect 9:16` on a landscape photo narrows it |\n| `--perc P` | removes P% of the width (negative adds) |\n| `--keep x,y,w,h` | protect a box: a face, a product, a logo, text. Repeat for several |\n| `--drop x,y,w,h` | make a box the first thing removed: a stray person, a sign |\n\nProtection applies to the first axis carved (width, then height). Output is PNG unless the extension says otherwise; transparency is kept.\n\n## Make it work\n\n1. **Look at the image first** and decide what must survive. Then give `--keep` boxes in pixel coordinates (x, y from the top left). Without them the algorithm only knows edges, so it will happily slice through a face of low contrast.\n2. **Change less than about 30 to 40 percent** of an axis. Beyond that, scale most of the way with an ordinary resize and carve the rest, or accept visible warping. Enlarging past 25 percent shows repeated stripes.\n3. **Judge by eye.** Open the result. Straight lines that cross a seam bend, and that is the failure to look for.\n4. **Keep the original.** The operation is lossy and not reversible.\n\n## What it does badly\n\nMeasured on a 981 by 832 screenshot of a package-manager window, reframed to 9:16 (513 seams removed): the photo-like parts were fine, but every line of text came out with letters fused and clipped, because text is thin, high-frequency detail on a flat background, which is exactly what the energy map calls \"cheap\". So:\n\n- **Screenshots, UI, charts, diagrams, text:** do not carve them. Crop, or pad to the new ratio.\n- **Regular patterns** (fences, grids, brick) and **straight edges** wobble.\n- **Crowded scenes** with no empty space have no cheap path to take.\n\n## Speed\n\nPure numpy with a Python loop per row, about 40 ms a seam on a 1000 px image: 20 seconds to remove 500 seams, and it gets slower with size. Shrink a large photo with an ordinary resize first (to about 1000 px on the long side), then carve. There is no face detector: pick the box yourself with `--keep`.\n\n## Where it sits in the crew\n\nFor reframing stills, for example a hero image to a vertical story or thumbnail. `craft-video` can call it for background frames. Anything about design direction or new imagery belongs to `ui-ux-pro-max` or `canvas-design`.\n\n## Source\n\nOriginal to OmniSkill, written from the published algorithm. The research behind it: Avidan and Shamir, ACM SIGGRAPH 2007. Prior open-source implementations exist (for example esimov\u002Fcaire, MIT); none of their code is used here.\n","# smart-resize\n\n> Reframe without squashing · OmniSkill Design crew\n\nPlain scaling distorts a subject and a crop cuts it off. Seam carving finds the connected path of pixels, top to bottom, with the least visual change (flat sky, blurred background, floor) and removes it, over and over. Paths through busy areas cost more, so faces, products and edges survive. Enlarging runs the same search and duplicates the cheapest paths. The method is from Avidan and Shamir's 2007 paper \"Seam Carving for Content-Aware Image Resizing\", implemented here from scratch, with no code from any other tool.\n\n## Run it\n\n```bash\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --aspect 9:16\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --width 800\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --width 1400 --height 700 --keep 300,120,400,500\npython3 ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fsmartresize.py in.jpg out.png --perc 30 --drop 0,0,200,900\n```\n\nWrite the full path into the command; Bash does not set `CLAUDE_SKILL_DIR`. Needs `numpy` and `Pillow` (`pip install numpy pillow` or `uv run --with numpy --with pillow`).\n\n| Option | Does |\n|---|---|\n| `--width N` \u002F `--height N` | target size on that axis; carves to shrink, inserts seams to grow |\n| `--aspect W:H` | reframes by carving whichever side is too long, so `--aspect 9:16` on a landscape photo narrows it |\n| `--perc P` | removes P% of the width (negative adds) |\n| `--keep x,y,w,h` | protect a box: a face, a product, a logo, text. Repeat for several |\n| `--drop x,y,w,h` | make a box the first thing removed: a stray person, a sign |\n\nProtection applies to the first axis carved (width, then height). Output is PNG unless the extension says otherwise; transparency is kept.\n\n## Make it work\n\n1. **Look at the image first** and decide what must survive. Then give `--keep` boxes in pixel coordinates (x, y from the top left). Without them the algorithm only knows edges, so it will happily slice through a face of low contrast.\n2. **Change less than about 30 to 40 percent** of an axis. Beyond that, scale most of the way with an ordinary resize and carve the rest, or accept visible warping. Enlarging past 25 percent shows repeated stripes.\n3. **Judge by eye.** Open the result. Straight lines that cross a seam bend, and that is the failure to look for.\n4. **Keep the original.** The operation is lossy and not reversible.\n\n## What it does badly\n\nMeasured on a 981 by 832 screenshot of a package-manager window, reframed to 9:16 (513 seams removed): the photo-like parts were fine, but every line of text came out with letters fused and clipped, because text is thin, high-frequency detail on a flat background, which is exactly what the energy map calls \"cheap\". So:\n\n- **Screenshots, UI, charts, diagrams, text:** do not carve them. Crop, or pad to the new ratio.\n- **Regular patterns** (fences, grids, brick) and **straight edges** wobble.\n- **Crowded scenes** with no empty space have no cheap path to take.\n\n## Speed\n\nPure numpy with a Python loop per row, about 40 ms a seam on a 1000 px image: 20 seconds to remove 500 seams, and it gets slower with size. Shrink a large photo with an ordinary resize first (to about 1000 px on the long side), then carve. There is no face detector: pick the box yourself with `--keep`.\n\n## Where it sits in the crew\n\nFor reframing stills, for example a hero image to a vertical story or thumbnail. `craft-video` can call it for background frames. Anything about design direction or new imagery belongs to `ui-ux-pro-max` or `canvas-design`.\n\n## Source\n\nOriginal to OmniSkill, written from the published algorithm. The research behind it: Avidan and Shamir, ACM SIGGRAPH 2007. Prior open-source implementations exist (for example esimov\u002Fcaire, MIT); none of their code is used here.\n",{"name":5,"description":7,"disable-model-invocation":23},true,"main","cc238b48e3c4fe0061cad0b0475142fbff5b183d","skills\u002Fsmart-resize",0,"https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill","https:\u002F\u002Fgithub.com\u002FIPedrax","2026-10-14 10:26:53",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":23},[33,36,39],{"tool":34,"command":35},"npx","npx skills add IPedrax\u002FOmniSkill --skill smart-resize",{"tool":37,"command":38},"bunx","bunx skills add IPedrax\u002FOmniSkill --skill smart-resize",{"tool":40,"command":41},"pnpm","pnpm dlx skills add IPedrax\u002FOmniSkill --skill smart-resize","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fsmart-resize\u002FSKILL.md",[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"scripts\u002Fsmartresize.py","SCRIPT","脚本",6723,"https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fsmart-resize\u002Fscripts\u002Fsmartresize.py",[51,58,65,72,79,85],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M79N058MCJZPHNFYZCPJG3ZZ","xlsx","Excel with live formulas. OmniSkill Operations crew — adapter for the xlsx skill, which installs separately.","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M79N01GR5C5EK22CKGG38VYH","webapp-testing","Browser-test a web app. OmniSkill Developers crew — drives a real browser to verify user flows, catches console and network errors, and writes tests that do not flake.","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M79MZZSJHFKJRE46BNEHCYZ3","web-artifacts","shadcn HTML artifacts. OmniSkill Design crew — bundled copy of the Web Artifacts skill.","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M79MZXFMCV0QSQ2WN316JKGZ","video","Script and produce video. OmniSkill Social crew — structures short-form and long-form video around retention, with shot lists, captions, and platform-specific delivery.","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fvideo\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M79MZV8SR0N02YX539Z5PS5E","vgpu","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fvgpu\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M79MZS7JG9X0T4T5TGA4MMJS","uisfx","https:\u002F\u002Fgithub.com\u002FIPedrax\u002FOmniSkill\u002Fblob\u002Fmain\u002Fskills\u002Fuisfx\u002FSKILL.md",[],[]]