large-file-control

Define criteria for inlining or extracting code in large files.

17|2|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/SeemSeam/agent-roles-spec --skill large-file-control
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: large-file-control
Source: https://github.com/SeemSeam/agent-roles-spec/tree/main/roles/coder/skills/large-file-control
Command: npx skills add https://github.com/SeemSeam/agent-roles-spec --skill large-file-control

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps manage large code files to prevent code sprawl, maintain clarity, and prevent mixed responsibility edits, thereby enhancing code quality and maintainability.

Core Features & Use Cases

  • Prevent File Sprawl: Guides on how to keep files from becoming too large.
  • Code Readability: Provides criteria to decide when to inline or extract code into a separate module.
  • Mixed Responsibility: Offers best practices to avoid having a file with multiple responsibilities.
  • Use Case: Use this Skill before implementing a new feature in a large, complex module to decide whether to keep the logic within the module or to extract it into a new, more focused class.

Quick Start

Use the 'large-file-control' skill before adding a new method to your large class 'MainProcessor', evaluate whether to inline the method or extract it into a new class 'UtilityMethods'.

Frequently Asked Questions about large-file-control

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

FAQPage Schema
How do I decide whether to inline code or extract it into a new module?

To decide whether to inline or extract code, evaluate the file size and responsibility boundaries. You should extract code into a new, focused module when the current class becomes too large and mixed responsibilities begin hurting code readability and maintainability.

What causes mixed responsibility in a large code file?

Mixed responsibility occurs when a single large file or complex module handles multiple unrelated tasks. This code sprawl reduces clarity and makes maintenance difficult, requiring you to split the logic into separate, focused classes to restore single-responsility design.

When should I refactor a large class to prevent code sprawl?

You should refactor a large class to prevent code sprawl before implementing a new feature if the module is already complex. Evaluating the file size management criteria helps determine whether to keep new logic inlined or extract it into a separate class.

Does this approach work for managing code size in any complex module?

Yes, this approach works for managing code size in any complex module, class, or method where readability and maintainability are critical. It provides general criteria for preventing file sprawl without depending on specific platforms or frameworks.

What is the best way to maintain code readability when adding new methods?

The best way to maintain code readability when adding new methods is to assess whether the logic fits the existing module's responsibility. If adding the method causes file size bloat or mixed responsibility, extract it into a new, focused class instead of inlining.