All skills
langgenius avatar

/frontend-code-review

@dde1d50
by langgeniuslanggenius/dify158k stars
24,861

Use only when the user explicitly requests a review or audit of frontend code under `web/` or `packages/dify-ui/`. Supports pending-change, file-focused, and pasted-diff reviews. Do not use for implementation-only requests, diagnosis without review intent, or backend-only code.

Use this Skill: https://skilld.dev/gh/langgenius/dify/frontend-code-review

This session only. Nothing lands on disk.

referencescomponent-architecture.md

≈691 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Component Architecture Review

Use the canonical reference for the changed concern. These links share rules; they do not activate the implementation skill or its workflow.

Concern Canonical rules
Vertical modules, public entrypoints, data/handler placement, wrappers, Props, and types Ownership
Local/Jotai state, form drafts, route identity, URL state, and persistence State
Effects, navigation, memoization, and subscriptions Runtime
Hotkeys, focus, and secondary surfaces Interactions

Apply Rules In Their Actual Scope

Explicit team conventions are reviewable contracts, including module organization and public API boundaries. Check the documented exception before reporting a violation. Do not infer an exception solely because the code appears to work, or invent a user-facing failure for a convention finding.

  • For owner placement, trace the consumers and required lifetime. Establish whether the parent coordinates a snapshot, submission, navigation, shared UI, or persistence before asking to move state or handlers.
  • For component boundaries, identify the ownership or encapsulation the proposed extraction would improve; file length alone establishes neither.
  • For props and types, check the domain contract and public API. Do not report private props typing style alone; declaration/export syntax matters only for a documented package rule or concrete type, export, or framework defect.
  • For state and Effects, trace the source of truth, external synchronization target, and mount/reset boundary. Controlledness alone does not prove that a draft is lifted or persisted; follow the form and overlay contracts linked by State.
  • For navigation, distinguish ordinary links from mutation success, guarded redirects, command flows, and submission side effects.

Preserve Existing Product Contracts

During refactors, trace the interaction being moved through its real consumer. Navigation, sidebar, dropdown, webapp-list, and app-switching changes must preserve expansion controls, hover persistence, pin/delete actions, routing, keyboard/focus handling, and open-state ownership where present.

Check that the changed owner still handles reachable empty, loading, and missing optional-data states, and that primitive wrappers preserve accessible semantics and the public controlled-state contract. Report the actual lost behavior or explicit rule violation; use the package testing policy when assessing regression coverage.

Source: SKILL.md on GitHub

2 warnings9d5 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides a structured framework for conducting frontend code reviews, specifically focusing on accessibility, component architecture, data query contracts, and performance. It references official guidelines from a well-known organization (Vercel) and shows no signs of malicious intent, credential exfiltration, or unauthorized command execution.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    4 files scanned · No issues

  • ZeroLeaks5mo

    1 finding · Score: 69/100

Signed by skilld at dde1d50. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated 4 weeks ago

README badge

README badge for langgenius/dify/frontend-code-review

Reviews Dify frontend code in `web/` and `packages/dify-ui/` for correctness, accessibility, component design, dify-ui primitive usage, data/query contracts, performance, and tests. Targets React, Next.js, and TypeScript frontend files, with support for pending-change, file-focused, and diff-based reviews against local contracts and Web Interface Guidelines.

Generated from the current SKILL.md.

What code does this skill review?
Frontend code under `web/`, `packages/dify-ui/`, and frontend-adjacent TypeScript files. It does not review backend code under `api/` — use `backend-code-review` for that.
What review modes does this skill support?
Pending-change review (staged and working-tree diffs), file-focused review (explicitly named files or paths), and diff/snippet review (pasted diffs with best-effort references).
Does this skill check accessibility?
Yes. It applies accessibility rules from Web Interface Guidelines, Dify UI primitives, and MDN, covering semantic HTML, focus, keyboard navigation, disabled states, and long-content behavior.
Will this skill review my tests?
Yes, it includes frontend test review rules. For deeper testing guidance or test implementation, see the `frontend-testing` skill.
Does this skill require local context?
Yes. It reads local contracts like `web/AGENTS.md`, `packages/dify-ui/AGENTS.md`, overlay docs, and component guidelines before finalizing findings. It also fetches the latest Web Interface Guidelines from Vercel Labs.

Generated from the current SKILL.md. These answers refresh after source changes.