mantishack: Instructions file for Codex

AGENTS.md

mantishack AGENTS.md is an instructions file for Codex, OpenCode from deonmenezes/mantishack. It costs 5,183 tokens per session, scanned A, a copy of openinterpreter AGENTS.md, Apache-2.0.

Repository guidance for developers working on Codex-RS, a Rust codebase whose packages are named with the `codex-` prefix. It covers formatting, sandbox behavior, and restrictions on certain environment variables.

In plain words
What is it for?
Editing Rust crates, installing required development commands, and deciding how to handle tests affected by the sandbox.
Why use it?
It reduces avoidable build and review problems by documenting project conventions and limits of the coding environment.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex; $skill-name invocation.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/deonmenezes/mantishack/agents-md"><img src="https://agentmods.dev/badge/instructions/deonmenezes/mantishack/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,183 This file is loaded in full into every session.
When invoked 5,183 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 98% copy Near-identical to another mod 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.05183 $0.05183
Opus 5.5 $0.02073 $0.02073
Sonnet 5.5 $0.01037 $0.01037
Haiku 4.5 $0.00518 $0.00518

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

Security

Grade A, and why

mantishack 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 1mo 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.

Origin

This is a copy

98% identical to openinterpreter AGENTS.md — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 323 lines

How it starts

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

Rust/codex-rs

In the codex-rs folder where the rust code lives:

  • Crate names are prefixed with codex-. For example, the core folder's crate is named codex-core
  • When using format! and you can inline variables into {}, always do that.
  • Install any commands the repo relies on (for example just, rg, or cargo-insta) if they aren't already available before running instructions here.
  • Never add or modify any code related to CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR or CODEX_SANDBOX_ENV_VAR.
    • You operate in a sandbox where CODEX_SANDBOX_NETWORK_DISABLED=1 will be set whenever you use the shell tool. Any existing code that uses CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR was authored with this fact in mind. It is often used to early exit out of tests that the author knew you would not be able to run given your sandbox limitations.
    • Similarly, when you spawn a process using Seatbelt (/usr/bin/sandbox-exec), CODEX_SANDBOX=seatbelt will be set on the child process. Integration tests that want to run Seatbelt themselves cannot be run under Seatbelt, so checks for CODEX_SANDBOX=seatbelt are also often used to early exit out of tests, as appropriate.
  • Always collapse if statements per https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
  • Always inline format! args when possible per https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
  • Use method references over closures when possible per https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
  • Avoid bool or ambiguous Option parameters that force callers to write hard-to-read code such as foo(false) or bar(None). Prefer enums, named methods, newtypes, or other idiomatic Rust API shapes when they keep the callsite self-documenting.
  • When you cannot make that API change and still need a small positional-literal callsite in Rust, follow the argument_comment_lint convention:
    • Use an exact /*param_name*/ comment before opaque literal arguments such as None, booleans, and numeric literals when passing them by position.
    • A method's sole non-self argument is exempt when the method and parameter names match, such as .enabled(false) for fn enabled(&self, enabled: bool).
    • Do not add these comments for string or char literals unless the comment adds real clarity; those literals are intentionally exempt from the lint.
    • The parameter name in the comment must exactly match the callee signature.
    • You can run just argument-comment-lint to run the lint check locally. This is powered by Bazel, so running it the first time can be slow if Bazel is not warmed up, though incremental invocations should take <15s. Most of the time, it is best to update the PR and let CI take responsibility for checking this (or run it asynchronously in the background after submitting the PR). Note CI checks all three platforms, which the local run does not.
  • When possible, make match statements exhaustive and avoid wildcard arms.
  • Newly added traits should include doc comments that explain their role and how implementations are expected to use them.
  • Discourage both #[async_trait] and #[allow(async_fn_in_trait)] in Rust traits.
    • Prefer native RPITIT trait methods with explicit Send bounds on the returned future, as in 3c7f013f9735 / #16630.
    • Preferred trait shape: fn foo(&self, ...) -> impl std::future::Future<Output = T> + Send;
    • Implementations may still use async fn foo(&self, ...) -> T when they satisfy that contract.
    • Do not use #[allow(async_fn_in_trait)] as a shortcut around spelling the future contract explicitly.
  • When writing tests, prefer comparing the equality of entire objects over fields one by one.
  • Do not add tests for values that are statically defined.
  • Do not add negative tests for logic that was removed.
  • Do not add general product or user-facing documentation to the docs/ folder. The official Codex documentation lives elsewhere. The exception is app-server API documentation, which is covered by the app-server guidance below.
  • Prefer private modules and explicitly exported public crate API.
  • If you change ConfigToml or nested config types, run just write-config-schema to update codex-rs/core/config.schema.json.
  • When working with MCP tool calls, prefer using codex-rs/codex-mcp/src/mcp_connection_manager.rs to handle mutation of tools and tool calls. Aim to minimize the footprint of changes and leverage existing abstractions rather than plumbing code through multiple levels of function calls.
  • Do not call reset_client_session unnecessarily; let the incremental check logic decide whether to reuse the previous request.
  • If you change Rust dependencies (Cargo.toml or Cargo.lock), run just bazel-lock-update from the repo root to refresh MODULE.bazel.lock, and include that lockfile update in the same change. CI verifies lockfile drift.
  • Bazel does not automatically make source-tree files available to compile-time Rust file access. If you add include_str!, include_bytes!, sqlx::migrate!, or similar build-time file or directory reads, update the crate's BUILD.bazel (compile_data, build_script_data, or test data) or Bazel may fail even when Cargo passes.
  • Do not create small helper methods that are referenced only once.
  • For tracing async work, instrument the function or method definition with #[tracing::instrument(...)] instead of attaching spans to futures with .instrument(...) at call sites. Before adding instrumentation, check whether the callee—or the implementation method it immediately delegates to—is already instrumented.
  • Avoid large modules:
    • Prefer adding new modules instead of growing existing ones.
    • Target Rust modules under 500 LoC, excluding tests.
    • If a file exceeds roughly 800 LoC, add new functionality in a new module instead of extending the existing file unless there is a strong documented reason not to.
    • This rule applies especially to high-touch files that already attract unrelated changes, such as codex-rs/tui/src/app.rs, codex-rs/tui/src/bottom_pane/chat_composer.rs, codex-rs/tui/src/bottom_pane/footer.rs, codex-rs/tui/src/chatwidget.rs, codex-rs/tui/src/bottom_pane/mod.rs, and similarly central orchestration modules.
    • When extracting code from a large module, move the related tests and module/type docs toward the new implementation so the invariants stay close to the code that owns them.
    • Avoid adding new standalone methods to codex-rs/tui/src/chatwidget.rs unless the change is trivial; prefer new modules/files and keep chatwidget.rs focused on orchestration.
  • When running Rust commands (e.g. just fix or just test) be patient with the command and never try to kill them using the PID. Rust lock can make the execution slow, this is expected.

Read the full file on GitHub · 323 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. 1mo ago First seen · 323 lines · 5,183 tokens per session scan A fdab2a6e75a2

Subscribe to this mod's changes

mantishack AGENTS.md is an instructions file published in the GitHub repository deonmenezes/mantishack (504 stars, last pushed 18d ago), licensed Apache-2.0. It adds 5,183 tokens to every session, about $0.0207 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to openinterpreter AGENTS.md, differing in 4 lines, and is treated as a copy.

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,649 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,384 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