# Simplify python

> Simplify python is an open-source agent skill for developer tools. Simplifies recently edited Python for readability while keeping behavior the same. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ccomkhj/skills/tree/main/simplify-python
- **Repository:** https://github.com/ccomkhj/skills
- **GitHub stars:** 10
- **License:** MIT
- **Skill name:** simplify-python
- **Collection:** https://github.com/ccomkhj/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill guides an agent through cleaning up Python code it has recently written or changed, focusing on readability rather than line count. It asks the agent to preserve return values, exception types, side effects and their order, and laziness, and to skip any change where equivalence is uncertain. Cleanup covers guard clauses, flatter control flow, removing dead code and redundant intermediates, and more idiomatic forms such as enumerate, zip, comprehensions, and standard-library helpers.

The workflow has the agent inspect the changed region and its callers, batch related tidyings, run existing tests and lint or type checks, and then report what changed and how it was verified. A zero-change pass is treated as a valid outcome. A separate reference file lists Python gotchas to consult when a candidate touches iteration, comparisons, cleanup, or mappings.

The skill also trims docstrings that repeat the signature while keeping contracts, units, exceptions, and doctests. It does not add missing docstrings unless asked. It expects a Python codebase with an existing test suite and does not run bundled scripts, since none are included.

## When your agent uses it

> Simplify recently written or edited Python for readability without changing behavior. Use for cleanup, idiomatic rewrites, flatter control flow, and trimming redundant code or docstrings. Not for performance tuning or behavior-changing redesign.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ccomkhj/skills/tree/HEAD/simplify-python)
- [License: MIT](https://github.com/ccomkhj/skills/tree/HEAD/simplify-python)

## Features

- **Readability-focused cleanup:** Targets recently modified code and favors reader effort over fewer lines.
- **Behavior preservation contract:** Keeps return values, exceptions, side effects, timing and short-circuiting unchanged.
- **Control flow flattening:** Applies guard clauses and continue statements to reduce nesting in loops and branches.
- **Python idiom rewrites:** Suggests enumerate, zip, unpacking, comprehensions and standard-library helpers where clearer.
- **Docstring trimming:** Removes prose that repeats signatures while keeping contracts, units and exceptions.
- **Verification workflow:** Runs existing tests and lint or type checks and reports changes and limitations.

## Good for

- Clean up a function I just wrote without changing what it returns
- Rewrite a loop with nested ifs into guard clauses and continue
- Replace manual index handling with enumerate or zip
- Trim redundant docstrings in a module I edited
- Remove dead code and unused intermediate variables from my recent changes

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/simplify-python` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/simplify-python &&
cp -R "$tmp/simplify-python" ~/.claude/skills/simplify-python &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/simplify-python` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/simplify-python` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/simplify-python &&
cp -R "$tmp/simplify-python" ~/.agents/skills/simplify-python &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/simplify-python` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/simplify-python` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/simplify-python &&
cp -R "$tmp/simplify-python" ~/.cursor/skills/simplify-python &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/simplify-python` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ccomkhj/skills.git --path simplify-python
```

Or copy the folder to `~/.gemini/skills/simplify-python` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/simplify-python`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/simplify-python &&
cp -R "$tmp/simplify-python" ~/.copilot/skills/simplify-python &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/simplify-python` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ccomkhj/skills.git
```

Then copy `skills/simplify-python` into your agent's skills folder as `simplify-python`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Simplify python change in my code?

It makes readability-focused edits to recently written or edited Python, such as flattening control flow, removing dead code, using idiomatic builtins, and trimming redundant docstrings, while keeping behavior the same.

### Does Simplify python handle performance tuning or redesign?

No. The skill description says it is not for performance tuning or behavior-changing redesign.

### Does Simplify python add missing docstrings?

No, not during cleanup unless explicitly asked. It also preserves doctests and runtime use of __doc__.

### Does Simplify python require any scripts or special tools?

No scripts are included. It asks the agent to run the repository's existing tests and applicable lint or type checks.

### How do I install Simplify python in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/simplify-python to use it in all your projects, or to .claude/skills/simplify-python in one project.

### Does Simplify python run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Simplify python?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Simplify python?

The closest alternatives to Simplify python are Code simplifier, Code simplification edho ferdian, Readable code, Comment code generate a tutorial and Axiom swift simplifier.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Code simplification edho ferdian](https://ai-powered.com/skills/code-simplification-edho-ferdian): Code simplification edho ferdian is an open-source agent skill for developer tools.
- [Readable code](https://ai-powered.com/skills/readable-code): Readable code is an open-source agent skill for developer tools.
- [Comment code generate a tutorial](https://ai-powered.com/skills/comment-code-generate-a-tutorial): Comment code generate a tutorial is an open-source agent skill for developer tools.
- [Axiom swift simplifier](https://ai-powered.com/skills/axiom-swift-simplifier): Axiom swift simplifier is an open-source agent skill for developer tools.
- [Principle subtract before you add](https://ai-powered.com/skills/principle-subtract-before-you-add): Principle subtract before you add is an open-source agent skill for developer tools.
- [Principle laziness protocol](https://ai-powered.com/skills/principle-laziness-protocol): Principle laziness protocol is an open-source agent skill for developer tools.
- [Refactor](https://ai-powered.com/skills/refactor): Refactor is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/simplify-python
