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.
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.
curl -O https://raw.githubusercontent.com/maddada/Ghostex/main/AGENTS.mdgit clone --depth 1 https://github.com/maddada/GhostexWrote 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.
[](https://agentmods.dev/instructions/maddada/ghostex/agents-md)<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.
<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>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.
| Model | Per session | Once 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 |
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 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:
- 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. - Session daemons: zmx (macOS, Linux, Windows WSL) and wmx (native Windows, PowerShell) change together; Ghostex startup and paths stay in gxserver.
- 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 settingsand the Help generator). - Renderers (
native_chat/,native_sidebar/,native_kanban/,native_automate/): layout and input only;apps/gpui-webcompiles the same files. - 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.
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.
- today Changed · +2 lines · +190 tokens per session 9b10f6fd2c82
- 2d ago Changed · +53 tokens per session 7d7e48c03339
- 3d ago Changed · -5 tokens per session bd006caecc5c
- 8d ago Changed · +1 lines · +49 tokens per session 1ac345878e9a
- 12d ago Changed · +1 lines · +119 tokens per session 89c587e9fe50
- 15d ago Changed · +2 lines · +121 tokens per session 7b905bc7b49e
- 18d ago Changed · +62 tokens per session 75b4a2716e94
- 22d ago Changed · +43 tokens per session bc9926ae46d6
- 23d ago Changed · +2 lines · +437 tokens per session 4799afe419a5
- 24d ago First seen · 243 lines · 11,469 tokens per session scan C 75a94e6132ec
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.
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).
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.
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).
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.
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).
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.