Agent skill

Code Simplifier

by mobazha in mobazha/mobazha-unified

Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality.

MPL-2.0Auto-check passedDevelopment

Install Code Simplifier

skills CLI
$ npx skills add mobazha/mobazha-unified --skill code-simplifier -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mobazha/mobazha-unified code-simplifier --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mobazha/mobazha-unified.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/code-simplifier .claude/skills/code-simplifier && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-simplifier
GitHub stars
165
Token cost
~601 tokens
SKILL.md length
173 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MPL-2.0

At a glance

Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality.

  • Works in 5 steps: Identify recently modified code sections… → Analyze for simplification opportunities → Apply project conventions from… → …
  • Asks to simplify
  • SKILL.md covers 适用场景, Simplification Rules, Process and Architecture Check, plus 1 more section
  • Calls git and pnpm

What it does

Code Simplifier is an agent skill from mobazha/mobazha-unified. Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality. Use after completing a coding task, fixing a bug, or when the user asks to "simplify", "clean up", "refine", "简化代码", "清理代码", "优化代码", "精简", "重构".

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code simplification. The repository describes itself as: Open-source commerce frontend for storefronts, marketplaces, checkout, and seller management. The licence is MPL-2.0.

When your agent uses it

  • Asks to simplify
  • Tasks that involve Code simplification

Example prompts

  • “simplify”
  • “clean up”
  • “refine”
  • “/code-simplifier”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify recently modified code sections (via git diff or user specification)
  2. Analyze for simplification opportunities
  3. Apply project conventions from .cursor/rules/
  4. Verify all functionality remains unchanged
  5. Run pnpm validate:quick to confirm no regressions

What it can do on your machine

Read from SKILL.md and the folder at commit 156c699. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Simplifier loads about 601 tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 173 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~601

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mobazha/mobazha-unified at commit 156c699, republished under its MPL-2.0 licence (© mobazha). 173 words, ~601 tokens.

Download SKILL.mdSave it as .claude/skills/code-simplifier/SKILL.md (or your agent's skills folder).
name
code-simplifier
description
Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality. Use after completing a coding task, fixing a bug, or when the user asks to "simplify", "clean up", "refine", "简化代码", "清理代码", "优化代码", "精简", "重构".

Code Simplifier

对最近修改的代码进行精简优化,提升清晰度和可维护性,不改变行为。

适用场景

  • 实现新功能后
  • 修复 bug 后(特别是添加了多层条件判断时)
  • 重构或性能优化后
  • 用户要求"简化"、"清理"、"优化"代码时

Simplification Rules

DO
  • Reduce unnecessary complexity and nesting
  • Eliminate redundant code and abstractions
  • Improve variable and function names for clarity
  • Consolidate related logic
  • Remove obvious comments that describe what code does
  • Use early returns to reduce nesting
  • Extract repeated patterns into shared utilities
DON'T
  • Change what the code does — only how it does it
  • Use nested ternary operators — prefer if/else or switch
  • Prioritize fewer lines over readability
  • Create overly clever solutions hard to understand
  • Combine too many concerns into single functions
  • Remove helpful abstractions that improve organization

Process

  1. Identify recently modified code sections (via git diff or user specification)
  2. Analyze for simplification opportunities
  3. Apply project conventions from .cursor/rules/
  4. Verify all functionality remains unchanged
  5. Run pnpm validate:quick to confirm no regressions

Architecture Check

After simplifying, verify code still follows project architecture:

  • Types in @mobazha/core/types/, not in apps/
  • Transform functions in @mobazha/core/utils/, not duplicated
  • Components use hooks for data, not direct API calls
  • No duplicate business logic across files

Example

typescript
// ❌ Before: nested, hard to follow
function getStatus(order) {
  if (order) {
    if (order.state === 'PENDING') {
      if (order.funded) {
        return 'funded';
      } else {
        return 'awaiting_payment';
      }
    } else if (order.state === 'FULFILLED') {
      return 'shipped';
    } else {
      return 'unknown';
    }
  }
  return 'not_found';
}

// ✅ After: early returns, flat structure
function getStatus(order) {
  if (!order) return 'not_found';

  switch (order.state) {
    case 'PENDING':
      return order.funded ? 'funded' : 'awaiting_payment';
    case 'FULFILLED':
      return 'shipped';
    default:
      return 'unknown';
  }
}

© mobazha, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/code-simplifier of mobazha/mobazha-unified.

Open the folder on GitHubat commit 156c699

Compare with similar skills

Code Simplifier next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Simplifier compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Simplifier this skillmobazha/mobazha-unified165—~601Automated safety check: PassMPL-2.0
PonytailDavidObando/gsharp5648 repos~1.7kAutomated safety check: PassMIT
Ponytail Reviewkortix-ai/suna20k4 repos~593Automated safety check: PassCustom licence
Code Simplification for ego-litecitrolabs/ego-lite17k—~1.2kAutomated safety check: PassMIT
Refactor Pass for Simplicitystar-history/star-history9.6k1 repos~168Automated safety check: PassMIT
RTK Rust Code Simplifierrtk-ai/rtk83k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    564 GitHub starsUsed in 8 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Ponytail Review

    kortix-ai/suna

    Code review focused exclusively on over-engineering. An agent skill from kortix-ai/suna.

    20k GitHub starsUsed in 4 repos~593 tokens
    DevelopmentAuto-check passed
  • Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.

    17k GitHub stars~1.2k tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Refactor Pass for Simplicity

    star-history/star-history

    Perform a refactor pass focused on simplicity after recent changes. Use when the user asks for a refactor/cleanup pass, simplification, or dead-code removal…

    9.6k GitHub starsUsed in 1 repo~168 tokens
    DevelopmentAuto-check passed
  • Reviews RTK's Rust code for over-engineering and verbose patterns, applying idioms like iterator chains and early returns while protecting a specific list of constraints from being simplified away.

    83k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Deslop

    millionco/react-doctor

    Simplify and refine recently modified code while preserving functionality.

    15k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed

More from mobazha/mobazha-unified

All 29 skills in this repo
  • A11y Guide

    mobazha/mobazha-unified

    Accessibility guide for Mobazha following WCAG 2.1 AA standards including color contrast, reduced motion, ARIA patterns, keyboard navigation, focus management, and screen reader testing.

    165 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • API Reference

    mobazha/mobazha-unified

    Look up Mobazha backend API endpoints, request/response formats, and field mappings.

    165 GitHub stars~1.7k tokensUpdated 4 days ago
    Auto-check passed
  • Code Review

    mobazha/mobazha-unified

    Review code for quality, architecture consistency, and adherence to Mobazha project standards using confidence-based filtering.

    165 GitHub stars~464 tokensUpdated 4 days ago
    Auto-check passed
  • Commit Helper

    mobazha/mobazha-unified

    Generate commit messages and run pre-commit validation following Mobazha conventions.

    165 GitHub stars~735 tokensUpdated 4 days ago
    Auto-check passed
  • Component Dev

    mobazha/mobazha-unified

    Create and modify UI components following Mobazha conventions including directory structure, spacing standards, accessibility, and testing.

    165 GitHub stars~638 tokensUpdated 4 days ago
    Auto-check passed
  • Debug Troubleshoot

    mobazha/mobazha-unified

    Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging.

    165 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Code Simplifier

What does Code Simplifier do?

Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality. Code Simplifier is an agent skill from mobazha/mobazha-unified. Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality.

When should I use Code Simplifier?

Code Simplifier fits situations like: asks to simplify; tasks that involve Code simplification.

How do I install Code Simplifier in Claude Code?

Run `npx skills add mobazha/mobazha-unified --skill code-simplifier -a claude-code`. Or copy the skill folder (.cursor/skills/code-simplifier in mobazha/mobazha-unified) into .claude/skills/code-simplifier in your project. Claude Code loads it when a task matches its description.

How do I install Code Simplifier in Codex?

Run `npx skills add mobazha/mobazha-unified --skill code-simplifier -a codex`. Or copy the skill folder (.cursor/skills/code-simplifier in mobazha/mobazha-unified) into .agents/skills/code-simplifier in your project. Codex loads it when a task matches its description.

Can I use Code Simplifier in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mobazha/mobazha-unified --skill code-simplifier -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-simplifier, .gemini/skills/code-simplifier, .github/skills/code-simplifier and .opencode/skills/code-simplifier in your project.

What does Code Simplifier need to run?

Going by SKILL.md and its folder, Code Simplifier needs the command-line tools its instructions call (git and pnpm).

Does Code Simplifier access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Simplifier safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Simplifier use?

Code Simplifier is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Simplifier use?

About 601 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Simplifier?

Skills that share tags, products or a category with Code Simplifier: Ponytail (DavidObando/gsharp, 564 stars), Ponytail Review (kortix-ai/suna, 20k stars), Code Simplification for ego-lite (citrolabs/ego-lite, 17k stars) and Refactor Pass for Simplicity (star-history/star-history, 9.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Simplifier?

mobazha (a GitHub organization) maintains it in mobazha/mobazha-unified, which has 165 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 3, 2026.

Source: mobazha/mobazha-unified on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.