simplify

Simplify and refactor $ARGUMENTS.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "simplify" with this command: npx skills add del-taiseiozaki/claude-code-orchestra/del-taiseiozaki-claude-code-orchestra-simplify

Simplify Code

Simplify and refactor $ARGUMENTS.

Simplification Principles

  • Single Responsibility - 1 function = 1 thing

  • Short Functions - Target under 20 lines

  • Shallow Nesting - Early return, depth ≤ 2

  • Clear Naming - Clear enough to not need comments

  • Type Hints Required - On all functions

Steps

  1. Analyze Target Code
  • Read the file(s) to understand current structure

  • Identify complexity hotspots (deep nesting, long functions)

  • List functions/classes to simplify

  1. Check Library Constraints
  • Identify libraries used in target code

  • Check constraints in .claude/docs/libraries/

  • Web search for unclear library behaviors

  1. Plan Refactoring

For each complexity issue:

  • What change to make

  • Why it improves readability

  • Verify it doesn't break library usage

  1. Execute Refactoring

Apply changes following these patterns:

Early Return:

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:

Before

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

After

def main(): data = load_data() result = process_data(data) save_result(result)

  1. Verify with Tests

uv run pytest -v

Notes

  • Always preserve library features/constraints

  • Web search for unclear points

  • Don't change behavior (refactoring only)

  • Run tests after each significant change

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

context-loader

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

update-design

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

codex-system

No summary provided by upstream source.

Repository SourceNeeds Review