code-simplification

code-simplification is a skill for Claude Code, Codex from HybridAIOne/hybridclaw. It costs 17 tokens per session (690 once invoked), scanned A, original, MIT.

A code-refactoring guide for making existing programs shorter, clearer, and less repetitive while keeping their behavior unchanged.

In plain words
What is it for?
Use it to simplify deeply nested logic, repeated code, long functions, unnecessary wrappers, and hard-to-follow state changes.
Why use it?
It helps reduce complexity without accidentally changing what the software does. It also encourages small edits and checks along the way.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hybridaione/hybridclaw/code-simplification.svg)](https://agentmods.dev/skills/hybridaione/hybridclaw/code-simplification)
Your own site
<a href="https://agentmods.dev/skills/hybridaione/hybridclaw/code-simplification"><img src="https://agentmods.dev/badge/skills/hybridaione/hybridclaw/code-simplification.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 690 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.00017 $0.00690
Opus 5 $0.00009 $0.00345
Sonnet 5 $0.00003 $0.00138
Haiku 4.5 $0.00002 $0.00069

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

Security

Grade A, and why

code-simplification 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/code-simplification/SKILL.md · 103 lines

How it starts

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

Code Simplification

Use this skill for deeper code simplification work while preserving current behavior.

This is intentionally narrower than a generic "simplify" skill: it is for behavior-preserving refactors in a live codebase, with explicit attention to tests, surrounding types, and incremental validation.

Default Workflow

  1. Identify the exact behavior that must stay the same.
  2. Read the surrounding code, types, and tests before editing.
  3. Establish a baseline with the smallest relevant checks.
  4. Simplify in small reversible steps.
  5. Re-run validation after each meaningful change.
  6. Stop when the code is materially clearer, not when it is merely different.

What to Simplify

Prioritize complexity that makes defects more likely:

  • deep nesting that can become guard clauses
  • duplicated logic that can become one local helper
  • conditionals split across too many locations
  • wrappers or abstractions with no real caller benefit
  • long functions that can be split by responsibility
  • state transitions that are hard to follow or partially duplicated

Prefer deleting code over adding a new abstraction when both solve the problem.

Working Rules

  • Preserve behavior first; simplification is not a license for feature changes.
  • Keep refactors small enough that failures are easy to localize.
  • Use existing project patterns instead of inventing a new style.
  • Avoid introducing generic helpers until there are at least a few stable call sites that justify them.
  • If the code is complex because of a real domain constraint, document that before trying to flatten it away.

Common Moves

Use whichever move makes the code simpler without broad churn:

  • convert nested if chains into early returns
  • extract one focused helper from repeated branches
  • replace boolean flag tangles with clearer named conditions
  • inline one-off wrappers that only obscure data flow
  • split data gathering from side effects
  • rename unclear variables when the current names hide intent

Read the full file on GitHub · 103 lines

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 · 103 lines · 17 tokens per session scan A 589278462d47

Subscribe to this mod's changes

code-simplification is a skill published in the GitHub repository HybridAIOne/hybridclaw (132 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 690 once invoked, about $0.0001 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.