Skip to content
Skills Library
Programming · Review & audit

component-naming

/component-naming

Enforces consistent React component naming conventions across the portfolio codebase. Use when creating, reviewing, or refactoring components.

Repository
blog ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Enforces consistent React component naming conventions across the portfolio codebase. Use when creating, reviewing, or refactoring components.

Original author description

Enforces consistent React component naming conventions across the portfolio codebase. Use when creating, reviewing, or refactoring components.

How it works

  1. Naming Rules
  2. File Naming Convention
  3. Component Location
  4. Validation Checklist
  5. Examples for Blog Redesign
  6. Related Files
Original SKILL.md headings · 176 lines, 767 words
SKILL.md preview
---
name: component-naming
description: Enforces consistent React component naming conventions across the portfolio codebase. Use when creating, reviewing, or refactoring components.
---

# Component Naming Conventions

Use this guide when creating or modifying React components to ensure consistent naming across the portfolio.

---

## Naming Rules

### 1. PascalCase for Components

All React components use PascalCase:

```typescript
// ✅ Good
export const FeaturedPost = () => {};
export const TagFilter = () => {};

// ❌ Bad
export const featuredPost = () => {};
export const featured_post = () => {};
```

### 2. Domain + Role Pattern

Combine domain context with component role for clarity:

```typescript
// ✅ Good - Clear domain and role
export const FeaturedPost = () => {}; // Featured (domain) + Post (role)
export const TagFilter = () => {}; // Tag (domain) + Filter (role)
export const ReadingProgress = () => {}; // Reading (domain) + Progress (role)
export const MetricCard = () => {}; // Metric (domain) + Card (role)
export const HeroSection = () => {}; // Hero (domain) + Section (role)

// ❌ Bad - Too generic or unclear
export const Card = () => {}; // No domain context
export const Filter = () => {}; // No specificity
export const Section = () => {}; // Meaningless
```

### 3. Compound Components for Subparts

Use dot notation for related subcomponents:

```typescript
// ✅ Good - Compound component pattern
export const PostCard = () => {};
PostCard.Image = () => {};
PostCard.Title = () => {};
PostCard.Meta = () => {};

// Usage
<PostCard>
  <PostCard.Image src={...} />
  <PostCard.Title>...</PostCard.Title>
  <PostCard.Meta date={...} />
</PostCard>

// ❌ Bad - Flat naming for related components
export const PostCardImage = () => {};
export const PostCardTitle = () => {};
export const PostCardMeta = () => {};
```

### 4. Avoid Problematic Suffixes

Never use these suffixes:

```typescript
// ❌ Avoid these suffixes
export const CardContainer = () => {}; // -Container
export const PostWrapper = () => {}; // -Wrapper
export const DataComponent = () => {}; // -Component
export const ListElement = () => {}; // -Element

// ✅ Use clear domain + role instead
export const MetricCard = () => {};
export const PostList = () => {};
export const TagBadge = () => {};
```

### 5. Avoid Layout/Styling Descriptions

Names should describe purpose, not appearance:

```typescript
// ❌ Bad - Describes layout/styling
export const LeftSidebar = () => {};
export const BigHeader = () => {};
export const RedButton = () => {};
export const TwoColumnGrid = () => {};

// ✅ Good - Describes purpose
export const NavigationSidebar = () => {};
export const PageHeader = () => {};
export const DangerButton = () => {};
export const BentoGrid = () => {};
```

---

## File Naming Convention

Files use **kebab-case** matching the component name:

| Component         | File Name              |
| ----------------- | ---------------------- |
| `FeaturedPost`    | `featured-post.tsx`    |
| `TagFilter`       | `tag-filter.tsx`       |
| `ReadingProgress` | `reading-progress.tsx` |
| `MetricCard`      | `metric-card.tsx`      |
| `HeroSection`     | `hero-section.tsx`     |

---

## Component Location

| Location                               | Purpose                              |
| -------------------------------------- | ------------------------------------ |
| `src/components/`                      | Reusable components                  |
| `src/components/auth/`                 | Authentication components            |
| `src/app/components/`                  | App-level shared components          |
| `src/app/(main)/about/components/`     | About page components                |
| `src/app/(main)/blog/components/`      | Blog page components                 |
| `src/app/(main)/dashboard/components/` | Dashboard page components            |
| `src/app/studio/media/components/`     | Studio media components              |
| `src/app/studio/posts/components/`     | Studio posts components              |
| `src/app/studio/series/components/`    | Studio series components             |

---

## Validation Checklist

When reviewing component names:

- [ ] Uses PascalCase
- [ ] Has clear domain context (not just "Card", "List", "Item")
- [ ] Has clear role (Chart, Card, List, Section, Filter, etc.)
- [ ] No -Container, -Wrapper, -Component suffixes
- [ ] No layout/styling descriptions (Left, Big, Red, TwoColumn)
- [ ] File name matches component in kebab-case
- [ ] Related subcomponents use compound pattern

---

## Examples for Blog Redesign

**Good patterns:**

| Component         | Domain   | Role     |
| ----------------- | -------- | -------- |
| `FeaturedPost`    | Featured | Post     |
| `TagFilter`       | Tag      | Filter   |
| `ReadingProgress` | Reading  | Progress |
| `PostGrid`        | Post     | Grid     |
| `AuthorCard`      | Author   | Card     |
| `BentoGrid`       | Bento    | Grid     |
| `HeroSection`     | Hero     | Section  |
| `LatestPosts`     | Latest   | Posts    |
| `SkillsGrid`      | Skills   | Grid     |
| `ContactCta`      | Contact  | Cta      |

**Anti-patterns to avoid:**

- Generic names: `Card`, `Grid`, `List`, `Section`
- Layout names: `LeftPanel`, `MainContent`, `TopSection`
- Suffix pollution: `CardContainer`, `ListWrapper`, `PostComponent`

---

## Related Files

- `.claude/skills/design-language-system/SKILL.md` - Design system guidelines
- `src/components/` - Blog components

Versions

RepositoryScoreLicence
This page · ruchernchong/blog100MIT
motormetrics/motormetrics100MIT

Database snapshot: 13.11.2026 · package version d494f5981376 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100react-component-guidelines
    Guidelines for writing React components. Use this when creating a new react component.
  • 90react-best-practices
    React component conventions for explicit state ownership and data flow. Use when creating or reviewing React components, hooks, effects, or forms.
  • 90react-best-practices
    React component conventions for explicit state ownership and data flow. Use when creating or reviewing React components, hooks, effects, or forms.
  • 100react-conventions
    Standards for writing React code — props, JSX, component structure, effects. Use when writing or reviewing any component or hook, even if conventions aren't mentioned. Targets React 19.
  • 100react-component-generator
    Generate React components with TypeScript, proper props, hooks, and accessibility. Use when creating new React components, UI elements, or refactoring existing components.
  • 100react-patterns
    React + TypeScript component and hook standards. TRIGGER when: creating components, custom hooks, or reviewing React code. SKIP: visual styling and theme tokens (use mui-styling); global store design (use state-management).

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.