Works with the AI Agents you already use

    Fabric Swatch Cutter

    by Jeff Cannon

    1

    Automate batch extraction of square fabric swatches from high-resolution production print layouts.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Fabric Swatch Cutter

    Example session with this skill installed

    I need a square fabric swatch of every one of our 82 prints for a "design your own" page. All we have are the factory's sublimation layout files (30–75 MB each, flat pattern pieces with white gaps), in folders by style. Cut a clean swatch for each print and name it from our print list.

    • Read your context and instructions
    • Compiled the fabric swatch cutter

    Summary

    80 of 82 prints cut into clean square swatches in one run, from ~3.5 GB of factory sublimation layouts. The 2 failures were flagged for a person, not forced. (The real job this skill was built from, at Yoga Democracy, an apparel brand. The contact sheet above is from that run.)

    What I did

    1. Picked one layout per print, the smallest file across the style folders, to keep memory down.
    2. Built a fabric mask: anything not near-white is fabric. Eroded it so seams, notches, cut lines and printed size labels drop out.
    3. Took the largest panel (on leggings, a leg panel) and searched for the biggest clean square, starting at the thigh.
    4. Rejected any square with more than 1% white, then cropped from the full-resolution original and resized to 800×800.
    5. Never overwrote an existing swatch; named each from your print list.

    Results

    StatusPrintsMeaning
    ok80clean swatch written
    needs review2mostly-white designs: white in the art can't be told apart from white gaps between pieces

    Files written: one <print> (swatch).jpg per print, a contact sheet of every swatch (light prints outlined orange, failures shown as red placeholders), and a CSV log: source file, print name, status, panel area, square size, white %, position.

    Next steps

    • Look over the contact sheet; anything odd, re-run that file with a different --positions or --erode
    • Crop the 2 mostly-white prints by hand (or try --retry-light if their white is enclosed by a cut line)
    • Upload the swatches to your colour picker or product pages

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Need a clean square swatch of every print for a colour picker, a "design your own" page or product tiles, but all you have are huge sublimation or print-on-demand layout files? This skill cuts them out in bulk. Built for a real apparel brand: 80 of 82 prints from ~3.5 GB of factory layouts in one run.

    What it does

    • Finds the fabric. Anything not near-white is fabric; the mask is eroded so seams, notches, cut lines and printed size labels drop out.
    • Cuts the biggest clean square from the largest panel, starting where you tell it (on leggings, the thigh), and rejects any square with more than 1% white.
    • Handles huge files. Finds the square on a downscaled copy, then crops from the full-resolution original. Tested on a 100-megapixel layout.
    • Flags instead of forcing. Mostly-white designs come back as "needs review" for a person; light prints can get a second automatic try (--retry-light), marked for review.
    • Never overwrites existing swatches, and one bad file doesn't stop the batch.
    • Writes a contact sheet and a CSV log (source file, name, status, panel area, square size, white %, position).

    Takes files, folders (optionally with subfolders) or a list of paths, plus an optional file → print-name CSV. Includes a test-layout generator so you can try it before pointing it at real files. Python: numpy, scipy, Pillow.

    Honest limits

    • Mostly-white designs can't be told apart from the white gaps between pieces; those still need a hand crop.
    • Assumes white or transparent gaps. Off-white or tinted backgrounds need a threshold tweak.
    • Panels that touch with no gap can produce a square that crosses a seam.
    • Black text printed inside the design isn't removed by the white check.
    • Vector files (AI/PDF/SVG) must be rasterised first. CMYK and 16-bit TIFF conversion is basic, not colour-managed.
    • Tuned for long panels like leggings; for other products start at the panel centre (--positions 0.5,...).

    Does not support vector formats (AI, PDF, SVG) directly; requires rasterization. Requires local file access. Performance depends on RAM, as 300 MP files need 3-4 GB each during processing.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed4 days ago

    What's inside

    Creator

    Jeff Cannon

    Jeff Cannon

    5 skills on Agensi

    Frequently Asked Questions

    This skill takes oversized production layouts or markers used in garment printing and automatically extracts a clean, square swatch for each design. It eliminates the manual bottleneck of opening massive files to crop thumbnails for web shops or color pickers by hand.

    You need the production layout files in a local directory, such as a synced folder from Google Drive or Dropbox. If you want custom file names for your swatches, you should also provide a CSV naming map with file and name columns.

    The skill produces a high-resolution square swatch for every design, a CSV log detailing the status of each cut, and a visual contact sheet. The contact sheet allows you to audit an entire batch at a single glance to ensure the crops are accurate.

    It uses an erosion and detection algorithm to find fabric areas while ignoring white gaps, seams, and print labels. It also includes a specialized mode to identify light prints that contain a lot of white within the design itself.

    This skill is designed for raster images like JPG, PNG, or TIFF and does not support vector formats such as AI, PDF, or SVG directly. It is also not intended for processing photos of finished garments or for creating seamless repeat tiles.

    You can ask your agent to extract swatches from a specific folder of layout files and tell it where to save the results. You can also specify the desired swatch size or provide a naming list to ensure the output files are ready for your website.

    New in Workflow Automation

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.