# sort-components

The sort-components Claude Code skill sorts UI components into folders by feature. It activates when adding a component or reorganizing apps/ui/components/.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1120 repo stars
- Author: rerun-build
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rerun-build/rerun/tree/HEAD/.claude/skills/sort-components/SKILL.md
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/sort-components

## What it does

The skill groups files in `apps/ui/components/` by what they do: chat pieces go in `chat/`, modal windows in `dialogs/`, and reusable primitives in `ui/`. New `.tsx` files belong in a subfolder, not at the directory root. If a component could fit by either its feature or its technical kind, the feature determines its location.

For an existing pile of root-level files, the workflow is to list them, assign destinations, move them with `git mv`, then switch imports to the `@/components/<folder>/<File>` alias. References between components and imports from `apps/ui/app/` also need attention. Run `cd apps/ui && npx tsc --noEmit` to check import resolution; this requires the TypeScript npm package. Linting may still report existing code-quality issues.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill sort-components -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/sort-components/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/sort-components/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill sort-components -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/sort-components/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill sort-components -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/sort-components/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install rerun-build/rerun .claude/skills/sort-components
```

2. **Manually: put the files in place**
- File: `.github/skills/sort-components/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill sort-components -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/rerun-build/rerun --path .claude/skills/sort-components
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/sort-components/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/rerun-build/rerun/tree/HEAD/.claude/skills/sort-components/SKILL.md

## When to use it
- place a new component in its feature folder
- sort component files collected at the directory root
- repair imports after moving components

## Example prompts
- Where should the new agent panel component go in `apps/ui/components/`?
- Sort the files at the root of `apps/ui/components/` and update their imports.

## Similar
- [components-build](https://affpapa.org/en/nevibecode/skills/components-build.md) — skill · ★ 141 repo stars
- [building-components](https://affpapa.org/en/nevibecode/skills/building-components.md) — skill · 15400 installs
- [architecture-compound-components](https://affpapa.org/en/nevibecode/rules/architecture-compound-components.md) — rule · ★ 7191 repo stars
- [animation-components](https://affpapa.org/en/nevibecode/plugins/animation-components.md) — plugin · ★ 1428 repo stars
- [design-system-compound-components](https://affpapa.org/en/nevibecode/rules/design-system-compound-components.md) — rule · ★ 88 repo stars
- [figma-code-connect-components](https://affpapa.org/en/nevibecode/skills/openai-figma-code-connect-components.md) — skill · 3000 installs

From the same set: [rerun-build/rerun](https://affpapa.org/en/nevibecode/by/rerun-build/rerun.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
