pyobfus AGENTS.md

pyobfus AGENTS.md is an instructions file for Codex, OpenCode from zhurong2020/pyobfus. It costs 1,989 tokens per session, scanned A, original, Apache-2.0.

Project instructions for pyobfus, a tool that changes Python source code into a harder-to-read form, plus a server that lets AI agents use it. They cover setup, testing, and repository structure.

In plain words
What is it for?
Use them when developing, testing, linting, or committing changes to pyobfus, its AI-agent server, or its related protection features.
Why use it?
They tell coding agents which environment and checks to use, while distinguishing development of pyobfus from protecting someone else's code.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/zhurong2020/pyobfus/agents-md
Clone the repo
git clone --depth 1 https://github.com/zhurong2020/pyobfus

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhurong2020/pyobfus/agents-md.svg)](https://agentmods.dev/instructions/zhurong2020/pyobfus/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zhurong2020/pyobfus/agents-md"><img src="https://agentmods.dev/badge/instructions/zhurong2020/pyobfus/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,989 This file is loaded in full into every session.
When invoked 1,989 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01989 $0.01989
Opus 5 $0.00994 $0.00994
Sonnet 5 $0.00398 $0.00398
Haiku 4.5 $0.00199 $0.00199

Measured yesterday against content hash 40b1b0536a75, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pyobfus 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 yesterday.

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 · 157 lines

How it starts

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

AGENTS.md — pyobfus

Canonical, tool-agnostic guide for AI coding agents (and humans) working on the pyobfus codebase. Tool-specific files defer here: CLAUDE.md imports this file; Cursor / Windsurf / Aider / Codex read AGENTS.md natively.

Looking to use pyobfus to protect your own code, not develop it? See the pyobfus-protect skill and the templates/ai-integration/ rule files instead.

What this project is

pyobfus is an AST-based Python code obfuscator — framework-aware presets, reverse stack-trace mapping for AI-assisted debugging, and a machine-readable JSON CLI. A transparent, open-source alternative to PyArmor. The repo ships two packages:

  • pyobfus/ — the obfuscator (CLI + library). Published as pyobfus.
  • pyobfus_mcp/ — an MCP server exposing the tools to AI agents. Published as pyobfus-mcp.

Plus pyobfus_pro/ (commercial, license-gated features) kept source-separated from the Apache-2.0 core.

Setup

Use the repository-local venv/ on WSL/Linux. Do not use .venv/: that directory is a Windows-side legacy environment and WSL cannot reliably run its executables. Either activate venv/ first, or call tools through venv/bin/... directly.

python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
git config core.hooksPath .githooks   # once per clone — enables the PII pre-commit guard

Build / test / lint — run before every commit

venv/bin/pytest tests/                 # core suite (run this and the two below separately)
venv/bin/pytest pyobfus_mcp/tests/     # MCP server suite
venv/bin/pytest integration_tests/     # end-to-end CLI
venv/bin/black pyobfus/                # format
venv/bin/ruff check pyobfus/           # lint
venv/bin/mypy pyobfus/                 # type check

Note: the core and MCP test roots are collected as separate pytest invocations (CI runs them as separate jobs) — don't point one pytest at both roots at once.

Read the full file on GitHub · 157 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. yesterday Changed · +17 lines · +215 tokens per session 40b1b0536a75
  2. 5d ago First seen · 140 lines · 1,774 tokens per session scan A fb3422515ea6

Subscribe to this mod's changes

pyobfus AGENTS.md is an instructions file published in the GitHub repository zhurong2020/pyobfus (6 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,989 tokens to every session, about $0.0099 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-31.