Simplify and refactor code while preserving functionality and library constraints.

MITAuto-check passedDevelopment

Install Simplify

skills CLI
$ npx skills add DeL-TaiseiOzaki/claude-code-orchestra --skill simplify -a claude-code

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

GitHub CLI
$ gh skill install DeL-TaiseiOzaki/claude-code-orchestra simplify --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/DeL-TaiseiOzaki/claude-code-orchestra.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/simplify .claude/skills/simplify && 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
simplify
GitHub stars
199
Token cost
~2k tokens
SKILL.md length
852 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Simplify and refactor code while preserving functionality and library constraints.

  • Works in 6 steps: Record the Baseline (mandatory, before… → Analyze Target Code → Check Library Constraints → …
  • Tasks that involve Refactoring
  • SKILL.md covers Declared Scope, Simplification Principles, Steps and Notes
  • Runs Python scripts from its folder; calls python3 and bash

What it does

Simplify is an agent skill from DeL-TaiseiOzaki/claude-code-orchestra. Simplify and refactor code while preserving functionality and library constraints.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `simplify_gate.py`).

It sits in Development, covering Refactoring. The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/simplify”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Record the Baseline (mandatory, before any edit)
  2. Analyze Target Code
  3. Check Library Constraints
  4. Plan Refactoring
  5. Execute Refactoring
  6. Verify Against the Baseline

What it can do on your machine

Read from SKILL.md and the folder at commit ef0d8f8. 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

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • bash

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

  • Network

    No URLs in SKILL.md.

    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

Simplify loads about 2k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 852 words of instructions outside code blocks.

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

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 DeL-TaiseiOzaki/claude-code-orchestra at commit ef0d8f8, republished under its MIT licence (© DeL-TaiseiOzaki). 852 words, ~1,986 tokens.

Download SKILL.mdSave it as .claude/skills/simplify/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
simplify
description
Simplify and refactor code while preserving functionality and library constraints.
disable-model-invocation
true

Simplify Code

Simplify and refactor $ARGUMENTS.

This skill edits source code while promising not to change behaviour and not to widen its own scope. Both promises are checked rather than asserted: Step 0 records a gate baseline and the declared target set, and Step 5 compares against it. A refactor whose baseline was never recorded cannot be reported as verified.

Declared Scope

Resolve $ARGUMENTS into a concrete list of files and/or directories before editing anything, and pass each one as a --scope entry in Step 0. That list is the answer to "was this a refactor or a rewrite" — anything else that changes is reported as out_of_scope_files and fails Step 5.

Simplification Principles

  1. Single Responsibility - 1 function = 1 thing
  2. Short Functions - Target under 20 lines
  3. Shallow Nesting - Early return, depth ≤ 2
  4. Clear Naming - Clear enough to not need comments
  5. Type Hints Required - On all functions

Steps

0. Record the Baseline (mandatory, before any edit)
bash
python3 .claude/skills/simplify/simplify_gate.py --phase before \
  --scope {target file or dir} [--scope {another}] [--base main]

It runs _shared/verify.sh and _shared/gather_diff.py and writes .claude/logs/simplify-baseline.json: the gate status of every tool as it is now, the current HEAD, the declared scope, and any file that was already modified before you started. Without this, a gate that was red the whole time is indistinguishable from a regression this refactor introduced.

Read the JSON:

  • overall_before — pass / fail / no_gates. On fail, note which tools are in the baseline as failing; Step 5 will report them as pre_existing_failures rather than blaming your refactor.
  • pre_existing_changes[] — dirty files you did not touch, excluded from the scope check later.
  • baseline_file, artifacts[].

Exit codes: 0 baseline recorded · 1 bad arguments, or --scope missing — without a declared target set "no scope creep" cannot be checked · 2 no gate could run at all, so the refactor would be unverifiable · 3 verify.sh / gather_diff.py failed, or the baseline could not be written.

--baseline PATH moves the record elsewhere (default .claude/logs/simplify-baseline.json); pass the same value to both phases when two refactors are in flight. --project-root DIR relocates the repository root.

On exit 2, stop. Either configure the project's gates, or agree with the user on the exact commands that will verify this refactor, run them, record each command with its exit code, and re-run with --allow-no-gates so the payload carries allow_no_gates: true. Do not edit code first and decide how to verify it afterwards.

Steps 1-4 Are Delegated

Reading the target files, checking library behaviour, and applying the edits are all past the triggers in .claude/rules/delegation.md — an unread file, a codebase sweep, external lookup, more than ~30 lines of output. The lead keeps Step 0, Step 5, and the "is this actually simpler" judgment; everything between them is delegated, one delegation per scope entry, launched in parallel when the scopes are independent:

Task tool:
  subagent_type: "general-purpose-sonnet"   # general-purpose-opus when the code carries
                                            # security, concurrency, or data-integrity risk
  prompt: |
    Objective: Simplify {scope path} without changing observable behaviour.

    Scope:
    - Edit only these paths: {the same --scope entries passed in Step 0}.
    - Refactor only. No new features, no API changes, no dependency changes.
    - Do not modify, skip, or weaken any test.

    Inputs:
    - Read .claude/rules/coding-principles.md first.
    - Library constraints: .claude/docs/libraries/ (check every library the target uses;
      WebSearch only what those notes do not answer).
    - Apply the Simplification Principles and the patterns in
      .claude/skills/simplify/SKILL.md (early return, extract function).

    Acceptance checks — run before returning:
      bash .claude/skills/_shared/verify.sh

    Output shape:
    ## Hotspots found (file:line -> problem)
    ## Changes applied (file:line -> what and why it reads better)
    ## Library constraints that shaped or blocked a change
    ## Anything deliberately left alone

    Context discipline: return the summary only; do not paste diffs or file bodies.

The reference material below is what the delegate follows — and what the lead applies directly when the target is a single already-open file of roughly 20 lines or fewer (Self-Handle List item 2).

1. Analyze Target Code
  • Read the file(s) to understand current structure
  • Identify complexity hotspots (deep nesting, long functions)
  • List functions/classes to simplify
Show full SKILL.md (346 more words)Show less
2. Check Library Constraints
  • Identify libraries used in target code
  • Check constraints in .claude/docs/libraries/
  • Web search for unclear library behaviors
3. Plan Refactoring

For each complexity issue:

  • What change to make
  • Why it improves readability
  • Verify it doesn't break library usage
4. Execute Refactoring

Apply changes following these patterns:

Early Return:

python
# Before
def process(value):
    if value is not None:
        if value > 0:
            return do_something(value)
    return None

# After
def process(value):
    if value is None:
        return None
    if value <= 0:
        return None
    return do_something(value)

Extract Function:

python
# Before
def main():
    # 50 lines of mixed concerns
    ...

# After
def main():
    data = load_data()
    result = process_data(data)
    save_result(result)
5. Verify Against the Baseline
bash
python3 .claude/skills/simplify/simplify_gate.py --phase after

The scope and base ref are read back from the baseline, so they cannot drift between the two phases; --scope may be repeated here to narrow them further. It re-runs the gates, re-collects the changed files, and attributes every failure:

  • regressions[] — a gate that passed (or was skipped) before and fails now. This is the only list your refactor is responsible for. Fix it.
  • pre_existing_failures[] — red before, red after. Report, do not fix here.
  • fixed[] — red before, green now.
  • gates — {tool: {before, after}} for every gate; quote it rather than re-typing statuses, so skipped is never reported as pass.
  • changed_files[] / in_scope_files[] / out_of_scope_files[] — the diff this run produced. out_of_scope_files is non-empty only when a file outside --scope changed and was not already dirty at baseline.
  • verify_log, diff_file — full gate output and the full patch, for reading rather than for context.
  • warnings[] — includes "no file changed" and "HEAD moved between the two phases".

Exit codes: 0 no regression and no scope creep · 1 no readable baseline (run --phase before first) · 2 a gate regressed, a file outside --scope changed, or no gate could run · 3 verify.sh / gather_diff.py failed.

Then self-review diff_file yourself: the gate proves the tests still pass and the scope held, not that the result is simpler. That judgment is yours.

Notes

  • Always preserve library features/constraints
  • Web search for unclear points
  • Don't change behavior (refactoring only) — regressions[] is the evidence
  • Run --phase after again after each significant change; it is idempotent
  • The "under 20 lines" and "depth ≤ 2" targets are guidance, not thresholds to enforce mechanically. No bundled script measures them, deliberately: a rule that split every 20-line function would produce worse code than it found. Judge each hotspot on whether the extraction has a name worth having.

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

Files

SKILL.md and 1 other file in .claude/skills/simplify of DeL-TaiseiOzaki/claude-code-orchestra.

  • SKILL.md
  • simplify_gate.py

Open the folder on GitHubat commit ef0d8f8

Compare with similar skills

Simplify 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.

Simplify compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Simplify this skillDeL-TaiseiOzaki/claude-code-orchestra199—~2kAutomated safety check: PassMIT
Guidelinesakash-network/node1.1k20 repos~577Automated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Component Refactoringlangflow-ai/langflow155k—~3.5kAutomated safety check: PassMIT
Ponytail Lazy Developer ModeDietrichGebert/ponytail160k1 repos~873Automated safety check: PassMIT
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 20 repos~577 tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    155k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Ponytail Lazy Developer Mode

    DietrichGebert/ponytail

    Makes the agent pick the laziest solution that works: skip unneeded work, reuse what exists, prefer the standard library and platform features, and keep diffs small.

    160k GitHub starsUsed in 1 repo~873 tokens
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 9 days ago
    DevelopmentAuto-check passed

More from DeL-TaiseiOzaki/claude-code-orchestra

All 15 skills in this repo
  • Codex System

    DeL-TaiseiOzaki/claude-code-orchestra

    Codex CLI handles planning, design, and complex code implementation.

    199 GitHub stars~4.2k tokensUpdated 19 days ago
    Auto-check passed
  • Design Tracker

    DeL-TaiseiOzaki/claude-code-orchestra

    Record a project design decision into .claude/docs/DESIGN.md through the shared typed writer.

    199 GitHub stars~2k tokensUpdated 19 days ago
    Auto-check passed
  • Feature

    DeL-TaiseiOzaki/claude-code-orchestra

    Unified feature planning & implementation skill — replaces the old /add-feature and /start-feature skills (both trigger phrases still apply here).

    199 GitHub stars~9.4k tokensUpdated 19 days ago
    Auto-check passed
  • Plan

    DeL-TaiseiOzaki/claude-code-orchestra

    Create a detailed implementation plan for a feature or task.

    199 GitHub stars~2.1k tokensUpdated 19 days ago
    Auto-check passed
  • Catchup

    DeL-TaiseiOzaki/claude-code-orchestra

    Comprehensive onboarding for new or returning contributors. An agent skill from DeL-TaiseiOzaki/claude-code-orchestra.

    199 GitHub stars~1.8k tokensUpdated 19 days ago
    Auto-check passed
  • Checkpointing

    DeL-TaiseiOzaki/claude-code-orchestra

    Save session activity, rebuild rolling PROGRESS.md, and compact stale working blocks in .claude/STATE.md.

    199 GitHub stars~1.8k tokensUpdated 19 days ago
    Auto-check passed

Categories

Questions about Simplify

What does Simplify do?

Simplify and refactor code while preserving functionality and library constraints. Simplify is an agent skill from DeL-TaiseiOzaki/claude-code-orchestra. Simplify and refactor code while preserving functionality and library constraints.

When should I use Simplify?

Simplify fits situations like: tasks that involve Refactoring.

How do I install Simplify in Claude Code?

Run `npx skills add DeL-TaiseiOzaki/claude-code-orchestra --skill simplify -a claude-code`. Or copy the skill folder (.claude/skills/simplify in DeL-TaiseiOzaki/claude-code-orchestra) into .claude/skills/simplify in your project. Claude Code loads it when a task matches its description.

How do I install Simplify in Codex?

Run `npx skills add DeL-TaiseiOzaki/claude-code-orchestra --skill simplify -a codex`. Or copy the skill folder (.claude/skills/simplify in DeL-TaiseiOzaki/claude-code-orchestra) into .agents/skills/simplify in your project. Codex loads it when a task matches its description.

Can I use Simplify 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 DeL-TaiseiOzaki/claude-code-orchestra --skill simplify -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/simplify, .gemini/skills/simplify, .github/skills/simplify and .opencode/skills/simplify in your project.

What does Simplify need to run?

Going by SKILL.md and its folder, Simplify needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and bash). Our summary lists: Python 3.

Does Simplify access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Simplify 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 Simplify use?

Simplify is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Simplify use?

About 2k tokens (SKILL.md is roughly 7.9k 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 Simplify?

Skills that share tags, products or a category with Simplify: Guidelines (akash-network/node, 1.1k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Component Refactoring (langflow-ai/langflow, 155k stars) and Ponytail Lazy Developer Mode (DietrichGebert/ponytail, 160k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Simplify?

DeL-TaiseiOzaki (a GitHub user) maintains it in DeL-TaiseiOzaki/claude-code-orchestra, which has 199 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 20, 2026.

Source: DeL-TaiseiOzaki/claude-code-orchestra on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.