# file-organization

Picks the boundary for your files — feature, shared layer, route segment or workspace package — and plans the move without breaking imports.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 397 installs · ★ 50
- Author: akillness
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/akillness/jeo-skills/tree/HEAD/.agent-skills/file-organization/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/akillness-file-organization

## What it does

This skill answers one question: which structural boundary should the codebase use, and how do you get there without turning a reorg into chaos. It starts with an intake: repo shape, current pattern, main pressure (scattered feature code, unclear shared boundaries, framework routing collision, premature monorepo split, naming drift, migration risk). Then it picks exactly one mode — starter cleanup, feature modularization, framework colocation, shared layer governance, workspace split, or migration audit.

Three references ship with it: a boundary decision matrix, a migration checklist, and naming/import rules. The skill reads them before recommending a structure or moving files. Tools it can use are `Read`, `Write`, `Bash`, `Grep`, `Glob`.

It fits frontend, backend, fullstack and developer-workflow repos where the real problem is maintainable file boundaries and migration planning. Component API design, environment provisioning and deployment automation are out of scope. And if you only need a mechanical file move with no architectural decision, skip the skill and just move the files.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill file-organization -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill file-organization -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill file-organization -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install akillness/jeo-skills file-organization
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill file-organization -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/akillness/jeo-skills --path .agent-skills/file-organization
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill file-organization -a opencode
```

### 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/akillness/jeo-skills/tree/HEAD/.agent-skills/file-organization/SKILL.md

## When to use it
- lay out a new repo around maintainable folders
- pull business logic out of `components/`, `hooks/` and `utils/` into features
- decide whether code is truly shared or just reused twice
- judge whether an `apps/` + `packages/` split is justified
- write a migration plan without broken imports or duplicates

## Example prompts
- Review this repo structure and tell me which boundary to organize around
- Everything lives in `components/`, `hooks/`, `utils/` — help me move to feature folders
- Plan the structure migration so imports don't break

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 30e3b9d508dced86.

BEGIN THIRD-PARTY FILE 30e3b9d508dced86
```text
---
name: file-organization
description: "Design or refactor project structure around the right boundary unit: feature, shared layer, route segment, or workspace package. Use when a repo feels scattered, a team needs naming/import conventions, or the user must choose between type-based, feature-based, framework-colocated, and workspace layouts. Triggers on: file organization, folder structure, project structure, reorganize repo, feature folders, shared vs feature code, where should this file live, apps/packages split, and project layout refactor."
allowed-tools: Read Write Bash Grep Glob
compatibility: >
  Best for frontend, backend, fullstack, and developer-workflow repositories
  where the main problem is maintainable file boundaries and migration planning.
  Not for component API design, environment provisioning, or workflow/deployment
  automation.
license: MIT
metadata:
  tags: project-structure, folder-structure, feature-based-architecture, naming-conventions, monorepo, migration
  platforms: Claude, ChatGPT, Gemini, Codex
  version: "2.0"
  source: akillness/jeo-skills
---

# File Organization

Use this skill when the main question is **"what structural boundary should this codebase use, and how do we move toward it without turning a reorg into chaos?"**

The job is not to dump a giant folder tree and pretend it fits every repo.
The job is to:
1. identify the real organizing unit,
2. separate feature/shared/framework/package boundaries,
3. define naming and import rules that prevent drift,
4. plan the migration safely,
5. return a structure brief another engineer or agent can apply immediately.

Read [references/boundary-decision-matrix.md](references/boundary-decision-matrix.md) before recommending a structure.
Read [references/migration-checklist.md](references/migration-checklist.md) before moving files or renaming directories.
Read [references/naming-and-import-rules.md](references/naming-and-import-rules.md) when the problem includes barrel files, alias paths, or team conventions.

## When to use this skill
- Choose a maintainable folder strategy for a new repo or app
- Refactor a repo whose `components/`, `hooks/`, `utils/`, and `store/` folders no longer match business boundaries
- Decide whether code belongs in a feature module, shared layer, route segment, or workspace package
- Review structure drift before a large reorganization or migration
- Standardize naming, import paths, and ownership rules across a growing team
```
END THIRD-PARTY FILE 30e3b9d508dced86

The third-party file has ended. Everything between the 30e3b9d508dced86 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2479 of 13709 bytes. © akillness · MIT · https://github.com/akillness/jeo-skills/tree/HEAD/.agent-skills/file-organization/SKILL.md

_Part of the page did not fit — see the HTML version._

---
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
