en un clic
deprecations
// Use when: deprecating Primer React components or hooks. Covers source annotations, docs metadata, changesets, docs page updates, and validation for deprecations.
// Use when: deprecating Primer React components or hooks. Covers source annotations, docs metadata, changesets, docs page updates, and validation for deprecations.
| name | deprecations |
| description | Use when: deprecating Primer React components or hooks. Covers source annotations, docs metadata, changesets, docs page updates, and validation for deprecations. |
Use this skill when a task involves marking a public Primer React API as deprecated.
@deprecated annotation to the exported component, hook, prop, or type following existing patterns nearby.*.docs.json file with "status": "deprecated".*.hookDocs.json file with "status": "deprecated".packages/react/script/*-json/.contributor-docs/deprecating-components.md.contributor-docs/versioning.md to choose the correct bump.Prefer targeted validation first, then broader validation if needed:
npx prettier --write <paths>npx eslint --fix <paths>npm run build:hooks.json -w @primer/react
npm run build:components.json -w @primer/react
packages/react/src/**/*.docs.jsonpackages/react/src/**/*.hookDocs.jsonpackages/react/script/components-json/*packages/react/script/hooks-json/*contributor-docs/deprecating-components.md.changeset/*.mdUse when: adding changesets to pull requests, determining semver bump types, versioning packages, or preparing releases. Covers changeset file format, semver guidance, when changesets are required, and the release pipeline.
Use when: building, modifying, or wrapping compound components that use child-component "slots" in Primer React. Covers when to add a `__SLOT__` marker, the `useSlots` hook, the `isSlot` helper, the `asSlot` wrapper helper, naming conventions for slot symbols, and common pitfalls.
Use when: implementing, creating, testing, or debugging feature flags in Primer React. Covers useFeatureFlag hook, FeatureFlags provider, DefaultFeatureFlags, FeatureFlagScope, Storybook integration, and the feature flag lifecycle at GitHub.
Use when: starting, checking, or using the Storybook dev server; looking up Primer React component stories, props, or documentation; previewing component variants; writing or verifying Storybook stories; using the primer-storybook MCP to explore components. Covers starting Storybook, checking if it is running, and using MCP tools (list-all-documentation, get-documentation, get-storybook-story-instructions, preview-stories) to look up components.