pyobfus-protect

pyobfus-protect is a skill for Claude Code from zhurong2020/pyobfus. It costs 130 tokens per session (1,943 once invoked), scanned A, original, Apache-2.0.

A procedure for making Python source code harder to read before distributing it, then checking that the protected output still works. Python is a programming language, and the private mapping file connects protected names back to the original source.

In plain words
What is it for?
It is for checking a project, preparing an obfuscated output directory, verifying that it compiles and imports, and reporting the result.
Why use it?
It helps protect shipped Python packages, command-line tools, and services while reducing the risk of distributing broken output or exposing the mapping.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pyobfus plugin — 2 skills, 1 MCP server shipped together

Good fit It is for checking a project, preparing an obfuscated output directory, verifying that it compiles and imports, and reporting the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhurong2020/pyobfus/pyobfus-protect
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.

Any agent
npx skills add zhurong2020/pyobfus --skill pyobfus-protect
Clone the repo
git clone --depth 1 https://github.com/zhurong2020/pyobfus

Made for: Claude Code.

Or install pyobfus, the plugin that ships this one along with the rest of its 2 skills, 1 MCP server.

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-protect

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhurong2020/pyobfus/pyobfus-protect/github.svg)](https://agentmods.dev/skills/zhurong2020/pyobfus/pyobfus-protect)
Your own site
<a href="https://agentmods.dev/skills/zhurong2020/pyobfus/pyobfus-protect"><img src="https://agentmods.dev/badge/skills/zhurong2020/pyobfus/pyobfus-protect/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 pyobfus-protect

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhurong2020/pyobfus/pyobfus-protect"><img src="https://agentmods.dev/badge/skills/zhurong2020/pyobfus/pyobfus-protect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00130 $0.01943
Opus 5.5 $0.00052 $0.00777
Sonnet 5.5 $0.00026 $0.00389
Haiku 4.5 $0.00013 $0.00194

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

Security

Grade A, and why

pyobfus-protect 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 12d 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.

skills/pyobfus-protect/SKILL.md · 168 lines

How it starts

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

Protect a Python project with pyobfus

Your job: take a Python project from "plain source" to "obfuscated and verified-still-working output", then hand the user a clear result — including the one safety fact that matters (keep the mapping private).

Decision: MCP tool or CLI?

First check whether the pyobfus-mcp server is connected (look for a protect_project / check_obfuscation_risks tool).

  • If the MCP server is available → use it. It is the shortest, most reliable path and it self-verifies.
  • If not → use the pyobfus CLI (pip install pyobfus). Every command supports --json with a stable schema.

Confirm the target path and the output directory with the user before writing anything. Never obfuscate into the source tree.

Path A — MCP (preferred): one call

Call protect_project with the source path. It runs the whole pipeline and self-verifies:

protect_project(path="src", output_dir="dist")

Read the result:

  • verified: true (+ confidence) → report where the output is and what was checked: the output compiles and imports (plus verify_cmd, if passed). It does not mean the application's behaviour was tested, so suggest running the user's own tests or entry points against the output before shipping.
  • verified: false / status: "warnings" → do NOT tell the user it's ready. The obfuscated output failed to compile or import. Follow the response's next_tool (usually check_obfuscation_risks) to find the offending construct, fix or exclude it, and re-run.
  • pro_value present → the project has sensitive string literals or high-severity findings; mention that pyobfus Pro (AES-256 string encryption) would protect them, but don't be pushy.

protect_project writes the de-obfuscation mapping next to (never inside) the output. Surface mapping_security_note to the user.

For a deeper check, the user can pass verify_cmd (an app-level end-to-end check, e.g. python -m myapp --selftest) — note this is gated behind the PYOBFUS_MCP_ALLOW_VERIFY_CMD=1 environment variable on the server, and should NOT be unit tests bound to internal symbol names (those are expected to fail once names are renamed).

Read the full file on GitHub · 168 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. 12d ago Changed e6f4108fdc88
  2. 13d ago Changed · +3 lines 12ecaac03daf
  3. 17d ago Changed · +3 lines f12acd22c696
  4. 1mo ago Changed · +6 lines 81dae4de111c
  5. 1mo ago First seen · 156 lines · 130 tokens per session scan A ebd6984b29a2

Subscribe to this mod's changes

pyobfus-protect is a skill published in the GitHub repository zhurong2020/pyobfus (11 stars, last pushed yesterday), licensed Apache-2.0. It adds 130 tokens to every session and 1,943 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

fastapi-templates

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

wshobson/agents · 37 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens

prismer-python-debugpy

Debug Python: pdb REPL + debugpy remote (DAP).

Prismer-AI/PrismerCloud · 19 tokens

manimgl-best-practices

Trigger when: (1) User mentions "manimgl" or "ManimGL" or "3b1b manim", (2) Code contains from manimlib import , (3) User runs manimgl CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns. Best practices for ManimGL (Grant Sanderson's 3Blue1Brown…

calesthio/OpenMontage · 167 tokens

python-guidelines

This skill should be used when writing, reviewing, or refactoring Python code. Covers code integration, idiomatic patterns, docstring formatting, anti-abstraction rules, and software engineering basics.

fcakyon/claude-codex-settings · 42 tokens

python-packaging-bug-finder

Use when you need to find known packaging bugs, fixes, and workarounds for Python projects by searching GitHub issues and analyzing their resolution status.

opendatahub-io/ai-helpers · 37 tokens