Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Frontend code review guidance from the Dify LLM application development platform repository.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: frontend-code-review3description: "Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules."4---56# Frontend Code Review78## Intent9Use this skill whenever the user asks to review frontend code (especially `.tsx`, `.ts`, or `.js` files). Support two review modes:10111. **Pending-change review** – inspect staged/working-tree files slated for commit and flag checklist violations before submission.122. **File-targeted review** – review the specific file(s) the user names and report the relevant checklist findings.1314Stick to the checklist below for every applicable file and mode.1516## Checklist17See [references/code-quality.md](references/code-quality.md), [references/performance.md](references/performance.md), [references/business-logic.md](references/business-logic.md) for the living checklist split by category—treat it as the canonical set of rules to follow.1819Flag each rule violation with urgency metadata so future reviewers can prioritize fixes.2021## Review Process221. Open the relevant component/module. Gather lines that relate to class names, React Flow hooks, prop memoization, and styling.232. For each rule in the review point, note where the code deviates and capture a representative snippet.243. Compose the review section per the template below. Group violations first by **Urgent** flag, then by category order (Code Quality, Performance, Business Logic).2526## Required output27When invoked, the response must exactly follow one of the two templates:2829### Template A (any findings)30```31# Code review32Found <N> urgent issues need to be fixed:3334## 1 <brief description of bug>35FilePath: <path> line <line>36<relevant code snippet or pointer>373839### Suggested fix40<brief description of suggested fix>4142---43... (repeat for each urgent issue) ...4445Found <M> suggestions for improvement:4647## 1 <brief description of suggestion>48FilePath: <path> line <line>49<relevant code snippet or pointer>505152### Suggested fix53<brief description of suggested fix>5455---5657... (repeat for each suggestion) ...58```5960If there are no urgent issues, omit that section. If there are no suggestions, omit that section.6162If the issue number is more than 10, summarize as "10+ urgent issues" or "10+ suggestions" and just output the first 10 issues.6364Don't compress the blank lines between sections; keep them as-is for readability.6566If you use Template A (i.e., there are issues to fix) and at least one issue requires code changes, append a brief follow-up question after the structured output asking whether the user wants you to apply the suggested fix(es). For example: "Would you like me to use the Suggested fix section to address these issues?"6768### Template B (no issues)69```70## Code review71No issues found.72```7374