python-code-simplifier

An agent for simplifying and refining Python code while keeping its behavior unchanged.

In plain words
What is it for?
Use it to clean up Python modules after edits, reduce unnecessary complexity, and improve clarity while preserving functionality.
Why use it?
It helps make recently changed Python easier to read, more consistent, and easier to maintain without changing what it does.

Agent

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 agents/trailofbits/skills-curated/python-code-simplifier
Clone the repo
git clone --depth 1 https://github.com/trailofbits/skills-curated
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 621 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00036 $0.00621
Opus 5 $0.00018 $0.00311
Sonnet 5 $0.00007 $0.00124
Haiku 4.5 $0.00004 $0.00062

Measured 2d ago against content hash 3cb63d065c27, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-code-simplifier 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 2d 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.

plugins/python-code-simplifier/agents/python-code-simplifier.md · 53 lines

The source is not reproduced here

Licensed CC-BY-SA-4.0

The repository is licensed CC-BY-SA-4.0, which this catalogue does not treat as permission to reproduce the file. Read it at the source.

Read it on GitHub

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. 2d ago First seen · 53 lines · 36 tokens per session scan A 3cb63d065c27

Subscribe to this mod's changes

python-code-simplifier is an agent published in the GitHub repository trailofbits/skills-curated (496 stars, last pushed 1mo ago), licensed CC-BY-SA-4.0. It adds 36 tokens to every session and 621 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

python-reviewer

Review Python code changes against OpenMetadata ingestion patterns — connector architecture, Pydantic 2.x models, pytest conventions, and schema-first design.

open-metadata/OpenMetadata · 32 tokens

ROCKETRIDE_python_API

A Python SDK for executing RocketRide pipelines using the Debug Adapter Protocol (DAP). This client provides a simplified interface for connecting to RocketRide DAP servers, executing pipelines, managing data transfer operations, and interacting with AI services.

rocketride-org/rocketride-server · 0 tokens

WEBHOOK_SDK

Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.

Team-Commonly/commonly · 0 tokens

Package Developer

Develops, tests, and maintains reusable Pantheon packages. Expert in ToolSet API, docstring best practices, and package structure.

aristoteleo/PantheonOS · 30 tokens

python-pro

Python 3.13 language expert for the ClosedLoop plugin monorepo. Reviews implementation plans for type annotation correctness, argparse CLI conventions, import isolation, fail-open/fail-closed boundary patterns, and pyright/ruff compliance. Produces type-patterns.md in legacy mode.

closedloop-ai/claude-plugins · 60 tokens

runner-review

Review Python runner code for convention violations. Use after modifying files under components/runners/ambient-runner/. Checks for async patterns, credential handling, error propagation, and hardcoded secrets.

ambient-code/platform · 40 tokens