跳到主要内容
知仓学习社ZHICANG

architecture

Modular design, interface stability, dependency management, AI-code health. Triggers: architecture, design, structure, modules, dependencies, coupli…

不碰外部(只输出文字)无严重或高危命中hashgraph-online/awesome-codex-plugins

它会碰到什么

扫了多少6 个文本文件,43 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

<skill id="architecture">

<purpose>

Architecture is about managing change over time.

Good architecture makes easy things easy and hard things possible.

AI-generated code amplifies existing patterns—good or bad.

</purpose>

<prerequisite>

Understand existing codebase structure before proposing changes.

Check for established patterns. Follow them unless explicitly changing.

</prerequisite>

<reference>

Skill-specific: skills/architecture/reference/architecture-research.md

</reference>

<core_principles>

  1. FOLLOW EXISTING PATTERNS: Don't introduce new patterns without justification.
  2. INTERFACE STABILITY: Changing interfaces breaks everything. Stabilize them first.
  3. MODULAR BOUNDARIES: Clear separation. Each module has one reason to change.
  4. DEPENDENCY DIRECTION: Depend on abstractions, not concretions. Core doesn't know about edges.
  5. SMALLEST CHANGE: Prefer minimal changes that achieve the goal.

</core_principles>

<ai_code_health_nexus>

From research: 30%+ defect risk when AI applied to unhealthy code.

AI amplifies existing patterns. If code is messy, AI makes it messier.

Before adding AI to a codebase:

  1. Identify health score (coupling, complexity, test coverage)
  2. Fix critical health issues first
  3. Establish clear interfaces
  4. Then apply AI within those boundaries

</ai_code_health_nexus>

<design_heuristics>

  • If you can't explain it simply, the design is too complex
  • Three concrete examples before abstraction
  • Composition over inheritance
  • Make illegal states unrepresentable
  • Parse, don't validate

</design_heuristics>

<anti_patterns>

  • Premature abstraction (abstract before 3 concrete uses)
  • Leaky abstractions (implementation details bleeding through)
  • Circular dependencies
  • God objects (one class doing everything)
  • Feature envy (methods that use another class more than their own)

</anti_patterns>

<on_complete>

agentdb write-end '{"skill":"architecture","decision":"X","coupling_reduced":true,"adr":"path|none"}'

</on_complete>

</skill>

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

同名技能的其他版本

有 2 个不同仓库或目录里都有叫 architecture 的技能。它们内容并不相同,别混用: