Skip to content

Add relay-best-practices skill#5246

Open
captbaritone wants to merge 3 commits intofacebook:mainfrom
captbaritone:relay-best-practices-skill
Open

Add relay-best-practices skill#5246
captbaritone wants to merge 3 commits intofacebook:mainfrom
captbaritone:relay-best-practices-skill

Conversation

@captbaritone
Copy link
Copy Markdown
Contributor

@captbaritone captbaritone commented Apr 14, 2026

Summary

  • Introduce the relay-best-practices skill, which provides opinionated guidance for writing idiomatic Relay code — covering fragments, queries, mutations, pagination, error handling, anti-patterns, and naming conventions. The skill also points to the LLM-friendly docs shipped in relay-runtime (with a GitHub raw URL fallback for older versions).
  • Add a tip to the quick-start guide for installing the skill via npx skills install facebook/relay

Test plan

  • Verify skill reads well end-to-end
  • Verify quick-start renders correctly with the new tip block
  • Test the GitHub raw URL fallback for docs

@meta-cla meta-cla bot added the CLA Signed label Apr 14, 2026
@captbaritone captbaritone changed the title Improve relay-best-practices skill and add to quick-start Add relay-best-practices skill Apr 14, 2026
Skill improvements:
- Streamline compiler workflow section (merge running/when-to-run)
- Add fallback for llm-docs on older versions (GitHub raw URL)
- Add watch mode warning for non-interactive contexts
- Add JSON Schema config emission command
- Add semantic nullability doc link
- Add fragment key GC warning to anti-patterns
- Fix mutation naming convention (Mutation, not MutationType)
- Fix co-location example to use usePreloadedQuery
- Add unused-fields lint rule callout to co-location section
- Add error boundary caveat to @throwOnFieldError section
- Remove redundant anti-patterns intro paragraph

Quick-start:
- Add tip for installing the Relay best practices skill
@captbaritone captbaritone force-pushed the relay-best-practices-skill branch from e2dc62d to 651d3f1 Compare April 14, 2026 17:24
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Apr 14, 2026

@captbaritone has imported this pull request. If you are a Meta employee, you can view this in D100833369.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant