Stitchchart MD

Open-source agent skill · cross-stitch and knitting

Turn a pixel grid or text pattern into a printable cross-stitch or knitting chart.

Tell your coding agent what you want to stitch or knit. It writes a small pattern file, checks it, and makes a chart you can print: symbols, colours, numbers, a key and stitch counts.

npx skills add isatimur/stitchchart-md

  • 5 print themes
  • Cross-stitch and knitting
  • No dependencies
The strawberry chart in the pixel theme: neon grid lines on a dark page. The strawberry chart in the Nordic theme: white page, hairline grid, light type. The strawberry chart in the sampler theme: linen page with a border of tiny cross stitches.

What is on the page

Everything a stitcher looks for, on one chart.

  • A symbol and a colour in every cell.

    Each colour has its own shape, so the chart still reads on a black-and-white printer.

  • A bold line every ten stitches.

    Count in tens, not ones. The bold lines follow the chart, so they stay true on every page.

  • Numbers on every side.

    Cross-stitch counts from the top left. Knitting numbers each row from the bottom.

  • Centre arrows.

    Find the middle of the cloth in a second, and start from there.

  • A key with stitch counts.

    The colour name, your own code, and how many stitches use it. No brand numbers.

  • Pages that overlap.

    Big charts split into parts. Each part repeats a few rows and columns of its neighbour.

  • Knitting mode.

    Odd rows read right to left. Knit, purl, yarn over and decreases have their own symbols.

  • A check before it prints.

    Every character in the grid must be in the key. A mistake comes with its row and column.

How it works

Three steps from idea to paper.

  1. Describe the pattern

    Give your agent a text grid: each character is one stitch. Or give it a small PNG or PPM: one pixel is one stitch.

    "grid": [
      "K/O/O/O/O/O/O/O/O/O",
      "KKKKKPPPKKKPPPKKKKK"
    ],
    "key": {
      "K": { "name": "Knit", "color": "#e8a4b4", "stitch": "knit" },
      "P": { "name": "Purl", "color": "#e8a4b4", "stitch": "purl" }
    }
  2. Check every character

    The check finds a grid character that is missing from the key. It tells you the row and the column.

    error: pattern.json: 1 problem
      - grid row 3, column 7: "x" is not in the key (4 cells). Add it to "key" or fix the grid
  3. Pick a theme and print

    Your agent shows the first sheet in every theme, side by side. You pick one. Print the HTML file on A4 or US Letter.

    npx github:isatimur/stitchchart-md render pattern.json --theme sampler
    wrote pattern.html: theme sampler, paper A4, 1 page, cells 4.5 mm

“Make a cross-stitch chart from this 32 by 32 pixel heart. Use six colours and print it on A4.”

Five themes

One pattern, five ways to print it.

Every image on this page is real output from the engine. Open one to see the whole chart.

  • Sampler theme: linen page, indigo ink, a ring of tiny cross stitches around the edge.
    Heirloom samplerWoven linen, indigo ink and a ring of tiny cross stitches.
  • Nordic theme: white page, hairline grid, pine green accent and light geometric type.
    Nordic minimalHairline grid, one pine green, light type and plenty of air.
  • Contrast theme: black symbols only on white, thick lines and large numbers.
    High contrastNo colour fills. Bold symbols, thick lines, large numbers.
  • Pixel theme: dark page with glowing cyan and magenta lines and arcade type.
    Neon pixel artA dark page with glowing lines. Bright colours pop.
  • Booklet theme: mint paper, a fat headline and a halftone band, printed in two inks.
    Vintage bookletA 1950s leaflet in two inks on mint paper.

Install

Add it to your agent in one line.

Claude Code plugin

Add the marketplace, then the plugin.

/plugin marketplace add isatimur/stitchchart-md
/plugin install stitchchart-md@stitchchart-md

Any agent, via skills.sh

Works with Cursor, Codex and more.

npx skills add isatimur/stitchchart-md

Command line

Run it straight from GitHub.

npx github:isatimur/stitchchart-md render pattern.json --out chart.html

Node 20 or newer. Nothing else to install. Playwright is optional, for PDF export.