
next-code-simplifier
by Morriz
Base agent setup with distributions for Cluade Code, Codex and Gemini
SKILL.md
name: next-code-simplifier description: Simplify code for clarity, consistency, and maintainability while preserving all functionality. Use after completing a coding task or after passing code review to polish the implementation.
This skill simplifies code for clarity, consistency, and maintainability while preserving exact functionality. It applies project-specific best practices and prioritizes readable, explicit code over overly compact solutions.
Context to Gather
Before simplifying, read:
AGENTS.mdorCLAUDE.md- Project coding standards~/.agents/docs/development/coding-directives.md- Coding standards- Related code to understand existing patterns
Core Responsibilities
1. Preserve Functionality
Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
2. Apply Project Standards
Follow the established coding standards including:
- Proper import sorting and module patterns
- Function declaration conventions
- Explicit return type annotations
- Proper component patterns with explicit types
- Error handling patterns
- Consistent naming conventions
3. Enhance Clarity
Simplify code structure by:
- Reducing unnecessary complexity and nesting
- Eliminating redundant code and abstractions
- Improving readability through clear variable and function names
- Consolidating related logic
- Removing unnecessary comments that describe obvious code
- Avoiding nested ternary operators - prefer switch statements or if/else chains
- Choosing clarity over brevity - explicit code is often better than compact code
4. Maintain Balance
Avoid over-simplification that could:
- Reduce code clarity or maintainability
- Create overly clever solutions that are hard to understand
- Combine too many concerns into single functions or components
- Remove helpful abstractions that improve code organization
- Prioritize "fewer lines" over readability
- Make the code harder to debug or extend
5. Focus Scope
Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.
Refinement Process
- Identify the recently modified code sections
- Analyze for opportunities to improve clarity and consistency
- Apply project-specific best practices and coding standards
- Ensure all functionality remains unchanged
- Verify the refined code is simpler and more maintainable
- Document only significant changes that affect understanding
Output Format
For each simplification:
- Location: File path and line range
- Issue: What makes the current code complex or unclear
- Change: The simplified version
- Rationale: Why this improves clarity/maintainability
Group changes by file. Prioritize high-impact simplifications.
Ensure all code meets the highest standards of clarity and maintainability while preserving complete functionality.
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です