Ghostex: Instructions file for Codex

AGENTS.md

Ghostex AGENTS.md is an instructions file for Codex, OpenCode from maddada/Ghostex. It costs 12,538 tokens per session, scanned C, original, MIT.

Repository instructions for Ghostex, a large application repository with separate shippable apps, embedded pages, reusable packages, and third-party code. They also explain a recent repository restructuring and important project vocabulary.

In plain words
What is it for?
Use them when locating files, navigating the reorganized repository, deciding where a change belongs, or working alongside other coding agents.
Why use it?
They prevent agents from relying on outdated paths or confusing application, page, library, and external-code directories.

Instructions file for CodexOpenCode

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

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/madda/dev/_active/Ghostex-extensions.

About the project

Ghostex is a developer workspace for running and supervising multiple AI coding agents, with separate chats, command-line views, and persistent sessions in a Rust-based desktop shell. Developers use it to switch between agents, review work, preview pages, and continue sessions from mobile devices.

maddada/Ghostex · 1,420 stars · on GitHub · ghostex.dev

Reuse

Borrowing it

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

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 Ghostex AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/maddada/ghostex/agents-md"><img src="https://agentmods.dev/badge/instructions/maddada/ghostex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12,538 This file is loaded in full into every session.
When invoked 12,538 The same file — it is already loaded in full.
Security scan C 1 finding. 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.12538 $0.12538
Opus 5.5 $0.05015 $0.05015
Sonnet 5.5 $0.02508 $0.02508
Haiku 4.5 $0.01254 $0.01254

Measured today against content hash 9b10f6fd2c82, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

Ghostex AGENTS.md scanned grade C with 1 finding 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 today.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

"Revert your changes" never means resetting, restoring, cleaning, or deleting the whole worktree; other agents and the user have unrelated uncommitted and untracked work here. Before any destructive command (`git restore
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.

Rules for Agents working in this Repository

Longer procedures live in the tracked ai/ folder; each section below names its reference file and when to read it. docs/ is gitignored local material and never holds agent rules.

Where a fix or feature belongs (decide before you edit)

Fix the place where the wrong decision is made, not the place where the symptom shows. Ask first: would the web build, the mobile app, the ghostex CLI or a remote client hit the same problem? If yes, the fix does not belong in one app's UI. Stop at the first layer that can own the change:

  1. gxserver (server/src/, Rust only; the old TypeScript gxserver is gone): anything about an agent session: what is typed into its terminal, reading its screen, hooks, activity, transcripts, lifecycle, git and worktrees, settings, CLI verbs. One change covers every client.
  2. Session daemons: zmx (macOS, Linux, Windows WSL) and wmx (native Windows, PowerShell) change together; Ghostex startup and paths stay in gxserver.
  3. Rust cores: packages/gx-core (sidebar), packages/gx-chat-core (the only chat brain: desktop, web and, through UniFFI, the phone), packages/gx-protocol (wire types), packages/settings-catalog (Settings search rows, setting defaults, option tables and the hotkey catalog, read by native Settings, Quick Access, ghostex settings and the Help generator).
  4. Renderers (native_chat/, native_sidebar/, native_kanban/, native_automate/): layout and input only; apps/gpui-web compiles the same files.
  5. Host glue (apps/desktop/src/app/gx_chat/, gx_store/): platform I/O only.

Chat rules go only into gx-chat-core; the TypeScript chat brain and the React chat were deleted on 2026-09-25. Kanban and Automate are native GPUI views (native_kanban/, native_automate/); the React Kanban/Automate page was deleted on 2026-09-30. The desktop runs no JavaScript outside its CEF pages: the QuickJS app runtime was deleted on 2026-09-25, so never add a JavaScript engine or service back to it. When a fix lands higher than a layer that could own it, say why in your report. Full guide with examples: ai/where-to-fix.md.

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. today Changed · +2 lines · +190 tokens per session 9b10f6fd2c82
  2. 2d ago Changed · +53 tokens per session 7d7e48c03339
  3. 3d ago Changed · -5 tokens per session bd006caecc5c
  4. 8d ago Changed · +1 lines · +49 tokens per session 1ac345878e9a
  5. 12d ago Changed · +1 lines · +119 tokens per session 89c587e9fe50
  6. 15d ago Changed · +2 lines · +121 tokens per session 7b905bc7b49e
  7. 18d ago Changed · +62 tokens per session 75b4a2716e94
  8. 22d ago Changed · +43 tokens per session bc9926ae46d6
  9. 23d ago Changed · +2 lines · +437 tokens per session 4799afe419a5
  10. 24d ago First seen · 243 lines · 11,469 tokens per session scan C 75a94e6132ec

Subscribe to this mod's changes

Ghostex AGENTS.md is an instructions file published in the GitHub repository maddada/Ghostex (1,420 stars, last pushed today), licensed MIT. It adds 12,538 tokens to every session, about $0.0502 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). 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

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 · 9,715 tokens

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,581 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens