simplifying-code

simplifying-code is a skill for Claude Code, Codex from iliaal/ai-skills. It costs 52 tokens per session (1,745 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

Written for no agent in particular: nothing here depends on one.

Good fit Use it when simplifying, cleaning up, refactoring, decluttering, removing dead code, or improving readability in an existing codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/ai-skills/simplifying-code
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 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/github.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/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 simplifying-code

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,745 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 54
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • low Excessive Agency · line 74
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
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.00052 $0.01745
Opus 5.5 $0.00021 $0.00698
Sonnet 5.5 $0.00010 $0.00349
Haiku 4.5 $0.00005 $0.00175

Measured 13d ago against content hash 557c4501b50f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 13d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/simplifying-code/SKILL.md · 92 lines

How it starts

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

Simplifying Code

Working rules

  • Preserve behavior, interfaces, side effects, and domain intent; prove any unshipped-shape exception has no consumers outside scope.
  • Before removing a guard for an external hazard, reproduce its precondition and show the hazard is handled; otherwise retain it.
  • Verify standard-library substitutions on empty, null, no-match, ordering, and zero-value cases.
  • For analysis-only requests, identify targets and report proposed simplifications without editing code.

Principles

Principle Rule
Preserve behavior Output must do exactly what the input did, with 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
Delete before simplifying Prefer deletion over simplification, simplification over optimization, and optimization over automation. A pass that finds nothing to change is a valid, complete result

Read the full file on GitHub · 92 lines

Files

What ships with it

3 files 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. 13d ago Changed 557c4501b50f
  2. 21d ago Changed · -1 lines · -10 tokens per session c17ae52dce82
  3. 28d ago Changed d019bd02c490
  4. 1mo ago Changed 252ac0aff658
  5. 1mo ago Changed · +1 lines c6eade08f379
  6. 1mo ago Changed · -36 lines 45f7c3c6eea0
  7. 1mo 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 (45 stars, last pushed 6d ago), licensed MIT. It adds 52 tokens to every session and 1,745 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

worth-fix

A verification and decision-making guide for checking whether bug reports, claims, proposals, or refactoring ideas are true and worth acting on.

luochang212/skill-zoo · 134 tokens

pair-programming

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…

frankxai/claude-skills-library · 85 tokens

checkyourself

Use when completed work makes claims — "done", "tests pass", "it works", "ready to launch" — that must be verified before they are believed. Re-derive each claim from the work itself and report CONFIRMED / REFUTED / UNVERIFIABLE with evidence. Fast claim-verification by default; the deterministic production-readiness…

KyaniteLabs/checkyourself · 82 tokens

distributed-trace-analysis

Use this skill when you need to analyze distributed traces for call paths, latency, errors, and evidence gaps; triggers include distributed trace analysis.

naodeng/awesome-qa-skills · 33 tokens

error-handling-design-review

Use this skill when error taxonomy, retries, timeouts, fallback, or recovery design needs an evidence-bounded review before implementation; triggers include error handling design review, failure-path review, and recovery readiness review.

naodeng/awesome-qa-skills · 48 tokens

flaky-test-analysis

Use this skill when you need to investigate intermittent test failures from run history and evidence; triggers include flaky test analysis.

naodeng/awesome-qa-skills · 28 tokens