mirage: Instructions file for Claude Code

CLAUDE.md

mirage CLAUDE.md is an instructions file for Claude Code from strukto-ai/mirage. It costs 4,363 tokens per session, scanned A, original, Apache-2.0.

Repository-specific instructions for MIRAGE, a project that lets AI agents use different things as files and folders. It covers both Python and TypeScript implementations in one monorepo, meaning one repository containing multiple related packages.

In plain words
What is it for?
Use it when changing MIRAGE, especially when working on its Python code, TypeScript packages, shared code, or worktrees.
Why use it?
It explains where code belongs, which parts can run in browsers or Node.js, and where to create Git worktrees, which are separate working directories for branches.

Instructions file for Claude Code

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

This is strukto-ai/mirage's own configuration. It tells Claude Code how to work on mirage 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 mirage configures →

About the project

Mirage is a virtual terminal for AI agents that presents files, command-line tools, and configurable runtimes through one interface. It helps agents access data and run computations across services with controlled visibility and actions, and the catalogue entries provide related integrations.

strukto-ai/mirage · 3,739 stars · on GitHub · strukto.ai

Reuse

Borrowing it

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

Made for: Claude Code.

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 mirage CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/strukto-ai/mirage/claude-md/github.svg)](https://agentmods.dev/instructions/strukto-ai/mirage/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/strukto-ai/mirage/claude-md"><img src="https://agentmods.dev/badge/instructions/strukto-ai/mirage/claude-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 mirage CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/strukto-ai/mirage/claude-md"><img src="https://agentmods.dev/badge/instructions/strukto-ai/mirage/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,363 This file is loaded in full into every session.
When invoked 4,363 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.04363 $0.04363
Opus 5.5 $0.01745 $0.01745
Sonnet 5.5 $0.00873 $0.00873
Haiku 4.5 $0.00436 $0.00436

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

Security

Grade A, and why

mirage CLAUDE.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 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.

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.

CLAUDE.md · 320 lines

How it starts

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

CLAUDE.md

MIRAGE is a virtual terminal for AI agents: a bash-compatible shell over one virtual filesystem that mounts anything (object stores, SaaS, databases, disk) at a prefix. It is the control plane between an agent and its data: every backend is reached through one async-native op dispatcher, with an index, a read-through cache and per-mount policy in the path, so a listing costs one request and a refused action never reaches the service. It is implemented in Python and in TypeScript with the same layout and the same semantics.

Development

Commands

  • Python lives in python/ (mirage/, tests/). Setup: cd python && uv sync --all-extras. Add dependencies with uv add. Test: uv run pytest.
  • TypeScript lives in typescript/ (packages/core, node, browser, cli, server, agents, dsh, opencode): pnpm install, pnpm build, pnpm typecheck, pnpm test. Rebuild the dists after a merge; integ and the examples import them.
  • Rust lives in rust/, one Cargo workspace: mirage-rs holds the command streams both hosts run, rust/python is its PyO3 module (mirage._rs, which maturin builds into mirage-ai: uv sync builds it and rebuilds it after a Rust change) and rust/wasm the module the TypeScript core embeds (typescript/packages/core/scripts/embed-rs.mjs, run by prepare, build, test and typecheck). Both need cargo on PATH; rust/rust-toolchain.toml pins it. Test: cargo test --workspace in rust/. scripts/gen_unicode_width.py (Unicode's data files) and scripts/gen_rust_notices.py (cargo about 0.9.2) regenerate their outputs; CI fails when either is stale.
  • Lint everything: ./python/.venv/bin/pre-commit run --all-files from the repo root (the venv binary, so examples/ is included).
  • Examples run from the repo root with the venv interpreter: ./python/.venv/bin/python examples/python/vfs/s3/s3.py.
  • Do not add a changeset. typescript/.changeset/ stays as it is for now: the public interface is still moving, so a per-PR version note describes a surface that changes again before it ships. Nothing gates on one. The release notes get written once the interface settles.

Read the full file on GitHub · 320 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 · +3 lines · +47 tokens per session b45832f02a07
  2. yesterday Changed · +2 lines · +23 tokens per session 0e5cdc499348
  3. 6d ago Changed · +6 lines · +114 tokens per session fdaf16010eb1
  4. 7d ago Changed · +8 lines · +123 tokens per session 8f759354b4d3
  5. 9d ago Changed · +42 lines · +648 tokens per session c750506a56e2
  6. 10d ago Changed 860ad5ae98d6
  7. 15d ago Changed · +2 lines · +46 tokens per session 0e442fdc1e13
  8. 17d ago Changed · +4 lines · +60 tokens per session dee2c15e188a
  9. 20d ago Changed · -1 lines · +18 tokens per session 47740a7cddda
  10. 23d ago First seen · 254 lines · 3,284 tokens per session scan A c95721cd7403

Subscribe to this mod's changes

mirage CLAUDE.md is an instructions file published in the GitHub repository strukto-ai/mirage (3,739 stars, last pushed today), licensed Apache-2.0. It adds 4,363 tokens to every session, about $0.0175 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

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,786 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

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens