ワンクリックで
simplify
// Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.
// Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.
| name | simplify |
| description | Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood. |
Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines — it's code that is easier to read, understand, modify, and debug. Every simplification must pass a simple test: "Would a new team member understand this faster than the original?"
When NOT to use:
Don't change what the code does — only how it expresses it. All inputs, outputs, side effects, error behavior, and edge cases must remain identical. If you're not sure a simplification preserves behavior, don't make it.
Before every change, ask:
Simplification means making code more consistent with the codebase, not imposing external preferences.
Before simplifying:
AGENTS.md / project conventionsSimplification that breaks project consistency is not simplification — it's churn.
Explicit code is better than compact code when the compact version requires a mental pause to parse.
Watch for over-simplification:
Default to simplifying recently modified code. Avoid unrelated drive-by refactors unless explicitly asked.
Before changing or removing anything, understand why it exists.
Answer:
If you can't answer these, read more context first.
Signals:
Make one simplification at a time.
For each simplification:
Separate refactoring from feature work whenever possible.
After simplifying, confirm:
Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use when the user asks to clone dependencies, inspect dependency/source internals, understand SDK/framework behavior from source, debug library implementation details, or make core dependency repos locally readable. Do not use for ordinary API/docs questions where @librarian is enough.
Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping