elegant-architecture
仓库创建 2025年12月9日最近提交 10 天前SkillHot 收录 21 天前
▸ 精选理由
强调小文件与单一职责,有利于长期可维护性的团队编码规范化。
这个 Skill 做什么
以严格的 200 行文件限制与模块化原则指导代码结构与重构策略。
帮你把代码拆成清晰、可维护的小模块,严格控制每个文件不超过200行,超过就拆成文件夹或子模块。适合开始新功能、改造大文件或做模块化规划时用,先做设计再写实现。强调单一职责和真实测试(不要只用 mocks),代码更易读、可测、可演进。
▸ 展开 SKILL.md 英文原文
Guides clean architecture design with strict 200-line file limits. Use when starting new features, refactoring large files, or planning module structure. Enforces modular design and real testing.
240
Stars
23
Forks
40
仓库内 Skill
+8
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/majiayu000/spellbook/main/skills/elegant-architecture/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/majiayu000/spellbook/main/skills/elegant-architecture/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Elegant Architecture ## Core Principles - **200-line limit** — No file exceeds 200 lines of code - **Split when exceeded** — Convert to folder or multiple files - **Plan first, code later** — Design architecture before implementation - **Single responsibility** — Each module does one thing well - **Real tests only** — No mocks, test actual behavior ## Execution Flow ### 1. Analyze Requirements ```markdown Before writing any code: - List all features/functionalities needed - Estimate code volume for each module - Identify shared components - Map dependencies between modules ``` ### 2. Design File Structure ```markdown When estimated lines > 200: - Convert file to folder with index -
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有