simplify

Simplify and refactor code while preserving functionality and library constraints.

141 stars

Best use case

simplify is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Simplify and refactor code while preserving functionality and library constraints.

Teams using simplify should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/simplify/SKILL.md --create-dirs "https://raw.githubusercontent.com/DeL-TaiseiOzaki/claude-code-orchestra/main/.claude/skills/simplify/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/simplify/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How simplify Compares

Feature / AgentsimplifyStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Simplify and refactor code while preserving functionality and library constraints.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Simplify Code

Simplify and refactor $ARGUMENTS.

## 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

### 1. Analyze Target Code

- Read the file(s) to understand current structure
- Identify complexity hotspots (deep nesting, long functions)
- List functions/classes to simplify

### 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 with Tests

```bash
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

Related Skills

context-loader

141
from DeL-TaiseiOzaki/claude-code-orchestra

ALWAYS activate this skill at the start of every task. Load project context from .claude/ directory including coding rules, design decisions, and documentation before executing any task.

update-lib-docs

141
from DeL-TaiseiOzaki/claude-code-orchestra

Update library documentation in .claude/docs/libraries/ with latest information from web search.

update-design

141
from DeL-TaiseiOzaki/claude-code-orchestra

Explicitly update DESIGN.md with decisions from the current conversation. Use when you want to force a design document update.

troubleshoot

141
from DeL-TaiseiOzaki/claude-code-orchestra

Diagnose and plan fixes for errors/bugs with Codex-first multi-agent collaboration (Codex + Opus 4.6 + Agent Teams). Codex CLI is consulted in EVERY phase for deep code reasoning, hypothesis evaluation, and fix validation. Phase 1: Error reproduction & context gathering (Opus subagent 1M context + Codex initial analysis + Claude user interaction). Phase 2: Parallel diagnosis (Agent Teams: Root Cause Analyst [Codex-driven] + Impact Investigator [Opus + Codex risk analysis]). Phase 3: Fix plan synthesis, Codex validation & user approval. Fix implementation is handled separately by /team-implement.

team-review

141
from DeL-TaiseiOzaki/claude-code-orchestra

Parallel code review using Agent Teams. Spawns specialized reviewers (security, quality, test coverage) to review implementation from different perspectives simultaneously. Run after implementation.

team-implement

141
from DeL-TaiseiOzaki/claude-code-orchestra

Parallel implementation using Agent Teams. Spawns teammates per module/layer, each owning separate files to avoid conflicts. Uses shared task list with dependencies for autonomous coordination. Run after /start-feature plan approval.

tdd

141
from DeL-TaiseiOzaki/claude-code-orchestra

Implement features using Test-Driven Development (TDD) with Red-Green-Refactor cycle.

start-feature

141
from DeL-TaiseiOzaki/claude-code-orchestra

Start a new feature with multi-agent collaboration (Opus 4.6 + Agent Teams). Phase 1: Codebase understanding (Opus subagent 1M context + Claude user interaction). Phase 2: Parallel research & design (Agent Teams: Researcher + Architect). Phase 3: Plan synthesis & user approval. Implementation is handled separately by /team-implement.

spike

141
from DeL-TaiseiOzaki/claude-code-orchestra

Time-boxed technical investigation/feasibility study with Codex-first multi-agent collaboration (Codex + Opus 4.6 + Agent Teams). Codex CLI is consulted in EVERY phase for question framing, feasibility analysis, and final evaluation. Phase 1: Frame the investigation question & constraints (Claude user interaction + Codex question decomposition). Phase 2: Parallel investigation (Agent Teams: Researcher [Opus external research] + Feasibility Analyst [Codex deep analysis] + optional prototype). Phase 3: Codex synthesis into go/no-go recommendation & research report. Produces a DECISION DOCUMENT, NOT an implementation plan. Use /add-feature or /start-feature after a GO decision.

research-lib

141
from DeL-TaiseiOzaki/claude-code-orchestra

Research a library and create comprehensive documentation in .claude/docs/libraries/.

plan

141
from DeL-TaiseiOzaki/claude-code-orchestra

Create a detailed implementation plan for a feature or task. Use when user wants to plan before coding.

init

141
from DeL-TaiseiOzaki/claude-code-orchestra

Analyze project structure and populate the "Repository Identity" section of CLAUDE.md (Zone B) plus AGENTS.md.