# Readable code

> Readable code is an open-source agent skill for developer tools. Applies readability rules to code you write, review or refactor in any language. 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/denysdovhan/skills/tree/main/skills/readable-code
- **Repository:** https://github.com/denysdovhan/skills
- **GitHub stars:** 21
- **License:** MIT
- **Skill name:** readable-code
- **Collection:** https://github.com/denysdovhan/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill gives the agent a set of readability rules for writing, reviewing and refactoring code. It covers keeping functions short and single-purpose, flattening nested control flow with guard clauses, naming things precisely, breaking up large expressions, limiting variable scope, replacing magic values with named constants, and keeping argument lists small. Each rule comes with short examples, mostly in TypeScript.

The guidance is layered. General rules apply to every language, and the skill points to separate reference notes for TypeScript, JavaScript and JSX, and for Python. For other languages the agent is told to apply the general rules along with that language's own idioms. The skill also instructs the agent to defer to a project's linter, formatter and existing conventions, to touch only the code being edited, and to cite rule numbers when reporting findings in a review.

No scripts or tools are bundled. The skill works by shaping how the agent reads and edits code, so it needs only a coding agent and the code it is working on.

## When your agent uses it

> Readable code rules inspired by The Art of Readable Code, for any language with TypeScript/JavaScript as the primary focus. Use when writing, reviewing, or refactoring code in TS, JS, React/JSX, Node, Python, or any other language, including when the user asks to clean up, simplify, untangle, or make code easier to follow. Enforces short functions, flat control flow, clear naming, readable structure, and language idioms.

## What it can access

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

- [Instructions only, no scripts](https://github.com/denysdovhan/skills/tree/HEAD/skills/readable-code)
- [Includes binary files](https://github.com/denysdovhan/skills/tree/HEAD/skills/readable-code)
- [License: MIT](https://github.com/denysdovhan/skills/tree/HEAD/skills/readable-code)

## Features

- **Short focused functions:** Guidance to keep each function doing one thing at a single level of abstraction.
- **Flat control flow:** Rules for early returns, guard clauses and limiting nesting depth.
- **Clear naming rules:** Advice on specific names, boolean prefixes and avoiding abbreviations and vague labels.
- **Explaining variables:** Techniques for splitting complex expressions into named pieces and simplifying negations.
- **Constants and argument limits:** Guidance on replacing magic values with named constants and grouping function arguments.
- **Formatter-friendly code:** Advice on structuring chained calls so the project's formatter output stays readable.
- **Language-specific references:** Separate idiom notes for TypeScript, JavaScript, JSX and Python, with general rules for other languages.

## Good for

- Refactor a deeply nested function into smaller, flatter helpers
- Review a pull request for readability issues and cite the rules broken
- Clean up a messy React component so its logic is easier to follow
- Rename vague variables and functions in a Python module
- Simplify a complex boolean condition with named intermediate variables

## Install

### Claude Code

This skill ships in the `dd-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add denysdovhan/skills
/plugin install dd-skills@dd-skills
```

Or copy only this skill to `~/.claude/skills/readable-code`:

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

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

### Codex

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

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

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

### Cursor

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

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

For one project only, put the folder in `.cursor/skills/readable-code` 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/denysdovhan/skills.git --path skills/readable-code
```

Or copy the folder to `~/.gemini/skills/readable-code` yourself.

### VS Code

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

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

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

### Other agents

Get the folder:

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

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

## FAQ

### Which languages does Readable code cover?

The general rules apply to any language. The skill has TypeScript, JavaScript and JSX as its primary focus, with a separate Python reference, and tells the agent to apply that language's own idioms elsewhere.

### Does Readable code override my project's linter or formatter?

No. The skill states that the project's linter, formatter and existing conventions take precedence over its rules.

### Does Readable code change unrelated code?

When editing existing code it asks the agent to apply the rules only to the code being touched and to mention other problems instead of rewriting unrelated code.

### How do I install Readable code?

The repository readme gives the command npx skills add denysdovhan/skills --skill readable-code.

### How do I install Readable code in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/readable-code to use it in all your projects, or to .claude/skills/readable-code in one project. Or install the dd-skills plugin, which includes it: /plugin marketplace add denysdovhan/skills, then /plugin install dd-skills@dd-skills.

### Does Readable code 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 Readable code?

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 Readable code?

The closest alternatives to Readable code are Readable cpp, Code simplifier, Coding standards, Refactor and Writing rules.

## Where this comes from

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

## Alternatives

- [Readable cpp](https://ai-powered.com/skills/readable-cpp): Readable cpp is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Coding standards](https://ai-powered.com/skills/coding-standards-smartworldarafath): Coding standards 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.
- [Writing rules](https://ai-powered.com/skills/writing-rules-xiaolai): Writing rules is an open-source agent skill for developer tools.
- [TypeScript best practices](https://ai-powered.com/skills/typescript-best-practices): TypeScript best practices is an open-source agent skill for developer tools.
- [Principle minimize reader load](https://ai-powered.com/skills/principle-minimize-reader-load): Principle minimize reader load is an open-source agent skill for developer tools.
- [Rules](https://ai-powered.com/skills/rules-xiaolai): Rules is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/readable-code
