file-placement

Evaluates file placement using a reference-distance metric against the repository folder tree.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/missingbulb/GoogleCalendarEventCreator --skill file-placement-missingbulb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: file-placement
Source: https://github.com/missingbulb/GoogleCalendarEventCreator/tree/main/.claudinite/shared/packs/basics/skills/file-placement
Command: npx skills add https://github.com/missingbulb/GoogleCalendarEventCreator --skill file-placement-missingbulb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deciding where a new file should live — or whether an existing file is misplaced — is often arbitrary, leading to folder structures that contradict the actual dependency graph and make refactors risky. ## Core Features & Use Cases - Reference-distance metric: Measures how far a file's imports and links reach across the folder tree, flagging distance-2+ references as placement smells. - Single-consumer rule: Directs files used by exactly one unit to live inside that unit, keeping modules self-contained and safely deletable. - Exemption handling: Recognizes mandated locations (.github/workflows/, manifests), test-location conventions, and plugin-contract imports as legitimate long references. - Use Case: When adding a helper module or reviewing a pull request, apply the metric to decide whether to move the file, lift a shared dependency to a common ancestor, or introduce a boundary entry point. ## Quick Start Ask the AI to review where a specific file should live in the repository using the file-placement reference-distance rules before moving or creating it.

Frequently Asked Questions about file-placement

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide where to put a new file in a repository?▼

Place the file near the files it depends on, measured by folder-tree distance. Same-folder or parent/child references (distance 0-1) are healthy; references reaching sibling or distant folders signal the file belongs elsewhere or the structure needs a new folder.

What is reference distance in code organization?▼

Reference distance counts folder edges on the shortest path between two files in the directory tree. Same folder is distance 0, parent or child is 1, a sibling folder is 2. High average distance means the folder structure contradicts the dependency graph.

Should test files live next to the code they test?▼

Follow the project's existing test-location convention, even if it places tests far from the tested code. When choosing a convention from scratch, mirror the source tree so each test sits at the same relative path as its source file.

When is a long-distance import not a code smell?▼

Long references are exempt when a tool mandates the file's location (like GitHub workflows), when a test convention fixes test placement, or when a plugin framework mandates both the extension path and its shared lib import. These forced references are not placement decisions.

Where should a helper file used by only one module go?▼

A file consumed by exactly one unit belongs inside that unit's folder, even if the reference is already short. Keeping it outside falsely advertises it as shared, invites unintended callers, and leaves orphaned code when the unit is deleted.