AgentSkillsCN

Modular Standard Enforcer

模块化标准执行者

SKILL.md

Skill: Modular Folder & Type Specialist

Focus: Naming Conventions, Directory Structure, and Type Modularization.

🎯 Capability Overview

Enforces the strict organizational rules defined by Kürşat. This skill prevents the creation of monolithic files and ensures the project remains scalable and navigable.

🛠 Naming Standards

  • Rule #1 (Kebab-Case): Every file and directory name MUST be kebab-case.
    • Regex: ^[a-z0-9]+(-[a-z0-9]+)*(\.[a-z0-9]+)+$
  • Exception: React Components (inside the file) should use PascalCase, but the filename itself must remain kebab-case.tsx.

📂 Directory Structure Logic

  1. Types: - Never use types.ts or global.d.ts for domain logic.
    • Create a /types/ subdirectory within each module or a global @/types folder divided by domain.
    • Example: @/types/auth/login-request.ts, @/types/game/coordinate-system.ts.
  2. Components:
    • Atomic design is preferred. Shared components go to components/shared/.
    • Each component should have its own folder if it has related sub-components or local types.

🤖 Implementation Instructions for Agents

  • Before File Creation: Check the proposed path against the kebab-case rule. If it fails, auto-correct the name.
  • Type Extraction: If a developer agent writes an interface inside a .tsx file that exceeds 10 lines or is intended for reuse, extract it to a dedicated file in the appropriate types/ folder.
  • Verification: The Validation Agent must run a directory scan using this skill to flag non-compliant paths.

🚫 Forbidden Patterns

  • No utils.ts (Use specific names like date-formatter.ts).
  • No index.ts files that merely export everything from a folder (to avoid circular dependencies and promote explicit imports).