feat(react,react-native): add React and React Native plugins to marketplace#140
feat(react,react-native): add React and React Native plugins to marketplace#140
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tplace Add two new plugins sourced from Vercel Engineering best practices: - react: Next.js best practices, view transitions, and composition patterns - react-native: Expo best practices for performant mobile apps Update marketplace.json, README, and release-please-config accordingly.
b68de68 to
4fdc97a
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces two new plugins: react and react-native, each containing a set of best practice rules for their respective ecosystems. The react plugin includes composition patterns and performance guidelines, while the react-native plugin focuses on rendering and list performance. My review identified a logical error in a callback hoisting example, missing code snippets in a styling rule, a minor formatting issue in a rule file, and missing author metadata in the plugin configuration files. Please note that I have filtered out comments that were not actionable or were directed at vendor-synced files.
There was a problem hiding this comment.
7 issues found across 139 files
Confidence score: 4/5
- Safe to merge overall; issues are documentation/example correctness rather than runtime code, with severities topping out at 5/10.
- Most notable: the list-performance callbacks example in
plugins/react-native/.agents/skills/vercel-react-native-skills/rules/list-performance-callbacks.mdreferencesitem.idout of scope, which could mislead readers if copied. - Several other snippets are inconsistent or invalid (prop name mismatch, undefined variables, incorrect Reanimated API usage), which affects guidance quality but not product behavior.
- Pay close attention to
plugins/react-native/.agents/skills/vercel-react-native-skills/rules/list-performance-callbacks.md,plugins/react-native/.agents/skills/vercel-react-native-skills/rules/react-state-fallback.md,plugins/react-native/.agents/skills/vercel-react-native-skills/rules/scroll-position-no-state.md,plugins/react-native/.agents/skills/vercel-react-native-skills/rules/animation-gpu-properties.md,plugins/react/.agents/skills/vercel-composition-patterns/rules/state-decouple-implementation.md,plugins/react-native/.agents/skills/vercel-react-native-skills/rules/react-state-dispatcher.md,plugins/react/.agents/skills/vercel-react-best-practices/README.md- fix example correctness and markdown formatting.
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/react-state-fallback.md">
<violation number="1" location="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/react-state-fallback.md:21">
P2: The example uses `defaultEnabled`, but the prop is named `fallbackEnabled`. This makes the snippet invalid and misleading. Use the prop name consistently.</violation>
</file>
<file name="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/animation-gpu-properties.md">
<violation number="1" location="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/animation-gpu-properties.md:17">
P3: The example uses `children` without destructuring it from props, which would throw a ReferenceError if copied. Include `children` in the props destructuring/type.</violation>
</file>
<file name="plugins/react/.agents/skills/vercel-composition-patterns/rules/state-decouple-implementation.md">
<violation number="1" location="plugins/react/.agents/skills/vercel-composition-patterns/rules/state-decouple-implementation.md:26">
P3: The example calls `sync.updateInput` even though `sync` is not defined. Use the destructured `updateInput` instead so the snippet is valid.</violation>
</file>
<file name="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/list-performance-callbacks.md">
<violation number="1" location="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/list-performance-callbacks.md:33">
P2: The “Correct” example references `item.id` outside of `renderItem`, so it’s out of scope and not a valid pattern. Use a root callback that accepts the id parameter instead.</violation>
</file>
<file name="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/scroll-position-no-state.md">
<violation number="1" location="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/scroll-position-no-state.md:48">
P2: This example uses `.value` on a Reanimated shared value, which conflicts with the repo’s own guidance to use `.get()`/`.set()` for React Compiler compatibility. Update the snippet to use `.set()` instead.</violation>
</file>
<file name="plugins/react/.agents/skills/vercel-react-best-practices/README.md">
<violation number="1" location="plugins/react/.agents/skills/vercel-react-best-practices/README.md:58">
P3: The `Rule File Structure` example starts a ```markdown fence but never closes it, and the inner ```typescript fences break the outer block. The template will render incorrectly. Use a longer fence (e.g., ````markdown … ````) or close the outer block after the example.</violation>
</file>
<file name="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/react-state-dispatcher.md">
<violation number="1" location="plugins/react-native/.agents/skills/vercel-react-native-skills/rules/react-state-dispatcher.md:18">
P3: The primitive-state example declares `size` as `Size | undefined` but assigns a numeric `width`, making the example type-inconsistent. Update the primitive example state type (and/or name) to match the numeric width in both the incorrect and correct blocks.</violation>
</file>
Architecture diagram
sequenceDiagram
participant User as User / Developer
participant CLI as PleaseAI CLI
participant Registry as marketplace.json
participant FS as Local Filesystem / Plugin Dir
participant Agent as Claude / AI Agent
Note over User, Agent: Plugin Discovery & Installation
User->>CLI: /plugin install react@pleaseai
CLI->>Registry: Lookup plugin name
Registry-->>CLI: NEW: Return metadata & source (./plugins/react)
CLI->>FS: Download/Link plugin & Skill files
FS-->>CLI: assets (SKILL.md, AGENTS.md)
Note over User, Agent: Runtime Flow (Code Generation)
User->>CLI: "Create a React Native list"
CLI->>FS: Load active plugin skills
FS-->>CLI: NEW: vercel-react-native-skills (AGENTS.md)
CLI->>Agent: Send Request + System Prompt Extensions
Note over Agent: Contextual Reasoning
Agent->>Agent: NEW: Consult Vercel Best Practices
alt React Native Flow
Agent->>Agent: Apply: list-performance-virtualize (LegendList/FlashList)
Agent->>Agent: Apply: rendering-no-falsy-and
else React/Next.js Flow
Agent->>Agent: Apply: architecture-compound-components
Agent->>Agent: Apply: async-parallel (Promise.all)
end
Agent-->>CLI: Return Optimized Code (with best practices)
CLI-->>User: Display code & installation logs
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Summary
reactplugin with Vercel Engineering best practices for React/Next.js, including view transitions and composition patternsreact-nativeplugin with Vercel best practices for React Native and Expo mobile developmentmarketplace.json,README.md, andrelease-please-config.jsonto register both pluginsTest plan
reactplugin appears in the marketplace listingreact-nativeplugin appears in the marketplace listingreactplugin:/plugin install react@pleaseaireact-nativeplugin:/plugin install react-native@pleaseaiSummary by cubic
Adds
reactandreact-nativeplugins to the marketplace with Vercel Engineering best practices for React/Next.js and React Native/Expo. Updates marketplace listing and docs so teams can install and use these skills immediately.reactandreact-nativein.claude-plugin/marketplace.jsonand added install docs inREADME.md.reactplugin: shipsvercel-react-best-practicesandvercel-composition-patterns(React/Next.js performance, view transitions, composition patterns, React 19 guidance). Source:./plugins/react.react-nativeplugin: shipsvercel-react-native-skills(rendering, list performance, animations, navigation, images, styling). Source:./plugins/react-native. Includes plugin metadata and skills lock (plugins/react-native/.claude-plugin/plugin.json,plugins/react-native/skills-lock.json).Written for commit 4fdc97a. Summary will update on new commits.