file-organization

file-organization is a skill for Claude Code from VersoXBT/claude-initial-setup. It costs 57 tokens per session (1,514 once invoked), scanned A, original, MIT.

Guidance for arranging files and folders in a codebase, with related code grouped by feature or domain. A codebase is the collection of files that make up a software project.

In plain words
What is it for?
Use it when starting projects, deciding where new code belongs, reviewing project structure, or breaking up files that have grown too large.
Why use it?
A clear structure makes large projects easier to navigate, maintain, and split into focused pieces.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-initial-setup plugin — 75 skills, 15 commands, 14 agents, 2 hooks shipped together

Good fit Use it when starting projects, deciding where new code belongs, reviewing project structure, or breaking up files that have grown too large.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/versoxbt/claude-initial-setup/file-organization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add VersoXBT/claude-initial-setup --skill file-organization
Clone the repo
git clone --depth 1 https://github.com/VersoXBT/claude-initial-setup

Made for: Claude Code.

Or install claude-initial-setup, the plugin that ships this one along with the rest of its 75 skills, 15 commands, 14 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for file-organization

README.md
[![agentmods](https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/file-organization.svg)](https://agentmods.dev/skills/versoxbt/claude-initial-setup/file-organization)
Your own site
<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/file-organization"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/file-organization.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01514
Opus 5 $0.00028 $0.00757
Sonnet 5 $0.00011 $0.00303
Haiku 4.5 $0.00006 $0.00151

Measured 7d ago against content hash 647ca7cffcab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

file-organization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/coding-style/file-organization/SKILL.md · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

File Organization

Structure codebases with many small, focused files organized by feature or domain. Target 200-400 lines per file, with 800 as a hard maximum.

When to Use

  • Creating a new project or feature module
  • A file exceeds 400 lines and needs splitting
  • Deciding where to place new code
  • Reviewing project structure for maintainability
  • Setting up barrel exports or index files

Core Patterns

Feature-Based Organization (Preferred)

Group files by feature/domain, not by type. Each feature folder contains everything it needs:

src/
  auth/
    components/
      LoginForm.tsx
      SignupForm.tsx
    hooks/
      useAuth.ts
      useSession.ts
    services/
      auth.service.ts
      token.service.ts
    types.ts
    constants.ts
    index.ts              # barrel export

  users/
    components/
      UserProfile.tsx
      UserList.tsx
    hooks/
      useUser.ts
    services/
      user.service.ts
    types.ts
    index.ts

  shared/                 # Cross-cutting concerns only
    components/
      Button.tsx
      Modal.tsx
    hooks/
      useDebounce.ts
    utils/
      format.ts
      validation.ts

Compare with the type-based approach (avoid this):

# BAD: Type-based organization
src/
  components/             # 50+ files, mixed concerns
    LoginForm.tsx
    UserProfile.tsx
    Button.tsx
    OrderTable.tsx
  hooks/                  # Hard to find related code
    useAuth.ts
    useUser.ts
    useOrders.ts
  services/
    auth.service.ts
    user.service.ts

File Size Guidelines

Lines Action
< 100 Fine, but check if the file is too granular
100-400 Ideal range for most files
400-600 Consider splitting if multiple concerns
600-800 Split into smaller modules
> 800 Must refactor — file is too large

Extract when you see:

  • Multiple classes or major type groups in one file
  • Utility functions unrelated to the file's primary purpose
  • Sections separated by comment banners (// ===== Section =====)
  • More than 5 exported functions from a single file

Read the full file on GitHub · 244 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 244 lines · 57 tokens per session scan A 647ca7cffcab

Subscribe to this mod's changes

file-organization is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 4mo ago), licensed MIT. It adds 57 tokens to every session and 1,514 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

xlsx

Create, read and edit Microsoft Excel .xlsx spreadsheets — data tables, formulas, multiple sheets, number formats, conditional formatting, charts, frozen panes and named ranges. Also covers reading an existing workbook to extract values or formulas, recalculating formulas so cached values are correct, converting to…

smith-network-solutions/threadknot · 84 tokens

pdf

Read, create and manipulate PDF files — extract text and tables, merge, split, rotate, reorder and delete pages, read and fill AcroForm fields, add or strip metadata, encrypt and decrypt, and generate new PDFs from HTML or from scratch. Also covers rasterising pages to images so a PDF can actually be looked at, and…

smith-network-solutions/threadknot · 88 tokens

procedural-generation

Procedural generation patterns — Perlin/Simplex noise, BSP dungeon generation, random walk, loot tables with weighted random, wave function collapse basics, seed-based reproducibility.

XeldarAlz/everything-claude-unity · 39 tokens

dialogue-system

Dialogue tree patterns — ScriptableObject graph, node types (text, choice, condition, event), typewriter effect, localization-ready. Load when implementing NPC conversations.

XeldarAlz/everything-claude-unity · 37 tokens

inventory-system

Inventory, equipment, and crafting patterns — ScriptableObject item definitions, slot-based inventory, equipment system, crafting recipes, UI binding. Load when implementing item management.

XeldarAlz/everything-claude-unity · 36 tokens

state-machine

Generic state machine patterns — IState interface, StateMachine , game state management (menu/gameplay/pause), enemy AI states, hierarchical FSM. Load when implementing state-driven behavior.

XeldarAlz/everything-claude-unity · 40 tokens