simplifying-code

simplifying-code is a skill for Claude Code, Codex from iliaal/ai-skills. It costs 62 tokens per session (2,508 once invoked), scanned A, original, MIT.

A guide for making code simpler and easier to read without changing what it does. It covers removing clutter and dead code while preserving important behavior such as errors, retries, logging, and timing.

In plain words
What is it for?
Use it when simplifying, cleaning up, refactoring, decluttering, removing dead code, or improving readability in an existing codebase.
Why use it?
It helps reduce confusing or unnecessary code without accidentally changing the program's behavior. The emphasis is on clear, direct code rather than clever abstractions.

Skill for Claude CodeCodex

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 skills/iliaal/ai-skills/simplifying-code
Any agent
npx skills add iliaal/ai-skills --skill simplifying-code
Clone the repo
git clone --depth 1 https://github.com/iliaal/ai-skills

Made for: Claude Code, Codex.

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 simplifying-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/iliaal/ai-skills/simplifying-code.svg)](https://agentmods.dev/skills/iliaal/ai-skills/simplifying-code)
Your own site
<a href="https://agentmods.dev/skills/iliaal/ai-skills/simplifying-code"><img src="https://agentmods.dev/badge/skills/iliaal/ai-skills/simplifying-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,508 The whole file, excluding the scripts and references it only reads on demand.
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.00062 $0.02508
Opus 5 $0.00031 $0.01254
Sonnet 5 $0.00012 $0.00502
Haiku 4.5 $0.00006 $0.00251

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

Security

Grade A, and why

simplifying-code 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 4d 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/simplifying-code/SKILL.md · 128 lines

How it starts

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

Simplifying Code

Principles

Principle Rule
Preserve behavior Output must do exactly what the input did -- no silent feature additions or removals. Specifically preserve: async/sync boundaries (do not convert sync to async or reverse), error propagation paths (do not alter strategy), logging/telemetry/guards/retries that encode operational intent, and domain-specific steps (do not collapse into generic helpers that hide intent). One carve-out: a shape that existed only in an earlier iteration of the current unshipped scope is not protected behavior. Verify it has no deployed, persisted, public, external, dependent-branch, or in-repo caller outside the resolved scope, and that every required caller update fits inside the edit boundary; otherwise keep the compatibility path. This narrow exemption is about shapes with provably zero consumers -- it never licenses removing a guard, which is governed by the evidence bar under AI Slop Removal
Explicit over clever Prefer explicit variables over nested expressions. Readable beats compact
Simplicity over cleanliness Prefer straightforward code over pattern-heavy "clean" code. Three similar lines beat a premature abstraction
Surgical changes Touch only what needs simplifying. Match existing style, naming conventions, and formatting of the surrounding code
Surface assumptions Before changing a block, identify what imports it, what it imports, and what tests cover it. Edit dependents in the same pass

Changing an interface, exported name, persisted format, or path reaches past the import graph. Enumerate the producers, consumers, schemas, fixtures, generators, manifests, scripts and CI recipes, config references, and documents that carry the old identifier, and migrate them in the same pass. Close out by searching for the old identifier: zero hits, or one line accounting for each intentional remainder. Renames rot in the fixture holding the old key and the .env.example entry, neither of which any import graph contains. When the identifier is a public or exported API, Stop Conditions applies first -- confirm with the user, then enumerate; the sweep runs unprompted only for internal identifiers.

Read the full file on GitHub · 128 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 128 lines · 62 tokens per session scan A db52ad75afa5

Subscribe to this mod's changes

simplifying-code is a skill published in the GitHub repository iliaal/ai-skills (40 stars, last pushed 5d ago), licensed MIT. It adds 62 tokens to every session and 2,508 once invoked, about $0.0003 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 skills, from other repositories

narrative-text-visualization

Generate structured narrative text visualizations from data using T8 Syntax. Use when users want to create data interpretation reports, summaries, or structured articles with semantic entity annotations. T8 is designed for unstructured data visualization where T stands for Text and 8 represents a byte of 8 bits…

antvis/chart-visualization-skills · 74 tokens

gpt-vis

推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。.

antvis/chart-visualization-skills · 63 tokens

antv-x6-editor

Use this skill whenever the user wants to create, customize, or troubleshoot X6 v3 graph editor diagrams. Triggers include: any mention of 'X6', 'antv x6', '@antv/x6', 'X6 editor', 'X6 图编辑', '流程图', 'DAG', 'ER图', '实体关系图', '血缘图', '组织架构图', 'UML类图', 'flowchart', 'DAG diagram', 'ER diagram', 'lineage graph', 'org chart'…

antvis/chart-visualization-skills · 253 tokens

infographic-creator

Create beautiful infographics based on given text content. Use when users request to create infographics.

antvis/chart-visualization-skills · 24 tokens

antv-g2-chart

Use this skill whenever the user wants to create, customize, or troubleshoot G2 v5 chart visualizations. Triggers include: any mention of 'G2', 'antv g2', '@antv/g2', 'G2 chart', 'G2 可视化', or requests to produce charts like bar charts (柱状图), line charts (折线图), pie charts (饼图), scatter plots (散点图), area charts (面积图)…

antvis/chart-visualization-skills · 230 tokens

review-spd

Findings-first code review workflow for AI coding agents. Use when the user asks to review uncommitted changes, commits in a date range, or a branch compared to the main branch / PR-style diff. Focuses on bugs, regressions, correctness risks, missing tests, security/data-safety issues, and other behavior-changing…

zhu1090093659/spec_driven_develop · 72 tokens