Get idiomatic Relay guidance for React code, debugging, and code reviews.
This is an open-source, prompt-only Relay best-practices skill with no indicated need for secrets, networking, code execution, or local data access, so overall risk is low. The main caveat is that the README references local docs or fetching docs from GitHub raw content, but the skill description itself does not show any automatic execution of those actions.
The materials explicitly state that no keys or environment variables are required; there is no request for API tokens, account credentials, or other sensitive authentication data, so credential exposure or abuse risk is low.
The system flags this as prompt-only and lists no remote endpoints. The README only mentions that older docs can be fetched from raw.githubusercontent.com, which appears to be reference guidance rather than evidence that the skill automatically sends user data outward.
As a prompt-only skill, the materials do not show any local process spawning, script execution, dependency installation, or system command invocation; no execution capability beyond text guidance is evident.
No ability is declared to read or write local files, databases, clipboard contents, or other resources. While the README mentions docs under node_modules, that is descriptive guidance and does not itself grant data access capability.
The source points to the open-source facebook/relay repository on GitHub, making the code auditable and closely aligned with the claimed functionality, which is a positive trust signal. Although the provided star/maintenance details are limited and the license is unspecified, there are no red flags such as closed source, unknown origin, or suspicious distribution.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "relay-best-practices" skill from askskill: 1. Download https://raw.githubusercontent.com/facebook/relay/main/skills/relay-best-practices/SKILL.md 2. Save it as ~/.claude/skills/relay-best-practices/SKILL.md 3. Reload skills and tell me it's ready
Please review this React component that uses useFragment and graphql, identify Relay best-practice issues, and provide a revised version with explanations.
A list of issues, a refactored idiomatic version, and explanations of the Relay principles behind each change.
My list does not append data after clicking load more in usePaginationFragment. Analyze this code, explain possible causes, and suggest debugging steps and fixes.
Diagnosis covering connection config, cursors, fragment definitions, and cache behavior, plus actionable fixes.
Explain in simple terms how fragments, queries, mutations, and preloaded queries relate in Relay, and when each should be used in a React project.
A clear conceptual explanation, scenario-based comparison, and warnings about common mistakes and anti-patterns.
Relay is a GraphQL client for React that enforces colocated, composable, and type-safe data fetching. Its core insight is that each component should declare exactly what data it needs via GraphQL fragments, and Relay handles the rest — fetching, caching, consistency, and updates.
This skill provides opinionated guidance on which patterns to prefer. For detailed API documentation, read the relevant page from the doc map below.
Relay ships LLM-friendly docs in node_modules/relay-runtime/llm-docs/
(available after v20.1.1). For older versions, fetch the same files from
https://raw.githubusercontent.com/facebook/relay/main/website/docs/.
Paths below are relative to this directory (<llm-docs>/). Read the relevant
page before writing Relay code. Key docs:
| Topic | Path |
|---|---|
| Core concepts & philosophy | principles-and-architecture/thinking-in-relay.mdx |
| Fragments | guided-tour/rendering/fragments.mdx |
| Queries | guided-tour/rendering/queries.mdx |
| Mutations | guided-tour/updating-data/graphql-mutations.mdx |
| Pagination | guided-tour/list-data/pagination.mdx |
| Refetching | guided-tour/refetching/refetching-queries-with-different-data.mdx |
useFragment | api-reference/hooks/use-fragment.mdx |
usePreloadedQuery | api-reference/hooks/use-preloaded-query.mdx |
useQueryLoader / loadQuery | api-reference/hooks/load-query.mdx |
useMutation | api-reference/hooks/use-mutation.mdx |
usePaginationFragment | api-reference/hooks/use-pagination-fragment.mdx |
@throwOnFieldError | guides/throw-on-field-error-directive.mdx |
@catch directive | guides/catch-directive.mdx |
| Semantic nullability | guides/semantic-nullability.mdx |
| Relay Resolvers | guides/relay-resolvers/introduction.mdx |
| Testing | guides/testing-relay-components.mdx |
| Compiler setup | getting-started/compiler.mdx |
| Compiler configuration | getting-started/compiler-config.mdx |
| Lint rules (ESLint plugin) | getting-started/lint-rules.mdx |
These principles are the foundation of every decision below. When in doubt, refer back to them.
Relay uses an ahead-of-time compiler that reads graphql tagged template
literals in your code and generates runtime artifacts and TypeScript/Flow types.
The compiler looks for its config in these locations (checked in order):
relay.config.{json,js,mjs,ts} in the project root"relay" key in package.jsonSee <llm-docs>/getting-started/compiler-config.mdx for the full config schema.
You can also emit a JSON Schema for the config by running
npx relay-compiler config-json-schema.
Run npx relay-compiler after any change to the contents of a graphql tagged
template literal or the docblock of a Relay Resolver. Some projects add this as
…
Write and run Markdown-driven end-to-end tests for Relay apps.
Run, debug, and update Pysa taint analysis end-to-end integration tests.
Read, write, and debug Pysa JSON taint models and .models output.
Apply the right commit prefix, reviewer, and test plan for code changes.
Debug Pysa false negatives by comparing outputs and locating lost taint flows.
Understand the Pyre/Pysa architecture and locate key implementations quickly.
Write and review React 18/19 components using modern best practices.
Optimize React and Next.js performance during coding, review, and refactoring.
Turn data questions into optimized SQL tailored to your database dialect.