llm-wiki: Instructions file for Codex

AGENTS.md

llm-wiki AGENTS.md is an instructions file for Codex, OpenCode from mduongvandinh/llm-wiki. It costs 2,037 tokens per session, scanned A, original, MIT.

A shared guide for coding agents that maintain LLM Wiki, a knowledge base made from raw sources, linked topic pages, and generated reports. It defines the three folders and the workflows for discovery, ingestion, and checking the result.

In plain words
What is it for?
Use it when discovering sources, writing or deleting wiki pages, updating the index and log, checking contradictions, or running the full maintenance cycle.
Why use it?
It keeps raw sources unchanged and helps agents avoid unsupported claims, broken links, and outdated indexes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is mduongvandinh/llm-wiki's own configuration. It tells Codex and OpenCode how to work on llm-wiki 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 llm-wiki configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [Source 1](../raw/articles/filename.md).

Reuse

Borrowing it

Nothing to install: this file belongs to mduongvandinh/llm-wiki. 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/mduongvandinh/llm-wiki/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/mduongvandinh/llm-wiki

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 llm-wiki AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mduongvandinh/llm-wiki/agents-md/github.svg)](https://agentmods.dev/instructions/mduongvandinh/llm-wiki/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mduongvandinh/llm-wiki/agents-md"><img src="https://agentmods.dev/badge/instructions/mduongvandinh/llm-wiki/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 llm-wiki AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mduongvandinh/llm-wiki/agents-md"><img src="https://agentmods.dev/badge/instructions/mduongvandinh/llm-wiki/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,037 This file is loaded in full into every session.
When invoked 2,037 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.02037 $0.02037
Opus 5 $0.01019 $0.01019
Sonnet 5 $0.00407 $0.00407
Haiku 4.5 $0.00204 $0.00204

Measured 10d ago against content hash b2badd64349d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

llm-wiki 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 10d 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 · 280 lines

How it starts

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

LLM Wiki — Agent Instructions

For: Cursor, Windsurf, Codex CLI, Aider, Continue.dev, and any agent that reads AGENTS.md Claude Code users: see CLAUDE.md and install the skill from skills/llm-wiki/

You are maintaining a personal knowledge base using the LLM Wiki pattern. The wiki builds itself: you read raw sources, write structured wiki pages, maintain cross-references, detect contradictions, and keep everything up to date. The human only reads the wiki and asks questions.

3-Layer Architecture

raw/        → Raw sources (IMMUTABLE — you READ ONLY, NEVER modify)
wiki/       → Wiki you write and maintain entirely
outputs/    → Query results, reports, battlecards, briefs
config.yaml → Topics, feeds, schedule

Golden Rules

  1. raw/ is immutable. Never edit, delete, or move files in raw/. It is the source of truth.
  2. You own wiki/ entirely. The human does not manually edit wiki pages.
  3. One file per topic. Each entity, concept, and source summary is a separate .md file. Filename: kebab-case.
  4. Cross-reference everything. Use [[filename]] links. Every page needs at least 2 links to other pages.
  5. Keep INDEX.md current. Create/delete a wiki page → update INDEX.md immediately.
  6. Log all activity. Every action gets an entry in wiki/LOG.md.

How to Run Each Workflow

When the user asks you to run the wiki, follow these workflows. Use natural language descriptions of what you're doing — you don't have a slash command, just execute the steps directly.

Run full cycle (discover → ingest → lint)

  1. Read config.yaml to understand topics, feeds, and settings
  2. Run discover: search for new sources based on topics/gaps
  3. Run ingest: process all new files in raw/
  4. Run lint: health check the wiki
  5. Report summary

Ingest

  1. Read config.yaml and AGENTS.md (this file) for schema and rules
  2. Read .discoveries/history.json → get list of already-processed files
  3. Scan raw/ → find files not in history
  4. For each new file: a. Read full content b. Create source summary → wiki/sources/ c. Extract entities → create/update wiki/entities/ d. Extract concepts → create/update wiki/concepts/ e. Add [[cross-references]] to related pages f. Flag contradictions with existing content
  5. Update wiki/INDEX.md
  6. Append to wiki/LOG.md
  7. Update .discoveries/history.json

Read the full file on GitHub · 280 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. 10d ago First seen · 280 lines · 2,037 tokens per session scan A b2badd64349d

Subscribe to this mod's changes

llm-wiki AGENTS.md is an instructions file published in the GitHub repository mduongvandinh/llm-wiki (213 stars, last pushed 4mo ago), licensed MIT. It adds 2,037 tokens to every session, about $0.0102 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.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens