File structure optimization
Skill matt-bat/agent-command-center/skills/file-structure-optimization
Use for designing and maintaining repository file structure for clarity, modularity, discoverability, and low-duplication across app and documentation surfaces.From its SKILL.md
npx -y skills add matt-bat/agent-command-center --skill file-structure-optimizationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.2 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
File Structure Optimization
Quick Index (Action-Routed)
Read First (All Actions)
MissionUse This Skill WhenScope BoundaryCore Principles
Action Modules (Read As Needed)
- Structural assessment:
Structure AuditSmell Detection
- Refactoring strategy:
Normalization RulesMigration Safety Rules
- Long-term hygiene:
Ownership and BoundariesAcceptance Checklist
Output
Deliverable FormatAnti-Patterns
Mission
Keep repository layout predictable, modular, and easy to navigate while minimizing duplication and stale artifacts.
Authority and Artifact Policy
- Activating this skill grants no authority to create, move, rename, merge, or delete files or directories.
- Read-only structure work produces an assessment or proposed map only.
- Implement a structural migration only when the task separately authorizes its affected paths and operations.
Use This Skill When
- adding major features introducing new directories/files
- repo navigation or discoverability has become difficult
- duplicate or near-duplicate files are accumulating
- refactors require moving modules, docs, or scripts
- monorepo boundaries are unclear or leaking responsibilities
Scope Boundary
This skill governs filesystem information architecture and structural hygiene.
Use Doc Maintenance and File Maintenance for:
- content-level documentation correctness and lifecycle maintenance
Use Order of Operations for:
- dependency-safe execution order for moves/renames
Core Principles
- organize by stable domain boundaries, not temporary implementation details
- one canonical home per concern
- explicit boundaries between app code, tooling, tests, docs, and generated artifacts
- minimize path depth for high-frequency files
- prevent duplicated truth sources
Structure Audit
Evaluate current structure for:
- discoverability of core app entrypoints
- cohesion of modules inside each directory
- coupling/leakage across domains
- duplicate docs/scripts/config fragments
- dead or orphaned files
Smell Detection
Flag these smells:
- multiple directories claiming same ownership domain
- files named with vague terms (
misc,temp,new2,copy-final) - deeply nested directories with single-child chains
- duplicated docs differing by small stale edits
- generated files mixed with hand-edited source without clear separation
Normalization Rules
- define top-level directory purposes explicitly
- separate source, tests, docs, tooling, and build artifacts
- keep naming conventions consistent across sibling paths
- co-locate files that change together
- centralize shared utilities instead of cloning copies
Migration Safety Rules
- batch moves by domain and keep PR scope legible
- update imports, references, and docs in same change
- preserve history with rename/move-aware operations where possible
- validate commands, tests, and CI paths after moves
- capture temporary compatibility shims only when necessary and time-bound
Ownership and Boundaries
- define directory ownership or steward role for critical areas
- maintain clear public/internal module boundaries
- document canonical paths for runbooks and policy artifacts
- treat structure drift as maintenance debt with explicit remediation
Acceptance Checklist
- each top-level directory has a clear purpose
- duplicate/stale artifacts are removed or consolidated
- references/imports/docs updated to new paths
- structure supports fast onboarding and maintenance
- no orphaned files remain from migration
Deliverable Format
When applying this skill, provide:
- structure audit findings
- proposed/implemented directory map
- files moved/merged/removed summary
- validation results for references and tooling
- residual cleanup backlog
Source Reference
Primary references:
- Apple modular code organization guidance:
- Google engineering consistency/style guidance:
- MIT software construction modularity and abstraction principles:
Anti-Patterns
- organizing primarily by framework internals over domain purpose
- preserving duplicate files "just in case" without ownership
- mixing generated and source artifacts without boundaries
- moving files without synchronized reference/doc updates
- deep nesting that hides high-traffic files
Related Skills
- Order of Operations: sequence structural changes safely.
- Regression Prevention: validate no behavior regressions during structural refactors.
- Doc Maintenance: keep structural docs aligned with moves.
- File Maintenance: sustain structure quality through ongoing audits.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.