code-simplifier

Instructions for cleaning up recently changed code while keeping its behavior exactly the same. The focus is on clearer structure, consistent style, and easier maintenance.

In plain words
What is it for?
Use it after editing code to improve naming, control flow, imports, formatting, and readability within the files touched in the current work.
Why use it?
It helps remove unnecessary complexity without accidentally changing features, outputs, or side effects.

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/1024xengineer/bytemind/code-simplifier
Any agent
npx skills add 1024XEngineer/bytemind --skill code-simplifier
Clone the repo
git clone --depth 1 https://github.com/1024XEngineer/bytemind

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 672 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.00065 $0.00672
Opus 5 $0.00032 $0.00336
Sonnet 5 $0.00013 $0.00134
Haiku 4.5 $0.00006 $0.00067

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

Security

Grade A, and why

code-simplifier 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 2d 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.

.agents/skills/code-simplifier/SKILL.md · 88 lines

How it starts

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

Refine recently modified code for clarity, consistency, and maintainability while preserving exact functionality.

Core behavior

Preserve behavior exactly.

  • Do not change features, outputs, side effects, or observable behavior.
  • Change how the code is written, not what it does.
  • Do not broaden scope unless the user explicitly asks for a wider review.

Focus on code that was recently modified or touched in the current session.

  • Prefer refining the code that was just written or edited.
  • Avoid unrelated cleanup in untouched areas.

Prefer explicit, readable code over compact code.

  • Choose clarity over brevity.
  • Avoid clever one-liners when a straightforward structure is easier to read.
  • Avoid nested ternary operators. Use if/else chains or switch statements for multiple conditions.

Apply project conventions

When the repository or provided guidance includes project standards such as CLAUDE.md, follow them closely.

Common conventions to apply when present:

  • Use ES modules with proper import sorting and explicit extensions where required.
  • Prefer the function keyword over arrow functions when that is the project standard.
  • Add explicit return type annotations for top-level functions when the project expects them.
  • Follow established React component patterns with explicit Props types.
  • Use the repository’s preferred error-handling patterns and avoid introducing unnecessary try/catch.
  • Preserve existing naming conventions unless renaming clearly improves consistency and does not increase scope.

If no project standard is available, preserve the local style of the surrounding code while still simplifying it.

What to improve

Look for opportunities to:

  • reduce unnecessary nesting
  • remove redundant abstractions
  • eliminate duplicated logic when the result is clearer
  • consolidate closely related logic
  • improve variable, function, and component names when that materially improves readability
  • remove comments that only restate obvious code behavior
  • make control flow easier to follow
  • keep helpful abstractions that improve organization

Read the full file on GitHub · 88 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. 2d ago First seen · 88 lines · 65 tokens per session scan A d445ac61fa43

Subscribe to this mod's changes

code-simplifier is a skill published in the GitHub repository 1024XEngineer/bytemind (43 stars, last pushed 1mo ago), licensed MIT. It adds 65 tokens to every session and 672 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

peer-review

Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating…

xintaofei/codeg · 71 tokens

scientific-critical-thinking

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review…

xintaofei/codeg · 63 tokens

scientific-schematics

Create publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.1 Pro Preview for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways…

xintaofei/codeg · 68 tokens

statistical-analysis

Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required…

xintaofei/codeg · 111 tokens

hypothesis-generation

Structured hypothesis formulation from observations. Use when you have experimental observations or data and need to formulate testable hypotheses with predictions, propose mechanisms, and design experiments to test them. Follows scientific method framework. For open-ended ideation use scientific-brainstorming; for…

xintaofei/codeg · 69 tokens

paper-lookup

Search 10 academic literature APIs for papers, preprints, citations, and open-access full text, and return results with reproducible provenance. Covers PubMed, PMC (full text), bioRxiv, medRxiv, arXiv, OpenAlex, Crossref, Semantic Scholar, CORE, Unpaywall. Use when searching for papers, citations, DOI/PMID/arXiv…

xintaofei/codeg · 146 tokens