⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

antialgorithm

@mankidev⭐ 745 stars

Stops the safe, average, comfortable pick that AI reaches for first. Use when a creative choice is left open to the agent: ideas, names, story, game mechanics, visual style, color, poster or page layout, app or web interface design, composition, slogans, titles, taglines, creative copy. Not for code identifiers, bug fixes, choices the user already made, or texts whose form the user''s standing rules already set, such as a README, a store page, a commit message, release notes or license text. Also use when the user says "too generic", "boring", "typical AI", "too safe", "cliche", "average", "seen it before".

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐ 745 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

antialgorithm

Six posters without the skill on top, six with it below

Agent skill for creative work: names, story, game ideas, posters, UI. It makes the model name its first, most average pick, then move away from it for a reason taken from the project.

Both rows came from the same prompt: Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder. The top row is one batch of six runs without the skill, none left out. The bottom row is picked from about a dozen runs made while the skill was still being written.

Chart of how often a choice gets picked: a tall peak around the average marked as the safe zone, flat on both sides

Install

The skills CLI puts it where your agent reads skills, for Codex, Cursor, OpenCode, Claude Code and others:

npx skills add mankidev/antialgorithm

Or clone it into your agent's skills folder:

git clone https://github.com/mankidev/antialgorithm <skills folder>/antialgorithm

In Claude Code it also installs as a plugin (on versions before 2.1.275, run /plugin marketplace add mankidev/antialgorithm first):

/plugin install antialgorithm --marketplace mankidev/antialgorithm

The scripts need Python 3. check.py also needs numpy, Pillow and rsvg-convert (or the cairosvg package).

Scripts

seed.py rolls a starting point when the request is thin. A visual seed gives a making method, colors, layout, type, a verb and a scale for the idea, a setting, a region and, half the time, an object. A text seed gives a voice, a way in and a register. An idea seed gives a verb, a constraint, a scale and a pressure. It draws from system randomness, so two people sending the same prompt start in different places. It also saves each seed to ~/.local/state/antialgorithm/history.jsonl (under $XDG_STATE_HOME when that is set) and skips values from the last few, so your own seeds don't repeat from one session to the next. Plugin updates leave that file alone. --keep "axis=value" holds an axis fixed, which lets you keep a subject and roll only the look.

moves.py keeps a short log of the main move behind each off-default answer, such as "neon tube wall, almost no type". The model reads it before showing new work, so it doesn't reuse a move that worked last time just because it worked.

rough.py takes an SVG and shakes its straight lines, shapes and letters, and breaks the even spacing of repeated marks, so a hand-made look drawn in code stops looking plotted. It is only for hand-made methods such as print, paint, stamps and ink; screen, camera and render looks keep their own marks.

check.py renders an SVG at full size and at icon size and lists text that runs off an edge, sits under a shape, has low contrast or is too small. The size limit fits posters; for an app screen use --min-text 0.6.

Visual rules live in visuals.md, which the model reads only for visual work, so a name or a slogan doesn't load them.

License

MIT

Star History

// HOW IT'S BUILT

// FILES

25 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • SKILL.md9.8 KBe44ba4296986upstream ↗
    ---
    name: antialgorithm
    description: 'Stops the safe, average, comfortable pick that AI reaches for first. Use when a creative choice is left open to the agent: ideas, names, story, game mechanics, visual style, color, poster or page layout, app or web interface design, composition, slogans, titles, taglines, creative copy. Not for code identifiers, bug fixes, choices the user already made, or texts whose form the user''s standing rules already set, such as a README, a store page, a commit message, release notes or license text. Also use when the user says "too generic", "boring", "typical AI", "too safe", "cliche", "average", "seen it before".'
    ---
    
    # antialgorithm
    
    The first answer that comes to mind is the average of all that was already made. It feels right because it is familiar, and that is the problem: the user has seen it a thousand times. This skill makes you notice that pick and move away from it on purpose.
    
    The user's standing rules, in CLAUDE.md, AGENTS.md or similar files and memory, always win over this skill, not only on language. If a rule there fixes the shape, the wording, the palette or the content of a piece, follow it and use this skill only for what is still open.
    
    ## Where to start
    
    The answer must differ from one user to the next, and you cannot see what others got. So the start point has to come from outside your own taste:
    
    1. If the request carries real context, such as a project, a place, a person, a purpose or a constraint, start from that.
    2. If the request is thin and the work is short, such as a few slogans, a name or a short text, do not stop at a question. Make the work from a seed or a stated guess, then ask one short question at the end that would make it fit better. The question asks for a fact about the case, not for leave to redo the work. If the work is long or costly, such as a full design, a long text or a game system, ask the one short question first: who it is for, where it lives or what it is about.
    3. If the request is thin and the user wants the work now, or cannot answer, roll a seed: `python3 scripts/seed.py visual`, `text` or `idea` (paths are relative to this skill's folder). Use what it gives as the starting point. The script keeps recent seeds in `history.jsonl` and avoids their values, so seeds do not repeat across sessions; `--no-log` rolls without saving. A visual seed also gives a verb and a scale: build the idea behind the piece from them, who does what, instead of a twist you think of yourself. You may roll one axis again once with `--only <axis>` if it truly fights the subject; pass the axes you keep with `--keep "axis=value"` so the new pick fits them. The region places the setting: the land, the weather and the buildings around it, and the names, jokes, habits and way of speaking of the people there, while the words stay in the language set near the end of this skill. Take what someone who lives there would know from a normal week: the brand on the bus stop, the way a neighbor greets you, what is broken and nobody fixes. Leave out what an outsider lists first, such as the national dish, the costume, the famous sight, the flag colors or the accent played for laughs. If you do not know enough real daily detail about the region, use less of it instead of filling the gap with the famous parts. Then tie the seed to the subject with a reason.
    
    Never pick the start point by thinking about what would be most interesting. That thought lands on the same place for all users.
    
    ## The rule
    
    Before you give a creative answer, find the obvious one first. Say it to yourself in one line: "the default here is X." Then do not use X unless the context truly asks for it.
    
    Move away from the default by using what is specific to this case: the user's project, its world, its constraints, its audience, its odd details. A good choice could only belong here. A default choice could belong anywhere.
    
    Do not swap one cliche for its well-known opposite. "Dark instead of bright" or "minimal instead of busy" is just the second most common answer.
    
    Strange is not the goal. A choice that is odd but has no reason is as empty as a safe one. Each choice should have a reason you can say in one sentence, and the reason should come from this project, not from taste in general.
    
    ## Text
    
    Do not write what any writer would write about any subject. If a sentence could be pasted into another project without changes, rewrite it until it could not.
    
    Prefer the concrete detail over the general claim. Prefer the plain word over the impressive one. Prefer the unexpected but true angle over the expected summary.
    
    A concrete detail is a thing a person could see, touch or do there. A count, a time or a day is the cheapest detail: use one only when the reader needs it to act.
    
    Do not reach for the common opening, the common structure or the common ending. If the shape of the text is the shape most texts use, change the shape, but only inside the length and format the user set.
    
    These are the marks of default AI text. Do not use them:
    
    - An offer at the end to change, tailor or redo the text, or a note about the text itself, such as its word count or how it was made.
    - A bold title, headers or bold labels the user did not ask for.
    - A list of features with bullets or emoji where plain sentences would do.
    - A closing call to action or a cheer with an exclamation mark.
    - A question to the reader that only builds hype.
    - Mirrored pairs and slogans built from two matching halves.
    - Items that come in threes by habit: three adjectives, three examples, three wishes.
    - Set phrases that fit any product or any person, and big claims with nothing behind them.
    - Feelings named outright where a detail could show them.
    - A last line that sums up, lifts the mood or ties a bow on the text.
    - Long, even sentences with the same rhythm from start to end.
    
    Write the text a real person in this situation would write: shorter, built on the real facts of this case, and with an end that just stops.
    
    This list covers the marks that come from picking the default. To clean the rest of the AI marks from a finished text, run a separate editing pass or a text cleanup skill if one is installed.
    
    ## Visuals
    
    For any visual work, read `visuals.md` in this skill's folder before you start. It covers the look, the method and its marks, the hand in the geometry, interfaces such as app screens and dashboards, and the `rough.py` and `check.py` scripts.
    
    ## Ideas, names and design
    
    Do not offer the first idea in a field, the most famous mechanic, or the name made from the two most obvious words. Assume the user already thought of those.
    
    When you give options, make them different in kind, not small variations of one safe idea. One option may be the safe one, but say so, and never make it the only real choice.
    
    Give one recommendation and the reason for it. Do not hide behind a long neutral list.
    
    ## The escape becomes a default
    
    This skill makes its own habits. An escape that worked once turns into the new safe pick if you use it again. Watch for these and do not reach for them by reflex:
    
    - An old, analog or printed look chosen because it reads as "not AI", not because the subject asks for it.
    - The same small palette, the same paper, the same texture, the same wobbly line from one piece to the next.
    - Made-up names that all come from one stock: sea and tide words, old trades, rope and salt, small English towns. Take names from the way the people who live there name things, not from a list of objects found in the place.
    - A cream, beige or off-white ground. Take the ground from the subject: its night, its wall, its water, its screen.
    - Exact times, dates and numbers used only to look concrete.
    - A clever frame borrowed from another domain, such as a table, a map, a form or a schedule, laid over the subject.
    - A small numbered label in the corner and a dry joke in the fine print.
    - A small town, a named craftsman, a quiet magic rule and an odd object in the last line.
    
    If your answer shares its main move with the last off-default answer you gave, it is a default now. Pick a different kind of move, or keep it only if you can say why this case needs it.
    
    You cannot see past sessions, so the moves are kept in a file. Before you show an off-default answer, run `python3 scripts/moves.py` to list the main moves of recent answers and compare yours with them. After you show it, record its main move in a few plain words: `python3 scripts/moves.py add "poster: x-ray method, deep blue ground, text cut by the edge"`. Name the move, not the project or the user's content.
    
    ## Check before showing
    
    Ask three questions about your answer:
    
    1. Could this be the answer to a different project? If yes, it is too general.
    2. Is this what most people would make first? If yes, move it.
    3. Can I say why this choice fits here, in one sentence, using a fact about this project? If not, the choice has no reason.
    
    Write all text in the work in the language the user wrote in, unless the user's standing rules name another language for that kind of text, such as one fixed language for code, project names, game names or a store page. Those rules win. The seed's setting and region may shape the look and the names of people and places, but dates, times, lineups, buttons, labels and all other words stay in the language chosen this way.
    
    Keep the length and format the user gave. If they asked for four sentences, write four. Do not add notes, options or extra parts they did not ask for.
    
    Do not invent facts to make a text concrete. Use real details from the user or the project. If there are none, ask for them, or keep the detail clearly made up. Add one short sentence saying so only when a made-up fact could pass for a real one and do harm, such as a price, a weight, an ingredient or a claim about the product. A poem or a story needs no such line.
    
    If the user asks for the plain, standard or expected version, give it. This skill is for choices left to you, not for overriding what the user asked for.
    
  • README.md4.5 KBe9bfc332d3dfupstream ↗
    <p align="center">
      <img src=".claude-plugin/icon.png" width="140" height="140" alt="Orange bell curve with one point far out on its tail">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub>English | <a href="docs/README_TR.md">Türkçe</a> | <a href="docs/README_ZH.md">简体中文</a> | <a href="docs/README_JA.md">日本語</a> | <a href="docs/README_KO.md">한국어</a> | <a href="docs/README_ES.md">Español</a> | <a href="docs/README_PT.md">Português</a> | <a href="docs/README_DE.md">Deutsch</a> | <a href="docs/README_FR.md">Français</a> | <a href="docs/README_RU.md">Русский</a></sub></p>
    
    ![Six posters without the skill on top, six with it below](images/showcase.png)
    
    Agent skill for creative work: names, story, game ideas, posters, UI. It makes the model name its first, most average pick, then move away from it for a reason taken from the project.
    
    Both rows came from the same prompt: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` The top row is one batch of six runs without the skill, none left out. The bottom row is picked from about a dozen runs made while the skill was still being written.
    
    ![Chart of how often a choice gets picked: a tall peak around the average marked as the safe zone, flat on both sides](images/graph.png)
    
    ## Install
    
    The [skills](https://github.com/vercel-labs/skills) CLI puts it where your agent reads skills, for Codex, Cursor, OpenCode, Claude Code and others:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    Or clone it into your agent's skills folder:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <skills folder>/antialgorithm
    ```
    
    In Claude Code it also installs as a plugin (on versions before 2.1.275, run `/plugin marketplace add mankidev/antialgorithm` first):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    The scripts need Python 3. `check.py` also needs numpy, Pillow and `rsvg-convert` (or the cairosvg package).
    
    ## Scripts
    
    `seed.py` rolls a starting point when the request is thin. A visual seed gives a making method, colors, layout, type, a verb and a scale for the idea, a setting, a region and, half the time, an object. A text seed gives a voice, a way in and a register. An idea seed gives a verb, a constraint, a scale and a pressure. It draws from system randomness, so two people sending the same prompt start in different places. It also saves each seed to `~/.local/state/antialgorithm/history.jsonl` (under `$XDG_STATE_HOME` when that is set) and skips values from the last few, so your own seeds don't repeat from one session to the next. Plugin updates leave that file alone. `--keep "axis=value"` holds an axis fixed, which lets you keep a subject and roll only the look.
    
    `moves.py` keeps a short log of the main move behind each off-default answer, such as "neon tube wall, almost no type". The model reads it before showing new work, so it doesn't reuse a move that worked last time just because it worked.
    
    `rough.py` takes an SVG and shakes its straight lines, shapes and letters, and breaks the even spacing of repeated marks, so a hand-made look drawn in code stops looking plotted. It is only for hand-made methods such as print, paint, stamps and ink; screen, camera and render looks keep their own marks.
    
    `check.py` renders an SVG at full size and at icon size and lists text that runs off an edge, sits under a shape, has low contrast or is too small. The size limit fits posters; for an app screen use `--min-text 0.6`.
    
    Visual rules live in `visuals.md`, which the model reads only for visual work, so a name or a slogan doesn't load them.
    
    ## License
    
    MIT
    
    ## Star History
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • scripts/check.py9.7 KBa81304d5360dupstream ↗
    #!/usr/bin/env python3
    import argparse
    import copy
    import os
    import re
    import shutil
    import subprocess
    import sys
    import tempfile
    import xml.etree.ElementTree as ET
    
    import numpy as np
    from PIL import Image
    
    SVG_NS = "http://www.w3.org/2000/svg"
    ET.register_namespace("", SVG_NS)
    ET.register_namespace("xlink", "http://www.w3.org/1999/xlink")
    NUM = re.compile(r"[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?")
    SHAPES = {"rect", "circle", "ellipse", "line", "polyline", "polygon", "path", "image", "use"}
    HOLDERS = {"defs", "clipPath", "mask", "pattern", "filter", "marker", "symbol"}
    
    
    def tag(el):
        return el.tag.split("}")[-1]
    
    
    def cairo_dir():
        if os.name != "nt":
            return None
        path = [d for d in os.environ.get("PATH", "").split(os.pathsep) if d]
        if any(os.path.isfile(os.path.join(d, "libcairo-2.dll")) for d in path):
            return None
        pf = os.environ.get("ProgramFiles", r"C:\Program Files")
        apps = os.path.join(os.environ.get("LOCALAPPDATA", ""), "Programs")
        dirs = os.environ.get("CAIROCFFI_DLL_DIRECTORIES", "").split(";") + [
            r"C:\msys64�crt64\bin", r"C:\msys64\mingw64\bin",
            os.path.join(pf, "GTK3-Runtime Win64", "bin"), os.path.join(pf, "Inkscape", "bin"),
            os.path.join(pf, "Siril", "bin"), os.path.join(pf, "GIMP 3", "bin"),
            os.path.join(apps, "GIMP 3", "bin"), os.path.join(pf, "GIMP 2", "bin"),
            os.path.join(apps, "GIMP 2", "bin"),
        ]
        return next((d for d in dirs if d and os.path.isfile(os.path.join(d, "libcairo-2.dll"))), None)
    
    
    def render(svg_path, png_path, width):
        if shutil.which("rsvg-convert"):
            subprocess.run(["rsvg-convert", "-w", str(width), svg_path, "-o", png_path], check=True, stderr=subprocess.DEVNULL)
            return
        found = cairo_dir()
        if found:
            os.environ["PATH"] = found + os.pathsep + os.environ.get("PATH", "")
        try:
            import cairosvg
        except (ImportError, OSError):
            sys.exit("needs rsvg-convert, or the cairosvg python package with a cairo library it can load")
        cairosvg.svg2png(url=svg_path, write_to=png_path, output_width=width)
    
    
    def flat(png, bg):
        im = np.asarray(Image.open(png).convert("RGBA"), dtype=np.float32)
        a = im[:, :, 3:4] / 255
        return im[:, :, :3] * a + bg * (1 - a)
    
    
    def size_of(root):
        vb = [float(n) for n in NUM.findall(root.get("viewBox", ""))]
        if len(vb) == 4:
            return vb
        w = float(NUM.search(root.get("width", "600")).group())
        h = float(NUM.search(root.get("height", "600")).group())
        return [0.0, 0.0, w, h]
    
    
    def texts(root):
        out = []
    
        def walk(el, inside_holder):
            for c in el:
                t = tag(c)
                if t in HOLDERS:
                    walk(c, True)
                elif t == "text" and not inside_holder:
                    out.append(c)
                else:
                    walk(c, inside_holder)
    
        walk(root, False)
        return out
    
    
    def label(el):
        s = " ".join("".join(el.itertext()).split())
        return s[:40] if s else "(empty)"
    
    
    def hide(el):
        st = el.get("style", "")
        el.set("style", (st + ";" if st else "") + "display:none")
    
    
    def write(tree, path):
        tree.write(path, encoding="unicode")
    
    
    CJK = re.compile(r"[぀-ヿ㐀-鿿＀-￯]")
    
    
    def cjk_font_missing(root):
        """True when the SVG has Japanese text but fontconfig lists no Japanese font."""
        if not any(CJK.search("".join(el.itertext())) for el in root.iter() if tag(el) == "text"):
            return False
        if not shutil.which("fc-list"):
            return False
        out = subprocess.run(["fc-list", ":lang=ja", "family"], capture_output=True, text=True).stdout
        return not out.strip()
    
    
    def main():
        if hasattr(sys.stdout, "reconfigure"):
            sys.stdout.reconfigure(encoding="utf-8", errors="replace")
        ap = argparse.ArgumentParser()
        ap.add_argument("svg")
        ap.add_argument("--out", default=None)
        ap.add_argument("--width", type=int, default=800)
        ap.add_argument("--small", type=int, default=64)
        ap.add_argument("--min-text", type=float, default=1.2, help="smallest text height as a percent of the image side; about 0.6 for interfaces")
        args = ap.parse_args()
    
        name = os.path.splitext(os.path.basename(args.svg))[0]
        out = args.out or os.path.join(tempfile.gettempdir(), "antialgorithm_check", name)
        os.makedirs(out, exist_ok=True)
        tree = ET.parse(args.svg)
        root = tree.getroot()
        x0, y0, w, h = size_of(root)
        scale = args.width / w
        pad = 0.25 * max(w, h)
    
        full_png = os.path.join(out, "full.png")
        small_png = os.path.join(out, "small.png")
        render(args.svg, full_png, args.width)
        render(args.svg, small_png, args.small)
        full = flat(full_png, 255)
        clear = bool((np.asarray(Image.open(full_png).convert("RGBA"))[:, :, 3] < 250).any())
        full_dark = flat(full_png, 0) if clear else None
    
        parent = {c: p for p in root.iter() for c in p}
    
        def has_filter(el):
            return "filter" in el.attrib or "filter" in el.get("style", "")
    
        def filtered(el):
            while el is not None:
                if has_filter(el):
                    return True
                el = parent.get(el)
            return False
    
        def ancestor_filtered(el):
            return filtered(parent.get(el))
    
        own_filter = [has_filter(t) for t in texts(root)]
        plain = None
        if any(own_filter):
            nf = copy.deepcopy(tree)
            for t in texts(nf.getroot()):
                t.attrib.pop("filter", None)
                st = t.get("style", "")
                if "filter" in st:
                    t.set("style", re.sub(r"filter\s*:[^;]*;?", "", st))
            nf_svg = os.path.join(out, "_nofilter.svg")
            nf_png = os.path.join(out, "_nofilter.png")
            write(nf, nf_svg)
            render(nf_svg, nf_png, args.width)
            plain = flat(nf_png, 255)
            os.remove(nf_svg)
            os.remove(nf_png)
    
        problems = []
        if cjk_font_missing(root):
            problems.append("Japanese text found but no Japanese font is installed, so it may render as empty boxes (install Noto Sans CJK JP)")
        tmp = tempfile.mkdtemp()
        n = len(texts(root))
        for i in range(n):
            solo = copy.deepcopy(tree)
            sroot = solo.getroot()
            def strip(el):
                for c in el:
                    if tag(c) in HOLDERS:
                        continue
                    if tag(c) in SHAPES:
                        hide(c)
                    if "filter" in c.attrib:
                        del c.attrib["filter"]
                    st = c.get("style", "")
                    if "filter" in st:
                        c.set("style", re.sub(r"filter\s*:[^;]*;?", "", st))
                    strip(c)
    
            strip(sroot)
            for j, t in enumerate(texts(sroot)):
                if j != i:
                    hide(t)
            sroot.set("viewBox", f"{x0 - pad} {y0 - pad} {w + 2 * pad} {h + 2 * pad}")
            sroot.set("width", str(w + 2 * pad))
            sroot.set("height", str(h + 2 * pad))
            sp = os.path.join(tmp, f"s{i}.svg")
            write(solo, sp)
            pp = os.path.join(tmp, f"s{i}.png")
            render(sp, pp, int(round((w + 2 * pad) * scale)))
            a = np.asarray(Image.open(pp).convert("RGBA"))[:, :, 3]
            ys, xs = np.nonzero(a > 40)
            name = label(texts(root)[i])
            if len(xs) == 0:
                problems.append(f"text '{name}': draws nothing")
                continue
            p = int(round(pad * scale))
            cw, ch = full.shape[1], full.shape[0]
            sides = []
            if xs.min() < p:
                sides.append("left")
            if xs.max() >= p + cw:
                sides.append("right")
            if ys.min() < p:
                sides.append("top")
            if ys.max() >= p + ch:
                sides.append("bottom")
            if sides:
                problems.append(f"text '{name}': runs off the {'/'.join(sides)} edge")
            lines = max(1, len(texts(root)[i].findall(f"{{{SVG_NS}}}tspan")))
            share = (ys.max() - ys.min() + 1) / scale / lines / max(w, h)
            if share * 100 < args.min_text and not sides:
                problems.append(f"text '{name}': very small, about {share * 100:.1f}% of the image side (want {args.min_text:g}%+)")
    
            rgba = np.asarray(Image.open(pp).convert("RGBA"), dtype=np.float32)
            inner = rgba[p:p + ch, p:p + cw]
            ih, iw = min(inner.shape[0], ch), min(inner.shape[1], cw)
            mask = np.zeros(full.shape[:2], bool)
            mask[:ih, :iw] = inner[:ih, :iw, 3] > 200
            if mask.sum() < 4:
                continue
            own = np.zeros_like(full)
            own[:ih, :iw] = inner[:ih, :iw, :3]
            base = plain if own_filter[i] and plain is not None else full
            cover = (np.abs(base - own).mean(axis=2)[mask] > 60).mean()
            ring = np.zeros_like(mask)
            r = max(2, int(3 * scale))
            for dy in (-r, 0, r):
                for dx in (-r, 0, r):
                    ring |= np.roll(np.roll(mask, dy, 0), dx, 1)
            ring &= ~mask
            lum = lambda c: c @ np.array([0.2126, 0.7152, 0.0722], dtype=np.float32)
            contrast = 255
            if ring.any():
                contrast = max(abs(lum(img[mask]).mean() - lum(img[ring]).mean()) for img in (full, full_dark) if img is not None)
            if cover > 0.04 and not ancestor_filtered(texts(root)[i]):
                problems.append(f"text '{name}': {cover * 100:.0f}% covered or changed by something drawn over it")
            elif contrast < 30:
                problems.append(f"text '{name}': low contrast with what is behind it ({contrast:.0f}, want 30+)")
        shutil.rmtree(tmp, ignore_errors=True)
    
        print(f"render: {full_png}")
        print(f"small {args.small}px: {small_png}")
        print(f"texts checked: {n}")
        if clear:
            print("background has see-through parts; contrast was measured on white and on black, the better one counts")
        if problems:
            print("problems:")
            for pr in problems:
                print(f"  - {pr}")
            sys.exit(1)
        print("no text problems found. Now look at both renders yourself.")
    
    
    if __name__ == "__main__":
        main()
    
  • scripts/history.py1.3 KB898a9e522d1eupstream ↗
    import json
    import os
    import shutil
    import time
    
    STATE = os.environ.get("XDG_STATE_HOME") or os.path.join(os.path.expanduser("~"), ".local", "state")
    PATH = os.environ.get("ANTIALGORITHM_HISTORY") or os.path.join(STATE, "antialgorithm", "history.jsonl")
    OLD_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "history.jsonl")
    LIMIT = 300
    
    
    def migrate():
        if not os.path.exists(PATH) and os.path.exists(OLD_PATH):
            os.makedirs(os.path.dirname(PATH), exist_ok=True)
            shutil.copyfile(OLD_PATH, PATH)
    
    
    def load(kind=None):
        migrate()
        try:
            with open(PATH, encoding="utf-8") as f:
                lines = f.read().splitlines()
        except FileNotFoundError:
            return []
        out = []
        for line in lines:
            try:
                entry = json.loads(line)
            except ValueError:
                continue
            if kind is None or entry.get("type") == kind:
                out.append(entry)
        return out
    
    
    def add(entry):
        entry = {"date": time.strftime("%Y-%m-%d"), **entry}
        rows = load()[-(LIMIT - 1):] + [entry]
        os.makedirs(os.path.dirname(PATH), exist_ok=True)
        tmp = PATH + ".tmp"
        with open(tmp, "w", encoding="utf-8") as f:
            for row in rows:
                f.write(json.dumps(row, ensure_ascii=False) + "\n")
        os.replace(tmp, PATH)
    
  • scripts/moves.py970 Ba4c7e83056b9upstream ↗
    #!/usr/bin/env python3
    import argparse
    import sys
    
    import history
    
    
    def main():
        if hasattr(sys.stdout, "reconfigure"):
            sys.stdout.reconfigure(encoding="utf-8", errors="replace")
        ap = argparse.ArgumentParser()
        ap.add_argument("action", nargs="?", default="show", choices=["show", "add"])
        ap.add_argument("text", nargs="*")
        ap.add_argument("--last", type=int, default=12)
        args = ap.parse_args()
        if args.action == "add":
            text = " ".join(args.text).strip()
            if not text:
                sys.exit("add needs the move, for example: moves.py add \"poster: x-ray method, deep blue ground\"")
            history.add({"type": "move", "move": text})
            print(f"saved: {text}")
            return
        rows = history.load("move")[-args.last:]
        if not rows:
            print("no moves saved yet")
            return
        for row in reversed(rows):
            print(f"{row.get('date', '?')}  {row['move']}")
    
    
    if __name__ == "__main__":
        main()
    
  • scripts/rough.py13 KB3a3cd9c3ff74upstream ↗
    #!/usr/bin/env python3
    import argparse
    import math
    import random
    import re
    import xml.etree.ElementTree as ET
    
    SVG_NS = "http://www.w3.org/2000/svg"
    ET.register_namespace("", SVG_NS)
    ET.register_namespace("xlink", "http://www.w3.org/1999/xlink")
    
    SKIP = {"defs", "clipPath", "mask", "pattern", "filter", "marker", "symbol", "linearGradient", "radialGradient", "style", "title", "desc"}
    NUM = re.compile(r"[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?")
    TOK = re.compile(r"[MmLlHhVvCcSsQqTtAaZz]|[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?")
    ARGS = {"m": 2, "l": 2, "h": 1, "v": 1, "c": 6, "s": 4, "q": 4, "t": 2, "a": 7, "z": 0}
    
    
    def tag(el):
        return el.tag.split("}")[-1]
    
    
    def fnum(v, default=0.0):
        if v is None:
            return default
        m = NUM.search(str(v))
        return float(m.group()) if m else default
    
    
    def style_get(el, key):
        st = el.get("style", "")
        m = re.search(rf"(?:^|;)\s*{key}\s*:\s*([^;]+)", st)
        return m.group(1).strip() if m else el.get(key)
    
    
    def fmt(x):
        return f"{x:.2f}".rstrip("0").rstrip(".")
    
    
    def pt(p):
        return f"{fmt(p[0])},{fmt(p[1])}"
    
    
    def lerp(a, b, t):
        return (a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t)
    
    
    def split_cubic(p0, c1, c2, p1):
        a, b, c = lerp(p0, c1, 0.5), lerp(c1, c2, 0.5), lerp(c2, p1, 0.5)
        d, e = lerp(a, b, 0.5), lerp(b, c, 0.5)
        m = lerp(d, e, 0.5)
        return (p0, a, d, m), (m, e, c, p1)
    
    
    def parse_path(d):
        toks = TOK.findall(d)
        segs = []
        cmd = None
        cur = start = (0.0, 0.0)
        last_c = last_q = None
        i = 0
        while i < len(toks):
            if toks[i].isalpha():
                cmd = toks[i]
                i += 1
                if cmd in "Zz":
                    segs.append(("Z",))
                    cur = start
                    last_c = last_q = None
                continue
            if cmd is None or cmd in "Zz":
                i += 1
                continue
            c = cmd.lower()
            n = ARGS[c]
            a = []
            j = i
            while len(a) < n and j < len(toks) and not toks[j].isalpha():
                t = toks[j]
                if c == "a" and len(a) in (3, 4) and len(t) > 1 and t[0] in "01":
                    a.append(float(t[0]))
                    toks[j] = t[1:]
                    continue
                a.append(float(t))
                j += 1
            if len(a) < n:
                break
            i = j
            ox, oy = cur if cmd.islower() else (0.0, 0.0)
            new_c = new_q = None
            if c == "m":
                p = (a[0] + ox, a[1] + oy)
                segs.append(("M", p))
                start = p
                cmd = "l" if cmd.islower() else "L"
            elif c == "l":
                p = (a[0] + ox, a[1] + oy)
                segs.append(("L", p))
            elif c == "h":
                p = (a[0] + ox, cur[1])
                segs.append(("L", p))
            elif c == "v":
                p = (cur[0], a[0] + oy)
                segs.append(("L", p))
            elif c in "cs":
                if c == "c":
                    c1 = (a[0] + ox, a[1] + oy)
                    rest = a[2:]
                else:
                    c1 = (2 * cur[0] - last_c[0], 2 * cur[1] - last_c[1]) if last_c else cur
                    rest = a
                c2 = (rest[0] + ox, rest[1] + oy)
                p = (rest[2] + ox, rest[3] + oy)
                segs.append(("C", c1, c2, p))
                new_c = c2
            elif c in "qt":
                if c == "q":
                    q1 = (a[0] + ox, a[1] + oy)
                    p = (a[2] + ox, a[3] + oy)
                else:
                    q1 = (2 * cur[0] - last_q[0], 2 * cur[1] - last_q[1]) if last_q else cur
                    p = (a[0] + ox, a[1] + oy)
                c1 = lerp(cur, q1, 2 / 3)
                c2 = lerp(p, q1, 2 / 3)
                segs.append(("C", c1, c2, p))
                new_q = q1
            else:
                p = (a[5] + ox, a[6] + oy)
                segs.append(("A", a[0], a[1], a[2], int(a[3]), int(a[4]), p))
            cur = p
            last_c, last_q = new_c, new_q
        return segs
    
    
    class Rougher:
        def __init__(self, amp, rng, root, box):
            self.amp = amp
            self.rng = rng
            self.root = root
            self.box = box
            self.free = True
            self.filter_id = None
    
        def j(self, scale=1.0):
            return self.rng.gauss(0, self.amp * scale)
    
        def jx(self, x, scale):
            x0, _, w, _ = self.box
            d = self.j(scale)
            if self.free and x <= x0 + 1:
                return x - abs(d) - 1
            if self.free and x >= x0 + w - 1:
                return x + abs(d) + 1
            return x + d
    
        def jy(self, y, scale):
            _, y0, _, h = self.box
            d = self.j(scale)
            if self.free and y <= y0 + 1:
                return y - abs(d) - 1
            if self.free and y >= y0 + h - 1:
                return y + abs(d) + 1
            return y + d
    
        def jp(self, p, scale=0.6):
            return (self.jx(p[0], scale), self.jy(p[1], scale))
    
        def steps(self, a, b):
            return max(1, int(math.hypot(b[0] - a[0], b[1] - a[1]) / (self.amp * 18 + 1e-6)))
    
        def wobble(self, pts, closed):
            out = []
            seq = pts + ([pts[0]] if closed else [])
            for a, b in zip(seq, seq[1:]):
                n = self.steps(a, b)
                for k in range(n):
                    out.append(self.jp(lerp(a, b, k / n)))
            if not closed:
                out.append(self.jp(seq[-1]))
            d = "M" + " L".join(pt(p) for p in out)
            return d + ("Z" if closed else "")
    
        def to_path(self, el, d):
            keep = {k: v for k, v in el.attrib.items() if k not in {"x", "y", "width", "height", "x1", "y1", "x2", "y2", "points", "cx", "cy", "r", "rx", "ry"}}
            el.clear()
            el.tag = f"{{{SVG_NS}}}path"
            for k, v in keep.items():
                el.set(k, v)
            el.set("d", d)
    
        def shift(self, el):
            dx, dy = self.j(0.8), self.j(0.8)
            tr = el.get("transform", "")
            el.set("transform", f"translate({fmt(dx)},{fmt(dy)}) {tr}".strip())
    
        def line(self, el):
            p = [(fnum(el.get("x1")), fnum(el.get("y1"))), (fnum(el.get("x2")), fnum(el.get("y2")))]
            self.to_path(el, self.wobble(p, False))
            self.shift(el)
    
        def rect(self, el):
            if fnum(el.get("rx")) or fnum(el.get("ry")):
                return
            x, y, w, h = (fnum(el.get(k)) for k in ("x", "y", "width", "height"))
            if w <= 0 or h <= 0 or str(el.get("width", "")).endswith("%"):
                return
            if w >= 0.9 * self.box[2] and h >= 0.9 * self.box[3]:
                return
            self.to_path(el, self.wobble([(x, y), (x + w, y), (x + w, y + h), (x, y + h)], True))
    
        def poly(self, el, closed):
            nums = [float(n) for n in NUM.findall(el.get("points", ""))]
            pts = list(zip(nums[0::2], nums[1::2]))
            if len(pts) >= 2:
                self.to_path(el, self.wobble(pts, closed))
    
        def ellipse(self, el):
            cx, cy = fnum(el.get("cx")), fnum(el.get("cy"))
            if tag(el) == "circle":
                rx = ry = fnum(el.get("r"))
            else:
                rx, ry = fnum(el.get("rx")), fnum(el.get("ry"))
            if rx <= 0 or ry <= 0:
                return
            n = max(12, int(2 * math.pi * max(rx, ry) / (self.amp * 10 + 1e-6)))
            n = min(n, 160)
            drift = self.rng.uniform(0, math.tau)
            pts = []
            for k in range(n):
                a = math.tau * k / n
                r = 1 + 0.5 * self.j(1 / max(rx, ry)) + 0.015 * math.sin(3 * a + drift)
                pts.append((cx + rx * r * math.cos(a), cy + ry * r * math.sin(a)))
            d = "M" + " L".join(pt(p) for p in pts) + "Z"
            small = max(rx, ry) < self.amp * 6
            self.to_path(el, d)
            if small:
                self.shift(el)
    
        def straight(self, out, a, b):
            n = self.steps(a, b)
            for k in range(1, n):
                out.append("L" + pt(self.jp(lerp(a, b, k / n))))
    
        def curve(self, out, seg, ja, jb, depth=0):
            p0, c1, c2, p1 = seg
            if depth < 3 and math.hypot(p1[0] - p0[0], p1[1] - p0[1]) > self.amp * 30:
                left, right = split_cubic(*seg)
                jm = self.jp(left[3])
                self.curve(out, left, ja, jm, depth + 1)
                self.curve(out, right, jm, jb, depth + 1)
                return
            da = (ja[0] - p0[0], ja[1] - p0[1])
            db = (jb[0] - p1[0], jb[1] - p1[1])
            k1 = (c1[0] + da[0] + self.j(0.35), c1[1] + da[1] + self.j(0.35))
            k2 = (c2[0] + db[0] + self.j(0.35), c2[1] + db[1] + self.j(0.35))
            out.append(f"C{pt(k1)} {pt(k2)} {pt(jb)}")
    
        def path(self, el):
            segs = parse_path(el.get("d", ""))
            if not segs or segs[0][0] != "M":
                return
            out = []
            cur = start = (0.0, 0.0)
            jcur = jstart = cur
            for s in segs:
                kind = s[0]
                if kind == "M":
                    cur = start = s[1]
                    jcur = jstart = self.jp(cur)
                    out.append("M" + pt(jcur))
                elif kind == "L":
                    self.straight(out, cur, s[1])
                    cur, jcur = s[1], self.jp(s[1])
                    out.append("L" + pt(jcur))
                elif kind == "C":
                    jend = self.jp(s[3])
                    self.curve(out, (cur, s[1], s[2], s[3]), jcur, jend)
                    cur, jcur = s[3], jend
                elif kind == "A":
                    _, rx, ry, rot, large, sweep, p = s
                    jcur = self.jp(p)
                    out.append(f"A{fmt(rx)} {fmt(ry)} {fmt(rot)} {large} {sweep} {pt(jcur)}")
                    cur = p
                else:
                    self.straight(out, cur, start)
                    out.append("Z")
                    cur, jcur = start, jstart
            el.set("d", " ".join(out))
    
        def ensure_filter(self):
            if self.filter_id:
                return self.filter_id
            used = {e.get("id") for e in self.root.iter() if e.get("id")}
            fid, k = "rough-edge", 2
            while fid in used:
                fid, k = f"rough-edge-{k}", k + 1
            defs = next((c for c in self.root if tag(c) == "defs"), None)
            if defs is None:
                defs = ET.Element(f"{{{SVG_NS}}}defs")
                self.root.insert(0, defs)
            f = ET.SubElement(defs, f"{{{SVG_NS}}}filter", {"id": fid, "x": "-5%", "y": "-5%", "width": "110%", "height": "110%"})
            ET.SubElement(f, f"{{{SVG_NS}}}feTurbulence", {"type": "fractalNoise", "baseFrequency": "0.9", "numOctaves": "2", "seed": str(self.rng.randint(1, 9999)), "result": "n"})
            ET.SubElement(f, f"{{{SVG_NS}}}feDisplacementMap", {"in": "SourceGraphic", "in2": "n", "scale": fmt(self.amp * 2.2), "xChannelSelector": "R", "yChannelSelector": "G"})
            self.filter_id = fid
            return fid
    
        def shake(self, el, chars, k):
            n = len(chars)
            if not n:
                return
            if not el.get("rotate"):
                el.set("rotate", " ".join(fmt(self.rng.gauss(0, 2.2 * k)) for _ in range(n)))
            own = el.get("dy", "")
            if len(NUM.findall(own)) > 1:
                return
            offs = [self.rng.gauss(0, self.amp * 0.5 * k) for _ in range(n)]
            dys = [offs[0] + fnum(own)] + [offs[i] - offs[i - 1] for i in range(1, n)]
            el.set("dy", " ".join(fmt(d) for d in dys))
    
        def text(self, el, size):
            k = 0.25 if size < 16 else (0.6 if size < 32 else 1.0)
            kids = list(el)
            if not kids:
                self.shake(el, el.text or "", k)
            else:
                for t in el.iter():
                    if t is not el and tag(t) == "tspan" and not list(t):
                        ts = style_get(t, "font-size")
                        tsize = fnum(ts, size) if ts else size
                        self.shake(t, t.text or "", 0.25 if tsize < 16 else (0.6 if tsize < 32 else 1.0))
            if size >= 28 and not el.get("filter") and "".join(el.itertext()).strip():
                el.set("filter", f"url(#{self.ensure_filter()})")
    
        def walk(self, el, size):
            fs = style_get(el, "font-size")
            if fs:
                size = fnum(fs, size)
            for child in list(el):
                t = tag(child)
                if t in SKIP or child.get("data-rough") == "off":
                    continue
                was = self.free
                if child.get("transform"):
                    self.free = False
                if t == "text":
                    cs = style_get(child, "font-size")
                    self.text(child, fnum(cs, size) if cs else size)
                else:
                    if t == "line":
                        self.line(child)
                    elif t == "rect":
                        self.rect(child)
                    elif t == "polyline":
                        self.poly(child, False)
                    elif t == "polygon":
                        self.poly(child, True)
                    elif t in ("circle", "ellipse"):
                        self.ellipse(child)
                    elif t == "path":
                        self.path(child)
                    self.walk(child, size)
                self.free = was
    
    
    def main():
        ap = argparse.ArgumentParser()
        ap.add_argument("src")
        ap.add_argument("dst")
        ap.add_argument("--amount", type=float, default=1.0)
        ap.add_argument("--seed", type=int)
        args = ap.parse_args()
        rng = random.Random(args.seed) if args.seed is not None else random.SystemRandom()
        tree = ET.parse(args.src)
        root = tree.getroot()
        vb = [float(n) for n in NUM.findall(root.get("viewBox", ""))]
        box = vb if len(vb) == 4 else [0.0, 0.0, fnum(root.get("width"), 600), fnum(root.get("height"), 600)]
        w, h = box[2], box[3]
        amp = args.amount * math.hypot(w, h) / 720 * 1.4
        Rougher(amp, rng, root, box).walk(root, 16.0)
        tree.write(args.dst, encoding="unicode", xml_declaration=False)
        print(f"wrote {args.dst} (amp {amp:.2f})")
    
    
    if __name__ == "__main__":
        main()
    
  • scripts/seed.py12 KBa7284d7fc269upstream ↗
    #!/usr/bin/env python3
    import argparse
    import random
    import sys
    
    import history
    
    rng = random.SystemRandom()
    RECENT = {}
    
    
    def load_recent(seeds=12):
        RECENT.clear()
        for entry in reversed(history.load("seed")[-seeds:]):
            for axis, value in entry.get("seed", {}).items():
                RECENT.setdefault(axis, [])
                if value not in RECENT[axis]:
                    RECENT[axis].append(value)
    
    
    def pick(axis, items):
        avoid = set(RECENT.get(axis, [])[: len(items) // 2])
        fresh = [i for i in items if i not in avoid]
        return rng.choice(fresh or items)
    
    METHOD_FAMILIES = {
        "hand and print": [
            "woodcut", "screen print", "rubber stamp", "spray stencil", "cut paper collage",
            "photocopy zine", "gouache", "ink brush", "ballpoint sketch", "marker on cardboard",
            "embroidery", "hand painted shop sign", "children's crayon drawing", "spray paint graffiti",
            "chalk on pavement",
        ],
        "screen and machine": [
            "LED dot matrix", "old CRT screen", "thermal receipt printer", "brutalist web page",
            "early 3D video game", "phone screenshot", "spreadsheet chart", "vector icon set",
            "glitched video frame", "airport departure board", "arcade cabinet art", "e-ink display",
            "low poly render", "CAD wireframe", "pixel font on a car dashboard",
        ],
        "camera and science": [
            "flash film photo", "long exposure photo", "infrared photo", "x-ray image",
            "thermal camera image", "satellite image", "microscope image", "security camera still",
            "night vision footage", "macro photo", "drone photo from straight above", "sonar scan",
            "weather radar map", "motion blur photo", "underwater photo",
        ],
        "material and light": [
            "neon tubes", "stained glass", "mosaic tiles", "glazed ceramic", "glossy 3D render",
            "chrome and glass render", "holographic foil", "clay model photo", "inflatable plastic",
            "folded paper", "string and pins", "carved wood relief", "light painting",
            "shadow puppets", "frosted acrylic with backlight",
        ],
    }
    
    VISUAL = {
        "color": [
            "one ink only", "black and white with one accent", "two colors that clash",
            "colors taken from the subject's material", "full color with one hue in charge",
            "very pale and high key", "very dark and low key", "fluorescent", "only earth colors",
            "metallic", "colors of a place at a set hour", "gray with one warm spot",
            "cold colors only", "warm colors only", "the colors of a machine screen", "colors of food",
        ],
        "layout": [
            "subject huge and cropped by the edges", "subject tiny in a large empty field",
            "seen from straight above", "seen from far below", "one detail very close",
            "one thing repeated many times", "split into two halves", "the text is the image",
            "strong diagonal", "low and off center", "deep layers from front to back",
            "a crowd of small parts", "a single line across the frame", "framed by something in front",
            "upside down or turned", "one big shape and nothing else",
        ],
        "type": [
            "hand lettered", "cut out letters", "stencil letters", "tall condensed", "very wide",
            "old style serif", "typewriter", "flowing script", "stacked words", "type on a curve",
            "only small type", "one giant word", "letters built from the subject", "mixed found letters",
            "no type at all if allowed", "type set vertically",
        ],
    }
    
    TEXT = {
        "voice": [
            "a witness in first person", "instructions in second person", "a plain list",
            "a short letter", "overheard dialogue", "one long sentence", "short fragments",
            "question and answer", "a note left for someone", "a review by someone tired",
            "a child explaining it", "someone who disagrees", "a voice from the future looking back",
            "a rumor passed on",
        ],
        "entry": [
            "a sound", "a smell", "a single object", "a mistake", "a rule", "a place",
            "the ending", "a body feeling", "a thing that is missing", "a complaint", "a habit",
            "a misunderstanding", "a gesture", "a question nobody answers",
        ],
        "register": [
            "plain", "formal", "dry", "warm", "blunt", "playful", "terse", "careful", "nervous", "proud",
        ],
    }
    
    IDEA = {
        "verb": [
            "trade", "hide", "build", "repair", "sort", "follow", "trap", "grow", "deliver", "swap",
            "borrow", "steal", "listen", "stack", "balance", "burn", "wash", "guess", "herd", "queue",
            "bargain", "cook", "dig", "signal", "wait", "measure", "lose", "rescue", "copy", "share",
        ],
        "constraint": [
            "only one try", "it gets worse when you wait", "you cannot see it directly",
            "someone else controls half of it", "all of it is borrowed and must go back",
            "it only works in one place", "two rules that fight", "the tool wears out with use",
            "the crowd decides", "you are too small for it", "nobody speaks the same language",
            "the reward is also the cost", "it must be done in silence", "it happens to many at once",
        ],
        "scale": [
            "one person", "a family", "a street", "a whole town", "a crowd of strangers",
            "a machine", "an animal", "a single room", "two rivals", "a team that does not get along",
        ],
        "pressure": [
            "a deadline", "a rival", "a debt", "weather", "a rule that changes", "noise", "hunger",
            "a promise", "a rumor", "running out of space", "a guest who will not leave", "fatigue",
        ],
    }
    
    ANCHOR = [
        "ladder", "bicycle", "glove", "mirror", "bread", "magnet", "compass", "hinge", "fog", "bee",
        "copper", "thread", "lamp", "drum", "sponge", "scissors", "ice", "cactus", "radio", "bridge",
        "key", "feather", "brick", "orange", "train", "coin", "bone", "cloud", "button", "mushroom",
        "wire", "fan", "tooth", "bell", "window", "kite", "ash", "honey", "nail", "moth", "paint",
        "tent", "elevator", "umbrella", "cassette", "dice", "spoon", "candle", "lock", "stairs",
        "battery", "garden hose", "skateboard", "laundry", "traffic cone", "ticket", "alarm clock",
        "snail", "cable", "balloon", "ring", "knot", "crane", "pump", "mask", "barcode", "tire",
        "zip", "comb", "fork", "parachute", "chair", "puddle", "smoke", "chili", "rice", "sand",
        "escalator", "satellite dish", "lemon", "goat", "camel", "bamboo", "lantern", "scooter",
        "vending machine", "pigeon", "ceiling fan", "water tank", "mango", "plastic chair", "antenna",
        "glass bottle", "sunflower", "cardboard box", "headphones", "rug", "tea glass", "bus",
    ]
    
    SETTING = [
        "a rooftop", "a parking lot after closing", "a highway service station", "a night bus",
        "a housing block courtyard", "a shopping mall basement", "the industrial edge of town",
        "a stadium after the match", "a train station", "a border crossing", "a student dorm",
        "a market in the rain", "a neighborhood still being built", "an airport at night",
        "a car wash", "a laundromat", "a wedding", "a server room", "a hospital corridor",
        "a school gym", "a gas station far from town", "a food court", "a construction crane cab",
        "a bus depot", "a hotel kitchen", "a police station waiting room", "a hair salon",
        "a local radio station", "a cemetery on a holiday", "a car repair shop", "a back yard",
        "a supermarket at closing time", "an apartment stairwell", "a power plant", "a funeral",
        "a playground at dusk", "a public pool", "a post office", "a phone repair stall",
        "the open land outside town", "the highest place nearby", "the water nearest the town",
    ]
    
    REGION = [
        "Georgia (the country)", "northern Chile", "Kerala", "Hokkaido", "the Scottish Highlands",
        "Anatolia", "Sicily", "Ghana", "Mongolia", "Quebec", "Java", "the Faroe Islands", "Oaxaca",
        "Morocco", "Finnish Lapland", "the Philippines", "Patagonia", "Kenya", "Vietnam", "Iceland",
        "Bavaria", "Poland", "Sri Lanka", "the Andes of Peru", "Portugal", "Nigeria", "Korea",
        "Brazil's northeast", "Ukraine", "Ethiopia", "Wales", "Nepal", "Senegal", "Sardinia",
        "Kazakhstan", "the Basque Country", "Tasmania", "Cuba", "Bangladesh", "the American Midwest",
        "Iran", "Croatia", "Colombia", "Taiwan", "Egypt", "Norway", "Bolivia", "Uzbekistan",
    ]
    NO_ANCHOR = [
        "no single object, build it from a pattern of the place",
        "no single object, only type",
        "no single object, a crowd of people",
        "no single object, numbers or data from the subject",
        "no single object, a field of light or color",
        "no single object, the surface of the place up close",
    ]
    
    FIXED_COLOR = {
        "x-ray image", "thermal camera image", "night vision footage", "infrared photo", "sonar scan",
        "weather radar map", "e-ink display", "thermal receipt printer", "photocopy zine",
        "LED dot matrix", "airport departure board", "security camera still",
    }
    CLASH = [
        ({"layout": "the text is the image"}, {"type": "no type at all if allowed"}),
        ({"layout": "the text is the image"}, {"type": "only small type"}),
        ({"anchor": "no single object, only type"}, {"type": "no type at all if allowed"}),
        ({"type": "one giant word"}, {"layout": "subject tiny in a large empty field"}),
    ]
    
    
    def family_of(m):
        for family, items in METHOD_FAMILIES.items():
            if m in items:
                return family
        return None
    
    
    def method():
        family = rng.choice(list(METHOD_FAMILIES))
        return pick("method", METHOD_FAMILIES[family])
    
    
    def clashes(seed):
        for a, b in CLASH:
            if all(seed.get(k) == v for k, v in a.items()) and all(seed.get(k) == v for k, v in b.items()):
                return True
        m = seed.get("method")
        if m is None:
            return False
        if m in FIXED_COLOR:
            return seed.get("color") != "the method's own colors"
        if seed.get("color") == "the method's own colors":
            return True
        return seed.get("color") == "the colors of a machine screen" and family_of(m) != "screen and machine"
    
    
    def pools(kind):
        if kind == "visual":
            return {"method": None, **VISUAL}
        if kind == "text":
            return dict(TEXT)
        return dict(IDEA)
    
    
    def roll_once(kind, keep, only=None):
        out = {}
        for name, items in pools(kind).items():
            out[name] = method() if items is None else pick(name, items)
        if kind == "visual":
            out["verb"] = pick("verb", IDEA["verb"])
            out["scale"] = pick("scale", IDEA["scale"])
        out["setting"] = pick("setting", SETTING)
        out["region"] = pick("region", REGION)
        if kind == "visual" and rng.random() < 0.5:
            out["anchor"] = pick("anchor", NO_ANCHOR)
        else:
            out["anchor"] = pick("anchor", ANCHOR)
        out.update(keep)
        if only:
            out = {k: v for k, v in out.items() if k in keep or k == only}
        if out.get("method") in FIXED_COLOR and "color" in out and "color" not in keep:
            out["color"] = "the method's own colors"
        return out
    
    
    def axes_of(kind):
        return list(roll_once(kind, {}))
    
    
    def roll(kind, keep=None, only=None):
        keep = keep or {}
        for _ in range(200):
            seed = roll_once(kind, keep, only)
            if not clashes(seed):
                return seed
        sys.exit("the kept axes clash with each other; keep fewer")
    
    
    def main():
        ap = argparse.ArgumentParser()
        ap.add_argument("kind", nargs="?", default="visual", choices=["visual", "text", "idea"])
        ap.add_argument("--only", help="roll one axis again, for example --only method")
        ap.add_argument("--keep", action="append", default=[], help="an axis you keep, for example --keep \"method=x-ray image\"")
        ap.add_argument("--no-log", action="store_true", help="do not save this seed to the history")
        args = ap.parse_args()
        load_recent()
        keep = {}
        for item in args.keep:
            k, sep, v = item.partition("=")
            if not sep:
                sys.exit(f"--keep needs axis=value, got '{item}'")
            keep[k.strip()] = v.strip()
        axes = axes_of(args.kind)
        for name in [*keep, *([args.only] if args.only else [])]:
            if name not in axes:
                sys.exit(f"no axis '{name}' for {args.kind}; axes: {', '.join(axes)}")
        if args.only:
            keep.pop(args.only, None)
        seed = roll(args.kind, keep, args.only)
        if args.only:
            seed = {args.only: seed[args.only]}
        for k, v in seed.items():
            print(f"{k}: {v}")
        if not args.no_log:
            history.add({"type": "seed", "kind": args.kind, "seed": seed})
    
    
    if __name__ == "__main__":
        main()
    
  • .claude-plugin/icon.png13 KBb4113d5bd716upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • .claude-plugin/marketplace.json397 B2862fc0b7a14upstream ↗
    {
      "name": "antialgorithm",
      "owner": {
        "name": "mankidev",
        "url": "https://github.com/mankidev"
      },
      "description": "antialgorithm skill for Claude Code.",
      "plugins": [
        {
          "name": "antialgorithm",
          "source": "./",
          "description": "Steers the model away from its first, most average pick in creative work: names, copy, story, game ideas, posters, UI."
        }
      ]
    }
    
  • .claude-plugin/plugin.json519 B36c4c5f805f7upstream ↗
    {
      "name": "antialgorithm",
      "version": "1.0.0",
      "description": "Steers the model away from its first, most average pick in creative work: names, copy, story, game ideas, posters, UI.",
      "author": {
        "name": "mankidev",
        "url": "https://github.com/mankidev"
      },
      "homepage": "https://github.com/mankidev/antialgorithm",
      "repository": "https://github.com/mankidev/antialgorithm",
      "license": "MIT",
      "keywords": ["creative", "design", "writing", "naming", "poster", "ui", "skill"],
      "skills": ["./"]
    }
    
  • .gitignore45 B2e1a04206a29upstream ↗
    history.jsonl
    history.jsonl.tmp
    __pycache__/
    
  • CONTRIBUTING.md2.5 KBfa41ed5642c7upstream ↗
    # Contributing
    
    Issues and pull requests are welcome. Small fixes can go straight to a pull request. For a new rule in `SKILL.md` or `visuals.md`, open an issue first with an example of the output that made you want it.
    
    ## Skill text
    
    `SKILL.md` and `visuals.md` are read by the model, so the wording is the behavior. Keep it in plain English with short sentences, and name things the way a person would say them.
    
    The skill has to work for anyone who installs it. Don't name other skills, tools, people or projects in the text, and keep examples general. A rule that only makes sense for your own setup belongs in your own `CLAUDE.md` or `AGENTS.md`.
    
    Visual rules go in `visuals.md`, the rest in `SKILL.md`. Keep `SKILL.md` short, since it loads on any creative request.
    
    ## Testing a change to the skill text
    
    Run the same prompt several times with the old text and with the new one, then compare the two sets side by side. A single good result proves little. If the results in a set share one look, as if made by the same hand, the skill has found a new default. The poster prompt from the README is a good start:
    
    ```
    Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.
    ```
    
    Mention in the pull request what you ran and what changed in the results. Screenshots help.
    
    ## Scripts
    
    The scripts in `scripts/` use only the Python 3 standard library, except `check.py`, which also needs numpy, Pillow and `rsvg-convert` or cairosvg. Please don't add new dependencies.
    
    They should run on Linux, macOS and Windows. Use `os.path` for paths and open text files with `encoding="utf-8"`.
    
    The code has no comments or docstrings. Pick clear names instead, and put the reasoning in the pull request description.
    
    Before you open a pull request, run the parts you touched:
    
    ```
    python3 scripts/seed.py visual --no-log
    python3 scripts/seed.py text --no-log
    python3 scripts/seed.py idea --no-log
    python3 scripts/check.py some.svg
    python3 scripts/rough.py some.svg rough.svg
    ```
    
    Seed and move history is saved in `~/.local/state/antialgorithm/`, outside the repo. If you test with `ANTIALGORITHM_HISTORY` pointing somewhere else, don't commit that file.
    
    ## README and translations
    
    The README has translations in `docs/`. If you change the English README, you don't have to update them all. Update the languages you can read, and say in the pull request which ones are now behind.
    
    ## License
    
    By contributing you agree that your work is released under the MIT license of this project.
    
  • docs/README_DE.md4.9 KB1cc0b91e230bupstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="Orange Glockenkurve mit einem Punkt weit draußen am Ende">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | Deutsch | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![Oben sechs Plakate ohne den Skill, unten sechs mit ihm](../images/showcase.png)
    
    Agent-Skill für kreative Arbeit: Namen, Geschichten, Spielideen, Plakate, Oberflächen. Das Modell nennt zuerst seine erste, durchschnittlichste Wahl und rückt dann mit einem Grund aus dem Projekt davon ab.
    
    Beide Reihen stammen aus demselben Prompt: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` Die obere Reihe ist ein Durchgang mit sechs Läufen ohne den Skill, keiner aussortiert. Die untere Reihe ist aus etwa zwölf Läufen ausgewählt, die entstanden, während der Skill noch geschrieben wurde.
    
    ![Diagramm, wie oft eine Wahl getroffen wird: ein hoher Gipfel um den Durchschnitt, als sichere Zone markiert, auf beiden Seiten flach](../images/graph.png)
    
    ## Installation
    
    Die [skills](https://github.com/vercel-labs/skills)-CLI legt ihn dort ab, wo dein Agent Skills liest, für Codex, Cursor, OpenCode, Claude Code und andere:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    Oder klone ihn in den Skills-Ordner deines Agenten:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <Skills-Ordner>/antialgorithm
    ```
    
    In Claude Code lässt er sich auch als Plugin installieren (in Versionen vor 2.1.275 zuerst `/plugin marketplace add mankidev/antialgorithm` ausführen):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    Die Skripte brauchen Python 3. `check.py` braucht außerdem numpy, Pillow und `rsvg-convert` (oder das Paket cairosvg).
    
    ## Skripte
    
    `seed.py` würfelt einen Startpunkt, wenn die Anfrage wenig hergibt. Ein visueller Seed liefert eine Herstellungsweise, Farben, Layout, Schrift, ein Verb und einen Maßstab für die Idee, einen Schauplatz, eine Region und in der Hälfte der Fälle einen Gegenstand. Ein Text-Seed liefert eine Stimme, einen Einstieg und ein Register. Ein Ideen-Seed liefert ein Verb, eine Einschränkung, einen Maßstab und einen Druck. Er nutzt den Zufall des Systems, daher starten zwei Leute mit demselben Prompt an verschiedenen Stellen. Außerdem speichert er jeden Seed in `~/.local/state/antialgorithm/history.jsonl` (unter `$XDG_STATE_HOME`, wenn das gesetzt ist) und überspringt Werte der letzten paar, damit sich deine Seeds von Sitzung zu Sitzung nicht wiederholen. Plugin-Updates lassen diese Datei in Ruhe. `--keep "axis=value"` hält eine Achse fest, so bleibt das Thema und nur der Look wird neu gewürfelt.
    
    `moves.py` führt ein kurzes Protokoll über den Hauptzug jeder Antwort, die vom Naheliegenden abweicht, etwa "neon tube wall, almost no type". Das Modell liest es, bevor es neue Arbeit zeigt, und greift so nicht zu einem Zug, nur weil er beim letzten Mal funktioniert hat.
    
    `rough.py` nimmt ein SVG, bringt gerade Linien, Formen und Buchstaben ins Wackeln und bricht die gleichmäßigen Abstände wiederholter Zeichen auf, damit ein in Code gezeichneter Handarbeits-Look nicht mehr wie geplottet aussieht. Es ist nur für handgemachte Verfahren wie Druck, Farbe, Stempel und Tinte gedacht; Bildschirm-, Kamera- und Render-Looks behalten ihre eigenen Spuren.
    
    `check.py` rendert ein SVG in voller Größe und in Icongröße und listet Text auf, der über einen Rand läuft, unter einer Form liegt, zu wenig Kontrast hat oder zu klein ist. Die Größengrenze passt für Plakate; für einen App-Bildschirm nimm `--min-text 0.6`.
    
    Die visuellen Regeln stehen in `visuals.md`. Das Modell liest die Datei nur bei visueller Arbeit, ein Name oder ein Slogan lädt sie also nicht.
    
    ## Lizenz
    
    MIT
    
    ## Sterne-Verlauf
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_ES.md4.9 KB052d3a615261upstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="Curva de campana naranja con un punto lejos en la cola">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | Español | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![Arriba, seis carteles sin la skill; abajo, seis con ella](../images/showcase.png)
    
    Skill de agente para trabajo creativo: nombres, historias, ideas de juego, carteles, interfaces. Hace que el modelo diga primero su elección más obvia y promedio, y luego se aleje de ella por una razón sacada del proyecto.
    
    Las dos filas salieron del mismo prompt: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` La fila de arriba es una tanda de seis ejecuciones sin la skill, sin descartar ninguna. La de abajo está elegida entre unas doce ejecuciones hechas mientras la skill aún se estaba escribiendo.
    
    ![Gráfica de cuántas veces se elige una opción: un pico alto alrededor de la media marcado como zona segura, plano a ambos lados](../images/graph.png)
    
    ## Instalación
    
    La CLI [skills](https://github.com/vercel-labs/skills) la pone donde tu agente lee las skills, para Codex, Cursor, OpenCode, Claude Code y otros:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    O clónala en la carpeta de skills de tu agente:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <carpeta de skills>/antialgorithm
    ```
    
    En Claude Code también se instala como plugin (en versiones anteriores a 2.1.275, ejecuta antes `/plugin marketplace add mankidev/antialgorithm`):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    Los scripts necesitan Python 3. `check.py` además necesita numpy, Pillow y `rsvg-convert` (o el paquete cairosvg).
    
    ## Scripts
    
    `seed.py` tira un punto de partida cuando la petición trae poca información. Una semilla visual da un método de hechura, colores, composición, tipografía, un verbo y una escala para la idea, un escenario, una región y, la mitad de las veces, un objeto. Una semilla de texto da una voz, una forma de entrar y un registro. Una semilla de idea da un verbo, una restricción, una escala y una presión. Usa el azar del sistema, así que dos personas que envían el mismo prompt empiezan en sitios distintos. También guarda cada semilla en `~/.local/state/antialgorithm/history.jsonl` (dentro de `$XDG_STATE_HOME` si está definido) y evita los valores de las últimas, para que tus semillas no se repitan de una sesión a otra. Las actualizaciones del plugin no tocan ese archivo. `--keep "axis=value"` fija un eje, lo que te deja mantener el tema y volver a tirar solo el aspecto.
    
    `moves.py` lleva un registro corto de la jugada principal de cada respuesta que se aleja de lo obvio, como "neon tube wall, almost no type". El modelo lo lee antes de enseñar un trabajo nuevo, así no repite una jugada solo porque funcionó la última vez.
    
    `rough.py` toma un SVG, hace temblar sus líneas rectas, formas y letras, y rompe el espaciado regular de las marcas repetidas, para que un aspecto hecho a mano dibujado con código deje de parecer trazado por un plóter. Es solo para métodos hechos a mano como la impresión, la pintura, los sellos y la tinta; los aspectos de pantalla, cámara y render conservan sus propias marcas.
    
    `check.py` renderiza un SVG a tamaño completo y a tamaño de icono, y lista el texto que se sale de un borde, queda bajo una forma, tiene poco contraste o es demasiado pequeño. El límite de tamaño está pensado para carteles; para una pantalla de app usa `--min-text 0.6`.
    
    Las reglas visuales están en `visuals.md`, que el modelo solo lee en trabajos visuales, así que un nombre o un eslogan no las carga.
    
    ## Licencia
    
    MIT
    
    ## Historial de estrellas
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_FR.md5.0 KB24ba20548773upstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="Courbe en cloche orange avec un point loin sur la queue">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | Français | <a href="README_RU.md">Русский</a></sub></p>
    
    ![En haut, six affiches sans le skill ; en bas, six avec](../images/showcase.png)
    
    Skill d'agent pour le travail créatif : noms, histoires, idées de jeu, affiches, interfaces. Il fait d'abord dire au modèle son premier choix, le plus moyen, puis l'en éloigne pour une raison tirée du projet.
    
    Les deux rangées viennent du même prompt : `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` La rangée du haut est une série de six essais sans le skill, aucun écarté. Celle du bas a été choisie parmi une douzaine d'essais faits pendant l'écriture du skill.
    
    ![Graphique de la fréquence à laquelle un choix est fait : un pic haut autour de la moyenne, marqué zone sûre, plat des deux côtés](../images/graph.png)
    
    ## Installation
    
    La CLI [skills](https://github.com/vercel-labs/skills) le place là où votre agent lit ses skills, pour Codex, Cursor, OpenCode, Claude Code et d'autres :
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    Ou clonez-le dans le dossier de skills de votre agent :
    
    ```
    git clone https://github.com/mankidev/antialgorithm <dossier de skills>/antialgorithm
    ```
    
    Dans Claude Code, il s'installe aussi comme plugin (sur les versions antérieures à 2.1.275, lancez d'abord `/plugin marketplace add mankidev/antialgorithm`) :
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    Les scripts demandent Python 3. `check.py` demande aussi numpy, Pillow et `rsvg-convert` (ou le paquet cairosvg).
    
    ## Scripts
    
    `seed.py` tire un point de départ quand la demande est maigre. Une graine visuelle donne une façon de fabriquer, des couleurs, une mise en page, une typo, un verbe et une échelle pour l'idée, un décor, une région et, une fois sur deux, un objet. Une graine de texte donne une voix, une entrée en matière et un registre. Une graine d'idée donne un verbe, une contrainte, une échelle et une pression. Elle puise dans l'aléa du système, donc deux personnes qui envoient le même prompt partent de deux endroits différents. Chaque graine est aussi enregistrée dans `~/.local/state/antialgorithm/history.jsonl` (sous `$XDG_STATE_HOME` si la variable existe), et les valeurs des dernières sont évitées, pour que vos graines ne se répètent pas d'une session à l'autre. Les mises à jour du plugin ne touchent pas ce fichier. `--keep "axis=value"` bloque un axe, ce qui permet de garder un sujet et de ne retirer que l'apparence.
    
    `moves.py` tient un court journal du coup principal derrière chaque réponse qui s'écarte du choix par défaut, par exemple "neon tube wall, almost no type". Le modèle le lit avant de montrer un nouveau travail, pour ne pas reprendre un coup simplement parce qu'il a marché la dernière fois.
    
    `rough.py` prend un SVG, fait trembler ses lignes droites, ses formes et ses lettres, et casse l'espacement régulier des marques répétées, pour qu'un rendu fait main dessiné en code n'ait plus l'air sorti d'un traceur. Il ne sert qu'aux méthodes faites main comme l'impression, la peinture, le tampon et l'encre ; les rendus écran, photo et 3D gardent leurs propres marques.
    
    `check.py` rend un SVG en taille réelle et en taille d'icône, et liste le texte qui dépasse un bord, passe sous une forme, manque de contraste ou est trop petit. La limite de taille est réglée pour les affiches ; pour un écran d'application, utilisez `--min-text 0.6`.
    
    Les règles visuelles sont dans `visuals.md`, que le modèle ne lit que pour le travail visuel. Un nom ou un slogan ne les charge donc pas.
    
    ## Licence
    
    MIT
    
    ## Historique des étoiles
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_JA.md5.6 KB8f60d0cca691upstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="尾の先に点がひとつあるオレンジの釣鐘曲線">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | 日本語 | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![上はスキルなしのポスター6枚、下はスキルありの6枚](../images/showcase.png)
    
    クリエイティブな作業のためのエージェントスキルです。対象は名前、ストーリー、ゲームのアイデア、ポスター、UI。モデルに最初に浮かんだいちばん平均的な案をまず言わせ、プロジェクトから取った理由をもとにその案から離れさせます。
    
    2段とも同じプロンプトから作りました:`Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` 上の段はスキルなしで6回実行したもので、1枚も外していません。下の段は、スキルを書いている途中に実行した十数回の中から選んだものです。
    
    ![ある選択が選ばれる頻度のグラフ:平均のまわりに安全地帯と書かれた高い山があり、両側は平ら](../images/graph.png)
    
    ## インストール
    
    [skills](https://github.com/vercel-labs/skills) CLI を使うと、Codex、Cursor、OpenCode、Claude Code などのエージェントがスキルを読み込む場所に入ります:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    または、エージェントの skills フォルダにクローンします:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <skills フォルダ>/antialgorithm
    ```
    
    Claude Code ではプラグインとしても入れられます(2.1.275 より前のバージョンでは、先に `/plugin marketplace add mankidev/antialgorithm` を実行してください):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    スクリプトには Python 3 が必要です。`check.py` にはさらに numpy、Pillow、`rsvg-convert`(または cairosvg パッケージ)が必要です。
    
    ## スクリプト
    
    `seed.py` は、依頼の情報が少ないときに出発点をサイコロで決めます。ビジュアル用のシードは、制作手法、配色、レイアウト、書体、アイデアのための動詞とスケール、舞台、地域、そして2回に1回は物をひとつ出します。テキスト用のシードは、語りの声、入り方、文体を出します。アイデア用のシードは、動詞、制約、スケール、プレッシャーを出します。システムの乱数を使うので、同じプロンプトを送った2人でも出発点が変わります。各シードは `~/.local/state/antialgorithm/history.jsonl`(`$XDG_STATE_HOME` が設定されていればその下)に保存され、直近のいくつかで出た値は避けるので、自分のシードがセッションをまたいで繰り返されることもありません。プラグインを更新してもこのファイルは残ります。`--keep "axis=value"` で軸をひとつ固定でき、題材はそのままに見た目だけを振り直せます。
    
    `moves.py` は、デフォルトを避けた回答ごとに、その中心になった手を短く記録します。たとえば "neon tube wall, almost no type" のようにです。モデルは新しい作品を見せる前にこれを読むので、前回うまくいったというだけで同じ手を使い回すことがなくなります。
    
    `rough.py` は SVG の直線、図形、文字を揺らし、繰り返し模様の等間隔を崩して、コードで描いた手作り風の絵がプロッターで描いたように見えないようにします。印刷、絵の具、スタンプ、インクのような手作業の手法専用です。画面、カメラ、レンダーの見た目はそれぞれの痕跡をそのまま残します。
    
    `check.py` は SVG を原寸とアイコンサイズでレンダリングし、端からはみ出した文字、図形の下に隠れた文字、コントラストが低い文字、小さすぎる文字を一覧にします。サイズの下限はポスター向けです。アプリ画面には `--min-text 0.6` を使ってください。
    
    ビジュアルのルールは `visuals.md` にあり、モデルはビジュアルの作業のときだけ読みます。名前やスローガンを考えるときには読み込まれません。
    
    ## ライセンス
    
    MIT
    
    ## スター履歴
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_KO.md5.2 KBecae6e856a84upstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="꼬리 끝에 점 하나가 있는 주황색 종 모양 곡선">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | 한국어 | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![위는 스킬 없이 만든 포스터 여섯 장, 아래는 스킬을 쓴 여섯 장](../images/showcase.png)
    
    창작 작업을 위한 에이전트 스킬: 이름, 이야기, 게임 아이디어, 포스터, UI. 모델이 처음 떠올린 가장 평균적인 선택을 먼저 말하게 하고, 프로젝트에서 가져온 이유를 들어 그 선택에서 벗어나게 합니다.
    
    두 줄 모두 같은 프롬프트에서 나왔습니다: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` 윗줄은 스킬 없이 한 번에 돌린 여섯 개로, 하나도 빼지 않았습니다. 아랫줄은 스킬을 아직 쓰는 중에 돌린 열두 번 정도의 결과에서 골랐습니다.
    
    ![어떤 선택이 얼마나 자주 선택되는지 보여 주는 그래프: 평균 근처에 안전 지대라고 표시된 높은 봉우리가 있고 양옆은 평평함](../images/graph.png)
    
    ## 설치
    
    [skills](https://github.com/vercel-labs/skills) CLI가 Codex, Cursor, OpenCode, Claude Code 등 에이전트가 스킬을 읽는 위치에 넣어 줍니다:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    또는 에이전트의 skills 폴더에 클론하세요:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <skills 폴더>/antialgorithm
    ```
    
    Claude Code에서는 플러그인으로도 설치됩니다 (2.1.275 이전 버전에서는 먼저 `/plugin marketplace add mankidev/antialgorithm`을 실행하세요):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    스크립트에는 Python 3이 필요합니다. `check.py`에는 numpy, Pillow, `rsvg-convert`(또는 cairosvg 패키지)도 필요합니다.
    
    ## 스크립트
    
    `seed.py`는 요청에 정보가 적을 때 출발점을 굴려서 정합니다. 시각 시드는 제작 방식, 색, 레이아웃, 글꼴, 아이디어를 위한 동사와 규모, 배경, 지역, 그리고 두 번에 한 번은 사물 하나를 줍니다. 텍스트 시드는 목소리, 들어가는 방식, 말투를 줍니다. 아이디어 시드는 동사, 제약, 규모, 압박을 줍니다. 시스템 난수를 쓰기 때문에 같은 프롬프트를 보낸 두 사람도 서로 다른 곳에서 시작합니다. 시드마다 `~/.local/state/antialgorithm/history.jsonl`(`$XDG_STATE_HOME`이 설정되어 있으면 그 아래)에 저장하고 최근 몇 번의 값은 건너뛰어서, 내 시드가 세션마다 반복되지 않습니다. 플러그인을 업데이트해도 이 파일은 그대로입니다. `--keep "axis=value"`로 축 하나를 고정하면 주제는 두고 겉모습만 다시 굴릴 수 있습니다.
    
    `moves.py`는 기본값을 피한 답마다 그 중심이 된 수를 짧게 기록합니다. 예: "neon tube wall, almost no type". 모델은 새 작업을 보여 주기 전에 이 기록을 읽기 때문에, 지난번에 통했다는 이유만으로 같은 수를 다시 쓰지 않습니다.
    
    `rough.py`는 SVG의 직선, 도형, 글자를 흔들고 반복되는 표시의 고른 간격을 깨서, 코드로 그린 손맛이 플로터로 그린 것처럼 보이지 않게 합니다. 인쇄, 물감, 도장, 잉크처럼 손으로 만드는 방식에만 씁니다. 화면, 카메라, 렌더 느낌은 각자의 흔적을 그대로 둡니다.
    
    `check.py`는 SVG를 원래 크기와 아이콘 크기로 렌더링하고, 가장자리 밖으로 나간 글자, 도형 아래 깔린 글자, 대비가 낮거나 너무 작은 글자를 알려 줍니다. 크기 기준은 포스터에 맞춰져 있으니 앱 화면에는 `--min-text 0.6`을 쓰세요.
    
    시각 규칙은 `visuals.md`에 있고, 모델은 시각 작업을 할 때만 이 파일을 읽습니다. 그래서 이름이나 슬로건을 지을 때는 불러오지 않습니다.
    
    ## 라이선스
    
    MIT
    
    ## 스타 기록
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_PT.md4.8 KB5f225d5c571fupstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="Curva de sino laranja com um ponto longe na cauda">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | Português | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![Em cima, seis pôsteres sem a skill; embaixo, seis com ela](../images/showcase.png)
    
    Skill de agente para trabalho criativo: nomes, histórias, ideias de jogo, pôsteres, interfaces. Faz o modelo dizer primeiro a escolha mais óbvia e mediana, e depois se afastar dela por um motivo tirado do projeto.
    
    As duas fileiras saíram do mesmo prompt: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` A de cima é um lote de seis execuções sem a skill, sem nenhuma descartada. A de baixo foi escolhida entre cerca de doze execuções feitas enquanto a skill ainda estava sendo escrita.
    
    ![Gráfico de quantas vezes uma escolha é feita: um pico alto em torno da média marcado como zona segura, plano dos dois lados](../images/graph.png)
    
    ## Instalação
    
    A CLI [skills](https://github.com/vercel-labs/skills) coloca a skill onde o seu agente lê skills, para Codex, Cursor, OpenCode, Claude Code e outros:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    Ou clone na pasta de skills do seu agente:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <pasta de skills>/antialgorithm
    ```
    
    No Claude Code ela também se instala como plugin (em versões anteriores à 2.1.275, rode antes `/plugin marketplace add mankidev/antialgorithm`):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    Os scripts precisam de Python 3. O `check.py` também precisa de numpy, Pillow e `rsvg-convert` (ou do pacote cairosvg).
    
    ## Scripts
    
    `seed.py` sorteia um ponto de partida quando o pedido traz pouca informação. Uma semente visual dá um método de feitura, cores, layout, tipografia, um verbo e uma escala para a ideia, um cenário, uma região e, em metade das vezes, um objeto. Uma semente de texto dá uma voz, uma forma de entrar e um registro. Uma semente de ideia dá um verbo, uma restrição, uma escala e uma pressão. Ela usa a aleatoriedade do sistema, então duas pessoas que mandam o mesmo prompt começam em lugares diferentes. Também salva cada semente em `~/.local/state/antialgorithm/history.jsonl` (dentro de `$XDG_STATE_HOME`, se estiver definido) e pula os valores das últimas, para que as suas sementes não se repitam de uma sessão para outra. Atualizações do plugin não mexem nesse arquivo. `--keep "axis=value"` fixa um eixo, o que permite manter o tema e sortear só a aparência.
    
    `moves.py` guarda um registro curto do lance principal de cada resposta que foge do óbvio, como "neon tube wall, almost no type". O modelo lê esse registro antes de mostrar um trabalho novo, assim não repete um lance só porque ele funcionou da última vez.
    
    `rough.py` pega um SVG, faz tremer suas linhas retas, formas e letras e quebra o espaçamento regular das marcas repetidas, para que um visual feito à mão desenhado em código deixe de parecer saído de uma plotter. Serve só para métodos feitos à mão, como impressão, pintura, carimbo e tinta; visuais de tela, câmera e render mantêm as próprias marcas.
    
    `check.py` renderiza um SVG em tamanho cheio e em tamanho de ícone e lista o texto que passa da borda, fica sob uma forma, tem pouco contraste ou é pequeno demais. O limite de tamanho é pensado para pôsteres; para uma tela de app, use `--min-text 0.6`.
    
    As regras visuais ficam em `visuals.md`, que o modelo só lê em trabalho visual, então um nome ou um slogan não as carrega.
    
    ## Licença
    
    MIT
    
    ## Histórico de estrelas
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_RU.md6.7 KB66e02e521a4dupstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="Оранжевая колоколообразная кривая с одной точкой далеко на хвосте">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | Русский</sub></p>
    
    ![Сверху шесть постеров без скилла, снизу шесть со скиллом](../images/showcase.png)
    
    Скилл для агентов для творческой работы: названия, истории, идеи для игр, постеры, интерфейсы. Он заставляет модель сначала назвать свой первый, самый усреднённый вариант, а потом уйти от него по причине, взятой из проекта.
    
    Оба ряда получены из одного и того же промпта: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` Верхний ряд: шесть запусков без скилла подряд, ни один не выброшен. Нижний ряд отобран примерно из дюжины запусков, сделанных, пока скилл ещё писался.
    
    ![График того, как часто выбирают вариант: высокий пик вокруг среднего, отмеченный как безопасная зона, по бокам ровно](../images/graph.png)
    
    ## Установка
    
    CLI [skills](https://github.com/vercel-labs/skills) кладёт его туда, откуда ваш агент читает скиллы, для Codex, Cursor, OpenCode, Claude Code и других:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    Или клонируйте его в папку скиллов вашего агента:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <папка скиллов>/antialgorithm
    ```
    
    В Claude Code он также ставится как плагин (в версиях до 2.1.275 сначала выполните `/plugin marketplace add mankidev/antialgorithm`):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    Скриптам нужен Python 3. Для `check.py` также нужны numpy, Pillow и `rsvg-convert` (или пакет cairosvg).
    
    ## Скрипты
    
    `seed.py` выбрасывает отправную точку, когда в запросе мало данных. Визуальное зерно даёт способ изготовления, цвета, композицию, шрифт, глагол и масштаб для идеи, место действия, регион и, в половине случаев, предмет. Текстовое зерно даёт голос, способ войти в текст и регистр. Зерно идеи даёт глагол, ограничение, масштаб и давление. Случайность берётся из системы, поэтому два человека с одинаковым промптом начинают с разных мест. Каждое зерно сохраняется в `~/.local/state/antialgorithm/history.jsonl` (внутри `$XDG_STATE_HOME`, если переменная задана), а значения последних нескольких пропускаются, чтобы ваши зёрна не повторялись от сессии к сессии. Обновления плагина этот файл не трогают. `--keep "axis=value"` фиксирует одну ось: тема остаётся, а заново выпадает только внешний вид.
    
    `moves.py` ведёт короткий журнал главного хода каждого ответа, который уходит от варианта по умолчанию, например "neon tube wall, almost no type". Модель читает его перед тем, как показать новую работу, и не повторяет ход только потому, что в прошлый раз он сработал.
    
    `rough.py` берёт SVG, расшатывает прямые линии, фигуры и буквы и ломает ровный шаг повторяющихся элементов, чтобы нарисованный кодом «ручной» вид перестал выглядеть как вывод плоттера. Он нужен только для ручных техник: печати, краски, штампов и туши. Экранные, фото- и рендер-стили сохраняют свои собственные следы.
    
    `check.py` рендерит SVG в полном размере и в размере иконки и перечисляет текст, который вылезает за край, прячется под фигурой, плохо контрастирует или слишком мелкий. Порог размера рассчитан на постеры; для экрана приложения используйте `--min-text 0.6`.
    
    Визуальные правила лежат в `visuals.md`. Модель читает этот файл только при визуальной работе, так что название или слоган его не подгружают.
    
    ## Лицензия
    
    MIT
    
    ## История звёзд
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_TR.md4.8 KB7c4bf17b4263upstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="Kuyruğunda tek bir nokta olan turuncu çan eğrisi">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | Türkçe | <a href="README_ZH.md">简体中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![Üstte skill olmadan altı poster, altta skill ile altı poster](../images/showcase.png)
    
    Yaratıcı işler için ajan skill'i: isim, hikâye, oyun fikri, poster, arayüz. Modele önce ilk ve en ortalama seçimini söyletir, sonra projeden aldığı bir gerekçeyle o seçimden uzaklaştırır.
    
    İki sıra da aynı istemden çıktı: `Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` Üst sıra skill olmadan yapılmış altı denemenin hepsi, hiçbiri elenmedi. Alt sıra, skill henüz yazılırken yapılan yaklaşık on iki denemeden seçildi.
    
    ![Bir seçimin ne sıklıkla yapıldığını gösteren grafik: ortalamanın çevresinde güvenli bölge diye işaretlenmiş yüksek bir tepe, iki yanı düz](../images/graph.png)
    
    ## Kurulum
    
    [skills](https://github.com/vercel-labs/skills) CLI'ı onu ajanının skill okuduğu yere koyar; Codex, Cursor, OpenCode, Claude Code ve diğerleri için:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    Ya da ajanının skills klasörüne klonla:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <skills klasörü>/antialgorithm
    ```
    
    Claude Code'da plugin olarak da kurulur (2.1.275'ten eski sürümlerde önce `/plugin marketplace add mankidev/antialgorithm` çalıştır):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    Betikler Python 3 ister. `check.py` ayrıca numpy, Pillow ve `rsvg-convert` (ya da cairosvg paketi) ister.
    
    ## Betikler
    
    `seed.py`, istekte az bilgi olduğunda bir başlangıç noktası atar. Görsel tohum bir yapım yöntemi, renkler, yerleşim, yazı tipi, fikir için bir fiil ve bir ölçek, bir mekân, bir bölge ve iki seferden birinde bir nesne verir. Metin tohumu bir ses, bir giriş yolu ve bir üslup verir. Fikir tohumu bir fiil, bir kısıt, bir ölçek ve bir baskı verir. Sistemin rastgeleliğinden çeker, bu yüzden aynı istemi gönderen iki kişi farklı yerlerden başlar. Her tohumu `~/.local/state/antialgorithm/history.jsonl` dosyasına kaydeder (`$XDG_STATE_HOME` tanımlıysa onun altına) ve son birkaçındaki değerleri atlar, böylece kendi tohumların oturumdan oturuma tekrar etmez. Plugin güncellemeleri bu dosyaya dokunmaz. `--keep "axis=value"` bir ekseni sabit tutar; konuyu koruyup sadece görünümü yeniden atmanı sağlar.
    
    `moves.py`, varsayılandan kaçan her cevabın arkasındaki ana hamlenin kısa bir kaydını tutar, örneğin "neon tube wall, almost no type". Model yeni bir iş göstermeden önce bunu okur, böylece geçen sefer işe yarayan bir hamleyi sırf işe yaradı diye tekrar kullanmaz.
    
    `rough.py` bir SVG alır, düz çizgilerini, şekillerini ve harflerini sarsar ve tekrarlanan işaretlerin eşit aralığını bozar; böylece kodla çizilen el yapımı görünüm plotter çıktısı gibi durmaz. Sadece baskı, boya, damga ve mürekkep gibi el yapımı yöntemler içindir; ekran, kamera ve render görünümleri kendi izlerini korur.
    
    `check.py` bir SVG'yi tam boyda ve ikon boyunda çizer; kenardan taşan, bir şeklin altında kalan, kontrastı düşük ya da fazla küçük yazıları listeler. Boyut sınırı postere göredir; uygulama ekranı için `--min-text 0.6` kullan.
    
    Görsel kurallar `visuals.md` içindedir. Model onu sadece görsel işte okur, bu yüzden bir isim ya da slogan bu kuralları yüklemez.
    
    ## Lisans
    
    MIT
    
    ## Yıldız geçmişi
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • docs/README_ZH.md4.6 KB9ca84ca6c0c1upstream ↗
    <p align="center">
      <img src="../.claude-plugin/icon.png" width="140" height="140" alt="橙色钟形曲线,尾部远处有一个点">
    </p>
    
    # antialgorithm
    
    <p align="center">
      <a href="https://github.com/mankidev/antialgorithm/releases"><img src="https://img.shields.io/github/v/release/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="Latest release"></a>
      <a href="../LICENSE"><img src="https://img.shields.io/github/license/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="MIT license"></a>
      <a href="https://github.com/mankidev/antialgorithm/stargazers"><img src="https://img.shields.io/github/stars/mankidev/antialgorithm?color=F07A1E&labelColor=171717" alt="GitHub stars"></a>
    </p>
    
    <p align="center"><sub><a href="../README.md">English</a> | <a href="README_TR.md">Türkçe</a> | 简体中文 | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> | <a href="README_ES.md">Español</a> | <a href="README_PT.md">Português</a> | <a href="README_DE.md">Deutsch</a> | <a href="README_FR.md">Français</a> | <a href="README_RU.md">Русский</a></sub></p>
    
    ![上面是不用技能的六张海报,下面是用了技能的六张](../images/showcase.png)
    
    面向创意工作的智能体技能:名字、故事、游戏点子、海报、界面。它让模型先说出自己第一个、最平均的选择,再根据从项目里找到的理由离开这个选择。
    
    两行海报来自同一个提示词:`Design a poster for a music festival as a 400x600 SVG. Save the final SVG as final.svg in the current folder.` 上面一行是不加技能时一次跑出的六张,一张没删。下面一行是在技能还在编写时,从大约十二次运行里挑出来的。
    
    ![一个选择被选中频率的图表:平均值附近有一个高峰,标为安全区,两侧平坦](../images/graph.png)
    
    ## 安装
    
    [skills](https://github.com/vercel-labs/skills) 命令行工具会把它放到你的智能体读取技能的位置,支持 Codex、Cursor、OpenCode、Claude Code 等:
    
    ```
    npx skills add mankidev/antialgorithm
    ```
    
    或者把它克隆到你的智能体的 skills 文件夹:
    
    ```
    git clone https://github.com/mankidev/antialgorithm <skills 文件夹>/antialgorithm
    ```
    
    在 Claude Code 中也可以作为插件安装(2.1.275 之前的版本请先运行 `/plugin marketplace add mankidev/antialgorithm`):
    
    ```
    /plugin install antialgorithm --marketplace mankidev/antialgorithm
    ```
    
    脚本需要 Python 3。`check.py` 还需要 numpy、Pillow 和 `rsvg-convert`(或 cairosvg 包)。
    
    ## 脚本
    
    `seed.py` 在请求信息太少时掷出一个起点。视觉种子给出制作方法、配色、版式、字体、用于构思的一个动词和一个尺度、一个场景、一个地区,有一半的概率还会给出一个物件。文字种子给出一种口吻、一个切入角度和一种语域。点子种子给出一个动词、一个限制、一个尺度和一种压力。它取自系统随机源,所以两个人发送同一个提示词也会从不同的地方开始。它还会把每个种子保存到 `~/.local/state/antialgorithm/history.jsonl`(设置了 `$XDG_STATE_HOME` 时保存在其下),并跳过最近几次用过的值,所以你自己的种子不会在不同会话之间重复。插件更新不会动这个文件。`--keep "axis=value"` 可以固定某个轴,保留主题,只重新掷外观。
    
    `moves.py` 为每个避开默认选择的回答记下它的主要手法,例如 "neon tube wall, almost no type"。模型在展示新作品前会先读它,这样就不会仅仅因为某个手法上次奏效就再用一次。
    
    `rough.py` 读取一个 SVG,抖动其中的直线、形状和文字,并打乱重复标记的均匀间距,让用代码画出的手工感不再像绘图仪画的。它只用于印刷、绘画、印章、墨水这类手工方法;屏幕、相机和渲染风格保留它们自己的痕迹。
    
    `check.py` 以原尺寸和图标尺寸渲染 SVG,列出超出边缘、被形状遮住、对比度太低或太小的文字。尺寸下限是按海报设定的;检查应用界面时请用 `--min-text 0.6`。
    
    视觉规则在 `visuals.md` 里,模型只在做视觉工作时才读取,所以起名字或写标语时不会加载这些规则。
    
    ## 许可证
    
    MIT
    
    ## Star 历史
    
    <a href="https://star-history.com/#mankidev/antialgorithm&Date">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date&theme=dark">
        <img src="https://api.star-history.com/svg?repos=mankidev/antialgorithm&type=Date" alt="Star history chart for mankidev/antialgorithm">
      </picture>
    </a>
    
  • images/graph.png242 KB29eeb5c7e313upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • images/showcase.png1.7 MBa5b2fc0dc7f5upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • LICENSE1.0 KBc733b8b841f2upstream ↗
    MIT License
    
    Copyright (c) 2026 mankidev
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    
  • visuals.md7.6 KBf246e2882911upstream ↗
    # antialgorithm: visuals
    
    Read this with SKILL.md for any piece made to be looked at: posters, covers, promo images, page layouts, icons, SVG work. The rules in SKILL.md still hold.
    
    Do not use the look that a tool or a model would produce with no instructions. If the palette, layout, lighting, pose or framing is what you would get from a plain prompt, it is the default.
    
    Pick the look from the subject itself: its material, its place, its time, its mood. Let one strong decision lead and keep the rest in its service, instead of many safe decisions that cancel each other.
    
    Do not center, balance and smooth it all by habit. Balance is a choice, not a starting point.
    
    The method marks below are for posters, covers, promo images and other pieces made to be looked at. They do not apply to:
    
    - Interfaces get their own section at the end of this file.
    - Pixel art and block models: when another skill or tool owns how they are drawn, use this skill only to choose the subject, palette and composition.
    
    A new subject is not enough. AI images are known by their finish, not by their topic. The finish is: smooth gradients, soft glow, perfect geometry, tiles that repeat with no change, clean edges on all shapes, even spacing, one default font, and the same polish on all parts. If the image has this finish, it looks made by AI whatever it shows.
    
    Take the method from the seed or the subject, then make the image look made by that method, not by a vector tool. Each method leaves its own marks, and those marks replace the AI finish:
    
    - Print and paint: few inks, colors that miss their place, uneven ink, broken edges, the grain of the paper.
    - Screens and machines: the pixel or dot grid, scan lines, bleed and bloom, faded bands, steps where a gradient runs out of colors, the font the machine has.
    - Camera and science: sensor grain or noise, light that falls off, blur where focus or motion puts it, the false colors of the instrument, a crop the camera chose.
    - Material and light: the seams, joints and thickness of the material, and light that bends, reflects or glows the way that material does.
    
    Keep these marks real and sparse, not a noise filter laid over a clean image. Some methods are clean by nature, such as a glossy render, a CAD drawing or a spreadsheet chart. Keep those clean and let their light, grid and tools say what they are.
    
    Do not reach for a hand-drawn wobble when the method is not made by hand. A wobbly line on an LED board, an x-ray or a 3D render is a second default laid over the first. Look at the result at icon size: if it reads as a flat vector drawing whatever the seed said, the method is missing.
    
    When the method is made by hand, code must carry the hand in the geometry, not only in the surface on top of it:
    
    - No line is exactly straight and no curve is a clean math function. Points drift a little, strokes swell and thin, ends are blunt or overshoot.
    - Repeated marks, such as hatching, dots, stripes or tiles, change in spacing, length and angle from one to the next.
    - Shapes sit slightly off the grid and slightly off each other. Fills do not meet their outlines exactly.
    - Letters are not a system font in a perfect row. Draw them, cut them, stamp them or at least break their edges, and let their baseline and spacing move a little.
    - The layout is placed by eye, not snapped to equal columns and equal gaps.
    
    Look at the result at full size. If a hand-made piece has lines that look plotted, curves that look computed or text that looks typed, it still reads as machine made, however much grain is on it.
    
    Typing coordinates by hand gives clean marks. Generate the method's marks with a short script instead of writing them one by one. Stop at the number of marks the eye needs: a poster built from thousands of tiny pieces is slow to make and heavy to open, so keep an SVG under about 200 KB. For an SVG, `python3 scripts/rough.py in.svg out.svg [--amount 1.0]` breaks straight lines, rects, polygons, circles and paths, moves repeated marks off their even spacing, and shakes letters a little while keeping small text calm. Use it only for methods made by hand, such as print, paint, cut paper, stamps, chalk and ink. It is a start, not a style: the method and the design still have to carry the look.
    
    Before showing any SVG, run `python3 scripts/check.py file.svg`. It renders the image at full size and at icon size, and lists text that runs off an edge, is covered by a shape, has low contrast or is too small. Fix all of it, run it again, then open both renders and look at them yourself. It does not see letters drawn as paths or text that spills out of its own box, so check those by eye. For other formats, render the image and do the same checks by eye.
    
    A flaw may change how the work looks, never stop it from doing its job. Find the parts the work needs in order to work: the information someone must read, the thing someone must press, the shape someone must recognize, the detail someone must find. Those parts stay whole, clear and in place. They are never cut by an edge, covered, broken by texture or lost in the style. Roughness belongs to the rest. Check those parts before you show the work.
    
    Let text be part of the image, not labels placed on top of it. Choose the type for the method and the subject, let it be cut off, pressed, crowded or turned when that serves the piece.
    
    Leave out what has no job. A decorative shape, glow, frame or icon that only fills space is a sign of the default.
    
    ## Interfaces
    
    An app screen, dashboard, web page or game HUD has a default shell, and that shell gives it away faster than its colors: a top bar with search, bell and avatar, a sidebar, a row of stat cards, rounded panels in a grid, chips, progress bars, a table and one accent color on a dark or white ground. A new subject poured into this shell still reads as a template. Change all three layers, not one:
    
    1. Layout from the subject. Find the one question the user opens the screen to answer, and let the whole page be the shape of that answer. A schedule app can be the day itself, one pixel per minute across the full width. A tool about a place can be the place. Cards, tables and panels come back only when this case needs them.
    2. A method that carries the data. Take the method from a visual seed or the subject, then let its own physics show the states: light and dark, ink and paper, worn and new, on and off. If a state could be swapped for any color without losing meaning, the method is only paint.
    3. Type and color with poster scale. One huge stacked statement and huge markers next to small exact data. Take the colors from a place at a set hour or from the subject's material, and let them mean something, such as the hour, the zone or the state, instead of one accent on gray.
    
    The method may own the surface, the ground and the big shapes. It never owns the working parts: data lines up with its axis, labels sit inside their areas, buttons are plain and pressable, and small text stays readable on whatever is behind it. Roughness, texture and silhouettes go behind or below the data, never through it.
    
    When the subject is already set, by the user or by an idea seed, roll a visual seed and keep the subject's axes with `--keep`, so only the look is rolled.
    
    If a standing rule of the user limits the look, such as a gray-only interface rule, follow it, and when the result comes back as flat or plain, say which rule shaped it. Lift the rule for one piece only when the user asks for the thing it forbids, and say so.
    
    `check.py` judges text size against the image side, which suits posters. A 1440 px screen has normal 12 px labels, so run it with `--min-text 0.6` for interfaces. With many labels it takes minutes, so run it in the background.
    

Plain-text copy, no login: /skill-bundles/mankidev-antialgorithm.md

// REPO STATS

745 stars