Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

architecture架构

Agent Skill

architecture 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

541

周安装

23

GitHub Stars

1

下载量

190
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:architecture(架构)
来源仓库:https://github.com/alexanderstephenthompson/claude-hub
仓库路径:skills/architecture
安装命令:
npx skills add https://github.com/alexanderstephenthompson/claude-hub --skill architecture
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alexanderstephenthompson/claude-hub --skill architecture

简介

architecture 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果时使用。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装方式:通过 npx skills add 从 GitHub 仓库安装。
  • 当前顶部介绍为空,建议结合原始 README 继续核验具体用法。

SKILL.md

Architecture Skill

Version: 3.0 Source: Architecture Principles + Project Structure Profiles

How to structure a project — both logically (module design, dependency flow) and physically (folder layout, naming, type-specific conventions).

The Problem

AI agents don't remember where they put things last session. Without explicit structure, each session invents its own folder layout, module boundaries, and dependency patterns — leading to scattered files, circular imports, and architectures that only make sense to the session that created them. These standards define one structure so every session builds in the same place.

Consumption

  • Builders: Read ## Builder Checklist before creating files or folders. Follow the project type profile that matches your target.
  • Refactorers: Use ## Enforced Rules to find structural violations. Read narrative sections for migration guidance.
  • Both: Narrative sections are the authoritative standard. Checklist and rules table are compressed views of the same content.

Scope and Boundaries

This skill covers: Module design, dependency flow, folder structure, naming conventions, and project-type-specific layouts.

This skill does NOT cover: Code quality within files (see code-quality), documentation standards (see documentation), or build/deploy configuration.

Relationship to other skills:

  • Works alongside code-quality (file-level conventions) and documentation (docs standards)
  • Consumed by clean-team :audit command (with focus: structure)
  • Referenced by clean-team, implement-team, and diagnose-team agents

North Star

Goal: Small changes stay local.

A typical feature should touch 1-2 modules, ship quickly, and not require coordinated edits across the system. If you find yourself editing 5+ files across multiple layers for a simple change, that's a design smell.


Core Principles

1. Explicit Over Magic

Prefer readable wiring over convention-heavy frameworks. When someone reads your code, the control flow should be obvious. No @AutoInject() decorators that hide what depends on what — use explicit constructor parameters.

2. Boundaries Are Sacred

Modules communicate only through contracts (APIs, props, events). No reaching into another module's internals. Import from the module's public API, never from internal files.

3. Own Your Data

Each module owns its schema/state. Other modules read via APIs or props, never direct access. If OrderModule needs user data, it calls UserModule.getUserById() — it doesn't query the users table directly.

4. Optimize for Refactoring

If code is hard to move or rename, it's a design smell. Loose coupling enables safe refactoring.


The 3 Layers

01-presentation/  →  02-logic/  →  03-data/
LayerResponsibilityExamples
PresentationWhat users see and interact withComponents, pages, styles
LogicHow it's built, business rulesServices, use cases, validation
DataHow it persists, external sourcesRepositories, models, adapters

Valid Dependency Flow

Presentation → Logic → Data ✅
Data → Logic ❌ (blocked)
Logic → Presentation ❌ (blocked)
Presentation → Data ❌ (blocked — no layer skipping)

Module Boundaries

A module is a cohesive unit with a clear public API, hidden implementation, and defined dependencies.

Module Rules

Single Entry Point: Each module exposes its API through an index file. External imports MUST go through it.

No Circular Dependencies: Modules cannot depend on each other in a cycle. Break cycles by extracting shared code, using events, or introducing an interface.

Own Your Data: Each module owns its data exclusively. Cross-module data is accessed via APIs, never direct DB queries.

Coupling Guidelines

Coupling TypeOK?
Type importAlways
Function call via public APIUsually
Direct instantiationCarefully
Shared mutable stateAvoid
Full details: references/module-boundaries.md — Module structure, boundary rules, communication patterns, coupling levels, refactoring guidance

Folder Structure

A well-organized project isn't just tidy — it's a project where you never have to ask "where does this go?" or "where would I find that?" The structure itself answers those questions. When folders mirror how you think about the project, navigation becomes intuitive rather than a search exercise. You find things where you expect them to be, on the first try.

This matters even more when AI is involved. AI has no memory between sessions — it can't learn your project's layout over time the way a human teammate would. Every session starts fresh. A clear, predictable structure means the AI spends less time searching and more time doing useful work. Descriptive folder names, consistent conventions, and logical grouping are context that the AI reads for free on every interaction.

The goal: any file should be findable in 2-3 navigation steps based on intuition alone. If you have to search, the structure failed.

Organize by Feature Within Tiers

For web projects using 3-tier architecture, organize by feature WITHIN each tier — don't scatter a single feature across global models/, services/, controllers/ directories.

Within 02-logic/:
Prefer:                          Avoid:
02-logic/                        02-logic/
  users/                           models/
    user.model.ts                    user.model.ts
    user.service.ts                  order.model.ts
  orders/                          services/
    ...                              user.service.ts
                                     order.service.ts

Feature-based grouping keeps related code together within each tier. Tiers enforce dependency flow (presentation → logic → data), while feature folders enforce cohesion within each tier. These are complementary, not contradictory.

For non-web projects (CLI tools, libraries, scripts) that don't use 3-tier architecture, apply feature-based grouping at the project root level.

Universal Structural Principles

These apply to every project regardless of type.

Naming Consistency — Pick one casing convention per category and apply it everywhere. All components PascalCase, all utilities camelCase, all configs kebab-case. Consistency makes things findable — when you know the convention, you can predict the file name before you look.

Logical Grouping — Related files live together. If you change one, you'll likely change the others. Co-locate by default. Only separate when there's a clear benefit. The test for grouping: "If I'm working on X, what else will I need open?"

Reasonable Depth — No more than 4 levels from root to file. Every level of nesting must earn its place. If a folder contains only one subfolder containing one file — flatten it. Deep nesting isn't organization, it's a scavenger hunt.

Clear Entry Point — Someone opening the project for the first time should know where to start within 10 seconds. Root README explains what the project is. The main entry file is named conventionally (index, main, app). Top-level folders tell the story of what the project *is*.

Clean Root — The project root should contain only what *must* be there — entry points, top-level config, and the folders that define the project's structure. Config files that must live at root (.gitignore, package.json, tsconfig.json) get a pass — stray scripts, utilities, and one-off files do not. When in doubt, move it deeper. The root is the first impression.

Self-Documenting Names — Folder names describe what's inside, not how it's used. formatters/, validators/, parsers/ are clear. utils/, helpers/, misc/ are dumping grounds. If a folder has more than 10 files with no shared theme, split by what the files actually do.


Project Type Profiles

Type-specific folder structures, naming conventions, and red flags. Each profile is a self-contained reference.

Detection Decision Tree

Does the project contain...

  ├─ package.json + .tsx/.jsx/.css/.html files?
  │  └─ YES → Load references/web.md
  │
  ├─ Assets/ + .cs scripts + .unity scene files?
  │  ├─ VRChat SDK present? (Packages/com.vrchat.*, VRCSDK3, UdonSharp)
  │  │  └─ YES → Load references/vrchat.md (overrides Unity)
  │  └─ No VRC SDK
  │     └─ Load references/unity.md
  │
  ├─ .blend files + texture images?
  │  └─ YES → Load references/blender.md
  │
  ├─ .tf files / cdk.json / template.yaml?
  │  └─ YES → Load references/data-iac.md
  │
  └─ None of the above?
     └─ Use Universal Structural Principles above

Priority rule: When multiple profiles match, use the most specific. VRChat overrides Unity. A project with both application code and IaC should use the application profile for the app and reference data-iac for the infrastructure portion.

Available Profiles

ProfileReference FileBest For
Web (React/Node)references/web.mdSPAs, fullstack apps, Node APIs, React projects
Unityreferences/unity.mdUnity games, tools, non-VRChat Unity projects
VRChatreferences/vrchat.mdVRChat worlds and avatars (extends Unity)
Blenderreferences/blender.md3D modeling, texturing, rendering projects
Data/IaC (AWS)references/data-iac.mdTerraform, CDK, CloudFormation infrastructure

How to Use

  1. Detect the project type using the decision tree above
  2. Load the matching profile from references/
  3. Compare the actual structure against the expected layout
  4. Evaluate using the checklist in assets/structure-evaluation-checklist.md
  5. Flag deviations as findings — prioritize red flags highest

Adding a New Profile

  1. Create references/<type>.md following the standard template:

- Why This Structure Matters — problem, benefit, cost of ignoring - Detection — file patterns that identify this project type - Expected Structure — annotated directory tree with principle comments - Naming Conventions — table of type/convention/example - Red Flags — 3-column table: Flag | Root Cause | Fix - When to Reconsider — symptom → problem → action table

  1. Add a row to the Available Profiles table above
  2. Add a branch to the Detection Decision Tree
  3. Add a type-specific section to assets/structure-evaluation-checklist.md

Pattern Selection

PatternUse When
Pure functionsStateless transformations
Module with functionsGrouping related functions
ClassState or DI needed
FactoryComplex object creation
RepositoryData access abstraction

Default to simplicity: Function → Module → Class → Pattern

Full catalog: references/design-patterns.md — Factory, Builder, Adapter, Facade, Decorator, Strategy, Observer, Command, Repository, Result Type

Testing Strategy

TypePurposeScopeVolume
UnitFast, deterministic, domain-heavySingle function/componentHeavy
IntegrationDB, APIs, external servicesModule boundariesModerate
E2ECritical user paths onlyFull stackMinimal

Heavy unit tests, moderate integration, minimal E2E. E2E sprawl leads to brittle, slow test suites. Contract tests recommended for API boundaries.


Anti-Patterns

Code Architecture

Anti-PatternSymptomFix
God Object>500 lines, >10 public exportsExtract cohesive submodules
Anemic Domain ModelGetters/setters only, services do all workMove behavior to entities
Shotgun SurgeryAdding a field requires 5+ file changesBetter encapsulation

Project Structure

Anti-PatternSymptomFix
Cluttered Root15+ files at project root, stray scripts alongside configMove everything that isn't an entry point or required config into folders
God FolderOne folder with 40+ filesGroup by domain, feature, or function
Ghost FoldersEmpty folders with no files and no clear purposeDelete unless part of an intentional pattern
Naming SoupMixed casing: UserProfile.tsx, order-utils.ts, payment_service.pyPick one convention per file type, enforce it
Orphaned FilesFiles that nothing imports or referencesVerify unused, then delete
Deep Nesting5+ folder levels to reach a single fileFlatten — levels should reflect real boundaries
Mirror Treessrc/ and tests/ with identical structuresCo-locate unit tests with source; separate tree only for integration/E2E
Config Explosion10+ config files at rootConsolidate where possible, move to config/

When to Extract

Start with a modular monolith (single deployable, clean internal boundaries).

Extract to separate services only when:

ReasonExample
ScaleOne part needs independent scaling
TeamSeparate teams need independent deploy cycles
TechnologyA component needs a different runtime/language

Don't extract for "cleanliness" — that adds operational complexity without benefit.


Observability Basics

Structured Logging: JSON, not string concatenation. Include context ({userId, timestamp}), not messages ('User ' + userId + ' logged in').

Correlation IDs: Track requests across async operations.

Error Boundaries: Catch and report, don't swallow silently.


Decision Records

For significant architectural choices, document: Context (problem), Decision (what we chose), Alternatives (what else we considered), Consequences (trade-offs).

Location: Documentation/decisions/

Template: assets/decision-record-template.md

Scaling Principles

Project SizeFocus On
SmallNorth Star, Red Flags
GrowingAdd Testing Strategy, Observability
TeamAdd Decision Records, Module Ownership

Red Flags

Stop and reconsider when you see:

SmellProblemFix
shared/common/utils dumping groundOwnership unclear, grows foreverMove to owning module or create focused package
Cross-module direct importsTight couplingUse APIs, events, or props
Direct database access across modulesHidden dependenciesBuild a read API or service
"Quick helper" in wrong moduleBoundary violationMove to correct owner
Framework magic hiding control flowHard to debug, hard to refactorMake it explicit
Feature touching 5+ unrelated filesPoor separationRefactor boundaries

Builder Checklist

Before designing modules or folder structure, verify your plan against these constraints. Builders read this section before writing code; refactorers use the Enforced Rules table and full narrative instead.

Structure

  • 3-tier architecture: 01-presentation/02-logic/03-data/
  • No reverse dependencies (data → logic, logic → presentation)
  • No layer skipping (presentation → data)
  • Max 4 folder levels from root to file
  • Clean root — only entry points and required config at top level

Modules

  • Each module has a single entry point (index file)
  • No circular dependencies between modules
  • Each module owns its data — no cross-module direct DB access
  • Feature-organized within tiers (not global models/, services/ folders)

Design

  • Default to simplicity: function → module → class → pattern
  • Small changes stay local (feature touches 1-2 modules, not 5+)
  • No shared/common/utils dumping grounds
  • Folder names describe what's inside (not helpers/, misc/)

Enforced Rules

These rules are deterministically checked by check.js (clean-team). When updating these standards, update the corresponding check.js rules to match — and vice versa.

Rule IDSeverityWhat It Checks
tier-importserrorImports that violate 01→02→03 dependency direction
tier-structureerrorMissing or incomplete 3-tier folder structure in web projects

References

  • references/module-boundaries.md — Module structure, boundary rules, communication patterns
  • references/design-patterns.md — Factory, Repository, Adapter, Strategy, Observer, etc.
  • references/migration-patterns.md — Strangler Fig, Branch by Abstraction, Parallel Implementations
  • references/web.md — Web (React/Node) project structure profile
  • references/unity.md — Unity project structure profile
  • references/vrchat.md — VRChat project structure profile (extends Unity)
  • references/blender.md — Blender project structure profile
  • references/data-iac.md — Data/IaC (AWS) project structure profile

Assets

  • assets/architecture-checklist.md — Full architecture review checklist
  • assets/structure-evaluation-checklist.md — Project structure evaluation checklist (universal + per-type)
  • assets/decision-record-template.md — ADR template

Scripts

  • scripts/analyze_dependencies.py — Map circular dependencies and detect layer violations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.07%
按下载量换算67

Claude

31.67%
按下载量换算60

Cursor

20.35%
按下载量换算39

Gemini CLI

10.06%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills