feat: add frontend code review skills#30520
Conversation
Summary of ChangesHello @iamjoel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new automated frontend code review skill to enhance code quality and consistency. The skill is capable of reviewing both staged changes and specific files, providing detailed feedback based on a comprehensive set of rules for code quality, performance, and business logic. It aims to streamline the review process by offering structured suggestions and identifying urgent issues, ultimately helping developers adhere to established coding standards. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'frontend-code-review' skill, defining a set of rules and templates for automated code reviews of frontend files. The changes are well-structured, breaking down rules into categories like code quality, performance, and business logic.
My review focuses on improving the consistency and clarity of these new rule definition files. I've suggested a few changes to fix formatting inconsistencies in the templates and rule definitions, improve an example to better align with the rule's description, and remove developer-facing maintenance notes from the rule descriptions themselves. These changes will help ensure the AI skill can parse and apply the rules more reliably.
There was a problem hiding this comment.
Pull request overview
This PR introduces a new frontend code review skill system for Claude, enabling automated review of frontend code changes according to Dify-specific guidelines. The skill provides structured reviews across three categories: code quality, performance, and business logic.
Key Changes:
- Adds a skill definition file that enables two review modes: pending-change review and file-targeted review
- Defines rules for code quality (Tailwind-first styling, conditional class names, className ordering)
- Defines performance rules (React Flow data usage, prop memoization)
- Documents business logic constraints (workflowStore usage in Node components)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.claude/skills/frontend-code-review/SKILL.md | Main skill definition that describes intent, review process, and output templates |
.claude/skills/frontend-code-review/references/code-quality.md | Documents three code quality rules for class name handling and Tailwind usage |
.claude/skills/frontend-code-review/references/performance.md | Documents two performance-related rules for React Flow and memoization |
.claude/skills/frontend-code-review/references/business-logic.md | Documents constraint on workflowStore usage in Node components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lyzno1 left a comment
There was a problem hiding this comment.
We can maintain front-end best practices through a checklist, with the detailed rationale and guidance for each item documented separately under the references/ directory.
The intended workflow is:
reviewers first scan the checklist, and only when a code change touches a specific checklist item do they jump to the corresponding reference document. This makes future rule additions and maintenance much more scalable.
In addition, it’s important to clearly distinguish between three different scenarios:
- Whether the change introduces a regression
- Code style or general quality improvements
- Our project-specific custom rules
For the first two cases, tools like Codex Review and Gemini Code Assist already perform very well. Therefore, our focus should be on making custom rules easier to maintain, evolve, and reason about.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
The skill review Dify-specific rules.
Review changed codes before submit:

Review the target file:

Autofix:

Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods