simplify
Simplify and refactor code while preserving functionality and library constraints.
pinned to #d5a3918updated 2 weeks ago
Ask your AI client: “install skills/simplify”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/simplifymetahub onboarded this repo on the author's behalf.
If you own github.com/DeL-TaiseiOzaki/claude-code-orchestra on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
184
Last commit
2 weeks ago
Latest release
published
About this skill
Pulled from SKILL.md at publish time.
Simplify and refactor $ARGUMENTS.
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.d5a3918· 2 weeks ago
Documentation
32Description qualitywarn
10 words · 82 chars — skills use the description as their trigger; aim higher
Aim for 15+ words and include trigger phrases like “use this skill when …”.
README is present and substantial
18,894 chars · 9 sections · 21 code blocks
Tags / topics declaredwarn
No manifest tags and no GitHub repo topics
Add tags to the manifest (or GitHub topics on the repo) so the registry's search and category filters surface this artifact.
README has usage / example sections
found: Quick Start
Homepage / docs URL declared
no homepage declared (registry will use the repo URL) — info-only, not blocking
Release history
1- releasecurrentd5a3918warn2 weeks ago
Contents
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
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:
# 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)
5. 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
Reviews
No reviews yet. Be the first.
Related
Verification Before Completion
Evidence before assertions, always
Writing Plans
Turn specs into phased implementation plans
Test-Driven Development
Red → green → refactor discipline for any feature or bugfix
mh install skills/simplify