open-image-prompts
AGENTS.md274 starsChanged 4 months agoMITView on GitHub
Instructions for coding agents working in or starting up this repository. An open, local-first visual prompt archive plus two installable Agent Skills. The application is a read-only SQLite API (Python, standard library only) behind a React/Vite frontend. Nothing here trains, labels, or writes prompt data. Prerequisites: Node.js 20.19+ or 22.12+, and Git. Python arrives via uv, which start.sh installs into .oip/tools/ if it is missing. start.sh is the whole setup: it prepares Python, downloads the dataset, installs frontend packages, and…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- img-gen-promptsSkill
- img-gen-tasteSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 57
Search and retrieval work without the image packs.
- Very specific: line 86
If the Skill was installed as a copy outside a checkout (npx skills add -g), OIP_REPO_ROOT is required — the script cannot find the …
- Very specific: line 121
If a start times out on a slow machine, raise OIP_STARTUP_TIMEOUT (seconds, default 180) rather than assuming the application is broken.
- Distinctive: line 129
Treat the database as read-only.
- Very specific: line 131
Never commit db/, images/, or .oip/ contents.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for coding agents working in or starting up this repository.
What this repository is
An open, local-first visual prompt archive plus two installable Agent Skills. The application is a read-only SQLite API (Python, standard library only) behind a React/Vite frontend. Nothing here trains, labels, or writes prompt data.
Get it running
Prerequisites: Node.js 20.19+ or 22.12+, and Git. Python arrives via uv, which
start.sh installs into .oip/tools/ if it is missing.
./start.sh # macOS/Linux; Windows: start.batstart.sh is the whole setup: it prepares Python, downloads the dataset,
installs frontend packages, and starts the API and frontend together. Open the
URL it prints, not a URL you assumed — see "Ports" below.
To skip the ~4 GB of image packs (the gallery then falls back to each record's original source URL):
OIP_FETCH_SKIP_IMAGES=1 ./start.shStep-by-step instead of the launcher:
uv sync --locked
npm run data:pull # or data:pull:db to skip image packs
npm --prefix web ci
npm run devThe dataset is not in Git
A clone gives you code, Skills, taxonomy, and small indexes — not the corpus.
db/prompts.db.gz (~80 MB) and images/ (~4.2 GB across nine monthly packs)
are downloaded from GitHub Releases by scripts/fetch_dataset.py, which verifies
every asset's sha256 against data/dataset-manifest.json. Both paths are
gitignored, and re-running the fetch is safe: verified assets are skipped.
Expect this layout after a full pull:
db/prompts.db.gz # compressed archive from Releases
images/<tweet_id>/N.jpg # extracted image packs
.oip/runtime/prompts.db # expanded read-only SQLite, created on first start
.oip/packs/*.sha256 # extraction markers so unchanged packs are skippedSearch and retrieval work without the image packs. Only local image preview needs them.
Ports
Nothing binds a predictable port unconditionally, so never hardcode one.
- Frontend: starts at
5173and moves to the next free port when taken. It prints the URL it actually serves. Pin it withOIP_WEB_HOST/OIP_WEB_PORT; an explicitOIP_WEB_PORTis strict and a collision fails loudly. - Skill gallery bridge: starts at
4173, falls back to a free port, and returns the real URL in its JSON response. Readurl, do not rebuild it. - SQLite API: always an ephemeral loopback port, reached through the frontend
proxy at
/apiand/health.
Everything binds 127.0.0.1 only.
The Skills
skills/img-gen-taste needs nothing beyond its bundled style cards.
skills/img-gen-prompts needs this checkout for its archive and gallery.
export OIP_REPO_ROOT="$PWD" # PowerShell: $env:OIP_REPO_ROOT = (Get-Location)
npm run status # expects "ready": true and oip-visual-v2
python3 skills/img-gen-prompts/scripts/oip.py search --intent "..." --limit 5
python3 skills/img-gen-prompts/scripts/oip.py stop # when done browsingIf the Skill was installed as a copy outside a checkout (npx skills add -g),
OIP_REPO_ROOT is required — the script cannot find the repository on its own
and its error message tells you how to create one.
The gallery process is detached on purpose, so it outlives the command that
started it. Call stop when finished; as a backstop it exits after four hours
without gallery traffic (OIP_GALLERY_IDLE_TIMEOUT in seconds, 0 disables).
Before you commit
npm test # docs, public-data boundary, API, gallery ports, retrieval benchmark, frontend
npm run lint
npm run buildnpm run verify:docs needs neither the database nor the network, so run it first
when you touched documentation or dataset counts. Dataset counts quoted in prose
are checked against data/public-corpus.json; update the data, not just the
sentence.
npm run test:retrieval ends in a gated benchmark that fails closed: every
related result a query returns must carry a verdict in
evals/retrieval/intents.jsonl — related_relevant_ids to accept a reference,
related_rejected_ids to record that it was reviewed and turned down. Publishing a
new dataset can surface references nobody has judged yet, and the benchmark then
fails by design. Resolving it means looking at the images and recording a real
verdict — never invent an entry to turn the suite green. A rejected reference still
counts against related_precision, which is intended: a reference a reviewer
turned down should not be reaching users.
Re-running the pull after a release that dropped records leaves unreferenced files
in images/; verify:data reports them and continues. Clear them with
python3 scripts/fetch_dataset.py --prune.
If a start times out on a slow machine, raise OIP_STARTUP_TIMEOUT (seconds,
default 180) rather than assuming the application is broken.
CI covers start.sh on Ubuntu and macOS, start.bat on Windows, and the full
check suite on Ubuntu.
Boundaries
- Treat the database as read-only. The API and Skill open SQLite in immutable mode; never add a write path, migration, or labeling job.
- Never commit
db/,images/, or.oip/contents. - The public DB deliberately excludes labeling candidates, model and provider settings, run IDs, rationales, and evaluation tables. Do not reintroduce them.
- Source prompts are reproduced byte-for-byte with attribution. Translations and derived prompts are separate fields, never a substitute.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

