Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

file-organization

БесплатноБез исполняемых скриптовНе проверен

Design or refactor project structure around the right boundary unit: feature, shared layer, route segment, or workspace package. Use when a repo feels…

akillnessот akillness★ 63 звезды на GitHub

Об этом скилле

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 before recommending a structure. Read references/migration-checklist.md before moving files or renaming directories. Read 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
  • Decide whether a monorepo/workspace split is justified or premature
  • Produce a migration plan that minimizes broken imports, duplicate files, and half-finished moves

When not to use this skill

  • The main task is designing reusable component APIs, variants, or slot/primitive composition → use design-system or design-system
  • The main task is framework state ownership, cache/store boundaries, or URL/form/server-state placement → use state-management
  • The main task is making the repo runnable across machines, services, toolchains, or containers → use system-environment-setup
  • The main task is task runners, bootstrap scripts, hooks, or local-CI command design → use deployment-automation
  • The main task is deployment topology or hosted CI/CD rollout → use deployment-automation or vercel-deploy
  • The repo only needs a tiny mechanical file move with no architectural decision; in that case implement the move directly instead of reopening structure design

Instructions

Step 1: Classify the structural pressure before drawing folders

Normalize the request into this intake first:

structure_intake:
  repo_shape: single-app | app-plus-api | monorepo | library-cli | content-site | unknown
  current_pattern: type-based | feature-based | route-colocated | package-workspace | mixed | unknown
  main_pressure:
    - scattered-feature-code
    - unclear-shared-boundaries
    - framework-routing-collision
    - premature-monorepo-split
    - monorepo-needed-now
    - naming-drift
    - import-chaos
    - migration-risk
    - onboarding-confusion
    - unknown
  change_scope: greenfield | incremental-refactor | major-reorg | audit-only
  primary_boundary_unit: feature | shared-layer | route-segment | package | unknown
  confidence: high | medium | low

If the user is vague, prefer the smallest obvious interpretation and state the assumption.

Step 2: Choose one primary organization mode

Pick exactly one primary mode for the current run:

  1. starter cleanup
    • Use when a type-based starter tree is still small enough to fix before it calcifies.
  2. feature modularization
    • Use when business areas are spread across technical folders and need feature ownership.
  3. framework colocation
    • Use when Next.js / similar router conventions should guide route-segment placement.
  4. shared layer governance
    • Use when the repo already has features, but shared code keeps leaking everywhere.
  5. workspace split
    • Use when multiple runnable apps/services/packages justify apps/ + packages/ boundaries.
  6. migration audit
    • Use when the repo needs a safe move plan more than a brand-new structure proposal.

Step 3: Choose the smallest boundary unit that solves the problem

Use these rules:

  • Prefer feature folders when the same business area touches components, hooks, data access, tests, and state together.
  • Prefer shared layers only for code reused by multiple features with stable ownership.
  • Prefer framework colocation when routing/layout/file-convention semantics are part of the architecture, not just file storage.
  • Prefer workspace packages only when there are multiple deployable apps/services, reusable libraries, or independent dependency/runtime needs.
  • Do not promote a package split just because the repo feels messy; many repos need better feature/shared rules, not a monorepo.
  • Keep generated artifacts, docs, scripts, and tests explicit instead of burying them in ambiguous utility folders.

Step 4: Apply the decision ladder

Use feature modu

Полный SKILL.md на GitHub

Установить file-organization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Bash
Grep
Glob

Вложенные файлы

SKILL.toonevals/evals.jsonreferences/boundary-decision-matrix.mdreferences/migration-checklist.mdreferences/migration-playbook.mdreferences/naming-and-import-rules.mdreferences/repo-shape-decision-guide.mdreferences/repo-type-patterns.md

FAQ

Что делает скилл file-organization?

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.

Как установить скилл file-organization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл file-organization запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить file-organization с