ditherer AGENTS.md

A project guide for Ditherer, a browser tool that applies dithering and other effects to images and video. It explains the app’s structure, technologies, controls, and common commands.

In plain words
What is it for?
Use it when developing or maintaining Ditherer, especially when working on React components, image or video processing, state handling, tests, linting, or builds.
Why use it?
It gives coding agents the project context they need before changing code, reducing guesswork about how the interface and data flow are organised.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/gyng/ditherer/agents-md
Clone the repo
git clone --depth 1 https://github.com/gyng/ditherer

Made for: Codex, OpenCode.

Per session 4,655 This file is loaded in full into every session.
When invoked 4,655 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.04655 $0.04655
Opus 5 $0.02328 $0.02328
Sonnet 5 $0.00931 $0.00931
Haiku 4.5 $0.00466 $0.00466

Measured 2d ago against content hash d49beaed9bb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ditherer AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 331 lines

How it starts

The opening of the file, as written. The whole thing — 331 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ditherer — Agent Guidelines

Project Overview

Ditherer is a browser-based image/video processing tool. Users load an image, select a dithering algorithm (or other effect), adjust parameters via a control panel, and apply the filter. The app also supports video frame processing, palette extraction, and state export/import via URL.

Stack: React 19, Vite, TypeScript, Rust/WASM (color space conversions), cmdk + Radix UI for the filter picker.

Quick reference: npm run dev (dev server) · npm run build (production build to build/) · npm run test (Vitest) · npm run lint (eslint).


Architecture

Component Hierarchy (Atomic Design)

The UI follows an implicit atomic design pattern:

Tokens — Design primitives defined in CSS custom properties:

  • Colors: --light-gray, --gray, --beautiful-blue, --bg-color
  • Layout values are inline (no token system yet)

Atoms — Leaf control components in src/components/controls/. Each renders a single HTML control:

  • Range.tsx<input type="range"> with editable value display
  • Bool.tsx<input type="checkbox">
  • Enum.tsx<select> dropdown
  • Stringly.tsx<input type="text">
  • Textly.tsx<textarea>

Molecules — Composed controls:

  • Palette.tsx — palette selector + nested atom controls for palette options
  • ColorArray.tsx — color swatch grid + palette extraction UI (stateful)

Organisms — Sections of the app:

  • Controls (src/components/controls/index.tsx) — dispatches to the right atom/molecule based on optionTypes.type
  • ChainList (src/components/ChainList/index.tsx) — filter chain editor, presets, drag/drop reordering
  • Exporter (src/components/App/Exporter.tsx) — URL/JSON state export panel
  • SaveAs (src/components/SaveAs/index.tsx) — image/video file export dialog (uses MediaRecorder for video)

Page — Single page app:

  • App (src/components/App/index.tsx) — top-level layout: sidebar controls + draggable canvas area

State Management

Read the full file on GitHub · 331 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 331 lines · 4,655 tokens per session scan A d49beaed9bb3

Subscribe to this mod's changes

ditherer AGENTS.md is an instructions file published in the GitHub repository gyng/ditherer (88 stars, last pushed 28d ago), licensed MIT. It adds 4,655 tokens to every session, about $0.0233 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.