open-dictionary: Instructions file for Codex

AGENTS.md

open-dictionary AGENTS.md is an instructions file for Codex, OpenCode from ahpxex/open-dictionary. It costs 1,906 tokens per session, scanned A, original, MIT.

Design rules for rebuilding a dictionary production system from Wiktionary data processed by Wiktextract, a tool that extracts structured dictionary information. The system creates learner-friendly Chinese entries through staged data processing.

In plain words
What is it for?
Importing snapshots into PostgreSQL, curating dictionary tables, enriching entries with language-model output, and exporting JSONL or SQLite files.
Why use it?
They keep source data, editorial decisions, processing stages, and exported files clearly separated and reproducible.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is ahpxex/open-dictionary's own configuration. It tells Codex and OpenCode how to work on open-dictionary itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything open-dictionary configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ahpxex/open-dictionary. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ahpxex/open-dictionary/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ahpxex/open-dictionary

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for open-dictionary AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ahpxex/open-dictionary/agents-md/github.svg)](https://agentmods.dev/instructions/ahpxex/open-dictionary/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ahpxex/open-dictionary/agents-md"><img src="https://agentmods.dev/badge/instructions/ahpxex/open-dictionary/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for open-dictionary AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ahpxex/open-dictionary/agents-md"><img src="https://agentmods.dev/badge/instructions/ahpxex/open-dictionary/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,906 This file is loaded in full into every session.
When invoked 1,906 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01906 $0.01906
Opus 5.5 $0.00762 $0.00762
Sonnet 5.5 $0.00381 $0.00381
Haiku 4.5 $0.00191 $0.00191

Measured 2mo ago against content hash 4109442a09ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

open-dictionary 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 2mo 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 · 251 lines

How it starts

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

Open Dictionary Rewrite Charter

This repository is not a generic "dictionary scripts" project. It is the rewrite line for a reproducible dictionary production system built on top of Wiktionary / Wiktextract data.

The system must be designed as a staged data pipeline with explicit schemas, explicit run metadata, and deterministic handoff points between stages.

Product Framing

  • Source of truth: Wiktionary / Wiktextract data, not Wikidata.
  • Canonical unit: one headword equals one entry.
  • Entry model: word-centric, not "word plus part-of-speech" as the top-level unit.
  • LLM goal: produce structured, Chinese learner-friendly dictionary entries from curated source data.
  • Human editorial authority: when the pipeline hits ambiguous curation questions, the user decides the editorial rule. The agent must not invent permanent curation policy without explicit approval.

Core Workflow

The intended end-state workflow is:

  1. Download a Wiktionary / Wiktextract snapshot.
  2. Ingest the raw snapshot into PostgreSQL.
  3. Build curated tables from raw tables.
  4. Run LLM enrichment on curated entries.
  5. Export stable distributable artifacts such as JSONL and SQLite.

Expressed as data layers:

  • raw: source-faithful imported data.
  • curated: normalized, cleaned, word-centric entries.
  • llm: structured generated outputs plus generation metadata.
  • exports: packaged read-only outputs for downstream distribution.
  • meta: run tracking, versions, prompts, and operational audit data.

No stage may skip over the previous stage's contract. For example, LLM enrichment must consume curated entries, not raw imported blobs.

Technical Framework

1. Raw Ingestion Layer

Responsibilities:

  • Download source snapshots.
  • Record source identity, origin URL, timestamps, and hashes.
  • Load raw payloads into PostgreSQL with minimal semantic mutation.
  • Preserve source payloads well enough to re-run downstream stages.

Requirements:

  • Raw ingestion must be idempotent at the run level.
  • Every ingestion run must have a run_id.
  • Every raw row must be traceable to a source snapshot and ingestion run.
  • The code must not mix download logic, parsing logic, and curation logic in the same stage module.

Read the full file on GitHub · 251 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. 2mo ago First seen · 251 lines · 1,906 tokens per session scan A 4109442a09ba

Subscribe to this mod's changes

open-dictionary AGENTS.md is an instructions file published in the GitHub repository ahpxex/open-dictionary (142 stars, last pushed 2mo ago), licensed MIT. It adds 1,906 tokens to every session, about $0.0076 per session on Opus 5.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.

Related

open-dictionary AGENTS.md compared with instructions from other repositories

open-dictionary AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
open-dictionary AGENTS.mdahpxex/open-dictionaryInstructions file1422mo agoMITA1,906Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k3d agoMITA4,313Codex, OpenCode