CtrlK
BlogDocsLog inGet started
Tessl Logo

component-refactoring

Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.

72

Quality

88%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Quality

Content

77%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

This is a strong, highly actionable skill with excellent workflow clarity and concrete, project-specific guidance. The before/after code examples and Dify codebase references are valuable. The main weakness is that the document is quite long and could benefit from splitting detailed patterns into referenced files, and some sections could be tightened without losing clarity.

Suggestions

Consider extracting the 6 core refactoring patterns into a separate PATTERNS.md file, keeping only a summary table with links in the main SKILL.md to improve progressive disclosure and reduce document length.

Tighten the Dify-Specific Guidelines section by removing structural explanations that mirror the patterns section (e.g., the context provider extraction example overlaps with Pattern 1/2 concepts).

DimensionReasoningScore

Conciseness

The skill is fairly long (~300 lines) and includes some patterns that could be more concise (e.g., the before/after examples are thorough but verbose). However, most content is project-specific conventions and patterns that Claude wouldn't inherently know, so the verbosity is partially justified. Some sections like 'Common Mistakes to Avoid' add value but could be tighter.

2 / 3

Actionability

The skill provides fully executable commands (pnpm refactor-component, pnpm analyze-component), concrete TypeScript code examples with before/after patterns, specific file paths in the Dify codebase, and clear metric thresholds. The guidance is copy-paste ready and specific to the project.

3 / 3

Workflow Clarity

The 5-step workflow is clearly sequenced with explicit validation checkpoints: each extraction step includes lint, type-check, and test verification with a clear pass/fail feedback loop. Step 5 provides concrete verification commands and target metrics. The incremental extraction flowchart is particularly well-structured.

3 / 3

Progressive Disclosure

The content is well-organized with clear sections and headers, but it's a monolithic document that could benefit from splitting detailed patterns into separate files. The 6 core patterns plus Dify-specific guidelines plus workflow steps make this quite long. References to related skills and codebase examples are present but the main content is all inline.

2 / 3

Total

10

/

12

Passed

Description

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 an excellent skill description that clearly defines its scope, triggers, and boundaries. It provides specific numeric thresholds for activation, natural user-facing trigger terms, and explicit exclusion criteria. The description is concise yet comprehensive, making it easy for Claude to distinguish this skill from related ones.

DimensionReasoningScore

Specificity

Lists multiple specific concrete actions: refactoring high-complexity React components, code splitting, hook extraction, complexity reduction. Also specifies concrete thresholds (complexity > 50, lineCount > 300) and specific tooling (pnpm analyze-component).

3 / 3

Completeness

Clearly answers both 'what' (refactor high-complexity React components in Dify frontend) and 'when' (explicit triggers including tool output thresholds, user requests, and tool warnings). Also includes explicit 'avoid when' guidance, which goes beyond the minimum requirements.

3 / 3

Trigger Term Quality

Excellent coverage of natural trigger terms users would say: 'code splitting', 'hook extraction', 'complexity reduction', 'refactor', plus tool-specific triggers like 'pnpm analyze-component'. Also includes negative triggers (avoid clauses) which help prevent false matches.

3 / 3

Distinctiveness Conflict Risk

Highly distinctive with a clear niche: specifically targets Dify frontend React components with high complexity scores. The explicit thresholds, tool references, and avoid clauses make it very unlikely to conflict with general React skills, testing skills, or other refactoring skills.

3 / 3

Total

12

/

12

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation11 / 11 Passed

Validation for skill structure

No warnings or errors.

Repository
langgenius/dify
Reviewed

Table of Contents

Is this your skill?

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.