Simplify and refactor code while preserving behavior, improving clarity, and reducing complexity. Use when simplifying complex code, removing duplication, or applying design patterns. Handles Extract Method, DRY principle, SOLID principles, behavior validation, and refactoring patterns.
87
82%
Does it follow best practices?
Impact
96%
1.11xAverage score across 3 eval scenarios
Passed
No known issues
Quality
Discovery
100%Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.
This is a well-crafted skill description that excels across all dimensions. It uses third person voice correctly, provides specific concrete actions, includes natural trigger terms developers would use, and has an explicit 'Use when...' clause. The description clearly carves out a distinct niche for code refactoring that wouldn't conflict with other coding-related skills.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific concrete actions: 'simplify and refactor code', 'preserving behavior', 'improving clarity', 'reducing complexity', 'removing duplication', 'applying design patterns'. Also names specific techniques: Extract Method, DRY principle, SOLID principles, behavior validation, refactoring patterns. | 3 / 3 |
Completeness | Clearly answers both what ('Simplify and refactor code while preserving behavior, improving clarity, and reducing complexity') and when ('Use when simplifying complex code, removing duplication, or applying design patterns'). Has explicit 'Use when...' clause with clear triggers. | 3 / 3 |
Trigger Term Quality | Includes natural keywords users would say: 'simplify', 'refactor', 'complex code', 'duplication', 'design patterns', 'Extract Method', 'DRY', 'SOLID'. These are terms developers naturally use when seeking refactoring help. | 3 / 3 |
Distinctiveness Conflict Risk | Clear niche focused specifically on code refactoring and simplification. The specific techniques mentioned (Extract Method, DRY, SOLID, refactoring patterns) create distinct triggers that wouldn't overlap with general coding skills or other development tools. | 3 / 3 |
Total | 12 / 12 Passed |
Implementation
64%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
This skill provides excellent actionable code examples demonstrating common refactoring patterns with clear before/after comparisons. However, it suffers from some bloat (multi-agent workflow, placeholder examples, metadata) and lacks integrated validation checkpoints within the main refactoring workflow. The content would benefit from tighter organization and explicit 'validate before proceeding' gates.
Suggestions
Integrate validation steps directly into the main refactoring workflow (e.g., 'Step 1.5: Run tests to confirm behavior preserved before proceeding to Step 2')
Remove or relocate the Multi-Agent Workflow section to a separate advanced document - it adds complexity without clear value for the core skill
Remove placeholder sections (Example 1/2 with 'Add example content here') and the verbose metadata block to improve conciseness
Add explicit feedback loops: 'If tests fail after Step X, revert changes and re-analyze before retrying'
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The skill is moderately efficient but includes some unnecessary sections like 'Multi-Agent Workflow' with external tools (Gemini, Codex) that add bulk without clear value, and the metadata/examples sections at the end are placeholder boilerplate. The core refactoring examples are well-structured but could be tighter. | 2 / 3 |
Actionability | Provides fully executable TypeScript code examples throughout with clear before/after patterns. Each refactoring technique (Extract Method, Remove Duplication, Polymorphism, Parameter Object, SOLID) has concrete, copy-paste ready code that demonstrates the transformation. | 3 / 3 |
Workflow Clarity | Steps are numbered and sequenced, but the workflow lacks explicit validation checkpoints between refactoring steps. The 'Behavior Validation' section mentions running tests but doesn't integrate validation into the main refactoring workflow as mandatory gates. Missing feedback loops for error recovery during the refactoring process itself. | 2 / 3 |
Progressive Disclosure | Content is reasonably organized with clear sections, but it's a monolithic document that could benefit from splitting detailed examples into separate files. References to external resources exist but the skill itself doesn't leverage progressive disclosure with linked sub-documents for advanced patterns. | 2 / 3 |
Total | 9 / 12 Passed |
Validation
90%Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.
Validation — 10 / 11 Passed
Validation for skill structure
| Criteria | Description | Result |
|---|---|---|
metadata_version | 'metadata.version' is missing | Warning |
Total | 10 / 11 Passed | |
c033769
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.