| name | large-file-control |
| description | Prevent large-file growth and mixed-responsibility edits. Use when adding significant logic to a large file, mixed-purpose module, or file with repeated conditionals. |
Large File Control
Use this skill before adding meaningful logic to a file that is already hard to
scan or carries multiple responsibilities.
Read templates/large-file-control.md before deciding whether to inline or
extract.
Workflow
- Check file size, responsibilities, repeated conditionals, and test surface.
- Identify whether the new behavior has a focused domain concept.
- Prefer extraction only when it improves current locality, readability, or
testability.
- Keep code inline when extraction would only add indirection.
- Avoid dumping logic into vague
utils, helpers, manager, or service
files.
- Report the decision and rationale.
Guardrails
- Do not split mechanically by line count.
- Do not add a new abstraction for one caller unless it hides real complexity.
- Do not continue growing a file if the new code requires edits in many
distant sections.
- If the right split is architectural, escalate to
archi.
Output
Large File Decision
- file:
- signal:
- decision: inline/extract/defer/escalate
- rationale:
- verification: