imports-design-system-folder — Claude Code rule: what it does
imports-design-system-folder is a Claude Code rule that forbids importing UI packages directly into application code. All components must pass through a local design system directory.
AGPL-3.0 ★ 88 updated 2026-11-17
.claude/rules/imports-design-system-folder.mdWhat imports-design-system-folder does
The rule requires UI components to be re-exported from a designated design system folder instead of being pulled straight from packages like react-native. Application screens import strictly from internal paths.
Components start as plain re-exports or thin wrappers where Pick limits exposed props. Later adjustments happen inside that central folder without touching call sites across the codebase.
What it helps with
- block direct external UI library imports across application screens
- isolate UI package dependencies inside a design system directory
- narrow component props down with
Pickutility types - swap UI component packages without altering screen imports
Example prompts for the agent
- Create a button wrapper in the design system folder re-exporting from
@ui/button - Check the profile screen for direct
react-nativeimports and redirect them to@/components
How to install imports-design-system-folder
Manually: put the files in place
.claude/rules/imports-design-system-folder.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/imports-design-system-folder.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/imports-design-system-folder.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/imports-design-system-folder.mdManually: put the files in place
.clinerules/imports-design-system-folder.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about imports-design-system-folder
How to install imports-design-system-folder in Claude Code?
Save the rule content to .claude/rules/imports-design-system-folder.md in your repository root.
What does imports-design-system-folder do?
It instructs the agent to route all component imports through an internal design system directory instead of pulling directly from third-party packages.
Why use Pick on component props?
Narrowing down accepted properties keeps component interfaces minimal, preventing external library details from leaking across the project.