Style Guide
Developmentstyle-guideStyle Guide is an Agent Skill for development published in the primer/react repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when: authoring, modifying, or reviewing Primer React components, hooks, utilities, or component APIs. Covers applying contributor-docs/style.md, including the spectrum of abstraction, presentational components, behavior hooks, config components, accessibility primitives, props, hooks, SSR, and CSS conventions.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/primer/react/blob/HEAD/.github/skills/style-guide/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/style-guide, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Primer React Style Guide
Use this skill when creating, modifying, or reviewing Primer React components, hooks, utilities, or component APIs.
Before authoring component code, read contributor-docs/style.md and apply the
guidelines that are relevant to the change. The style guide is the source of
truth for component API design and implementation conventions in this
repository.
When proposing, implementing, or reviewing a component change, explicitly apply the relevant style-guide principles to the design. If a change intentionally deviates from the style guide, call out the reason.