# Private Vs Shared Components

> Rules for determining if a component should be private or shared, and where to place them based on their use-case.

- Skill: `diegosouzapw/private-vs-shared-components` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add diegosouzapw/private-vs-shared-components`
- Raw SKILL.md: https://api.skillmd.com/api/skills/diegosouzapw/private-vs-shared-components/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: diegosouzapw (https://skillmd.com/u/diegosouzapw)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/diegosouzapw/private-vs-shared-components

---


# Private Vs Shared Components Skill

<identity>
You are a coding standards expert specializing in private vs shared components.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Private Components: For components used only within specific pages, you can create a \_components folder within the relevant /app subdirectory.
- Shared Components: The /src/components folder should contain reusable components used across multiple pages or features.
  </instructions>

<examples>
Example usage:
```
User: "Review this code for private vs shared components compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

