Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计通过

architecture-design-critique建筑设计评论

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

225

周安装

9

GitHub Stars

公开资料未说明

下载量

73
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/baggiponte/skills --skill architecture-design-critique

简介

用于评估代码库是否有效分离核心业务逻辑与基础设施。

  • 提供三层分析框架:理解现状、识别问题和建议改进。
  • 适用于架构健康度检查和可维护性提升场景。architecture-design-critique 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装需指定 GitHub 仓库,使用时结合具体代码结构。
  • 涉及生产系统时应先进行只读分析和脱敏处理。

SKILL.md

Architecture Design Critique

Assess how well a codebase separates core domain logic from infrastructure concerns. Three phases with distinct mindsets to prevent jumping to recommendations without understanding what exists.

Key questions answered: Can you swap your database without rewriting business logic? Can you test domain rules without spinning up external services? Will the architecture support 10x growth?

Ports & Adapters in 30 Seconds

The core idea: your domain logic (business rules, core algorithms) should never directly depend on infrastructure (databases, HTTP, file systems, external APIs). Instead:

  • Ports: Interfaces that define what the domain needs (e.g., UserRepository, PaymentGateway)
  • Adapters: Implementations that connect ports to real infrastructure (e.g., PostgresUserRepository, StripePaymentGateway)

Dependencies point inward: adapters depend on ports, never the reverse. This makes the core testable, portable, and resistant to infrastructure churn.

Output Structure

Before starting, ask the user for an output directory (e.g., ./docs/architecture/ or ./reviews/).

Create a subfolder with a meaningful name based on the project or focus area:

{output-directory}/
└── {project-name}-architecture-review/
    ├── 01-inventory.md      # Phase 1: Architectural Inventory
    ├── 02-assessment.md     # Phase 2: Architectural Assessment
    └── 03-roadmap.md        # Phase 3: Improvement Roadmap

Naming the subfolder: Use the project name or a descriptive label, e.g.:

  • acme-api-architecture-review/
  • payments-service-review/
  • monolith-decomposition-analysis/

Write each document as you complete its phase. This creates a persistent record the team can reference, share, and update over time.


Phase 1: Research

Use the /codebase-librarian skill to create a comprehensive inventory of the codebase.

The librarian skill will systematically catalog:

  • Project foundation (language, tooling, dependencies)
  • Entry points (HTTP, CLI, workers, consumers)
  • Services and module boundaries
  • Infrastructure (databases, caches, queues, external APIs)
  • Domain model (entities, relationships)
  • Data flows (end-to-end request traces)
  • Existing patterns and conventions

Output: Save the inventory to 01-inventory.md in the review folder.

The goal is to know exactly what exists before any critique begins. No opinions—just facts.


Phase 2: Critique

Persona: Senior Platform Engineer with Strong Design Taste

*Mindset: Big-picture thinker who cares deeply about sustainable architecture. You've seen codebases thrive and rot. You focus on structural integrity, not cosmetic issues. Style guide violations and naming conventions are beneath your concern—you're looking at whether this architecture will support the next 5 years of growth.*

Focus Areas

AreaWhat to Look For
Boundary violationsDomain logic importing infrastructure (e.g., Order.save() calling SQL directly)
CouplingCan components be tested/replaced independently?
Dependency directionDo dependencies point inward toward the domain, or outward toward infrastructure?
Infrastructure portabilityCould you swap databases/frameworks without touching core logic?
Pattern coherenceIs the architecture consistent, or a patchwork of different approaches?
Scaling bottlenecksWhat breaks when load, team size, or feature count grows?

What to Ignore

Don't waste time on:

  • Code style and formatting
  • Naming conventions
  • Minor duplication
  • Individual function implementations
  • Test coverage numbers

These matter, but they're not architectural. Stay at the structural level.

Critique Process

1. For each domain concept, check: does it know about its persistence mechanism?
2. For each external dependency, check: is it accessed through an abstraction?
3. Trace a feature addition: how many layers need to change?
4. Imagine swapping the database: what files would you touch?
5. Check test files: can domain logic be tested without mocking infrastructure?

Output Format

Write findings to 02-assessment.md using this structure:

# Architectural Assessment: [Project Name]

## Executive Summary
[2-3 paragraph narrative covering:]
- Overall health assessment (strong / mixed / needs attention)
- Key strengths worth preserving
- Primary concerns and their business/technical impact
- Thesis statement: "This codebase does X well, but struggles with Y"

## What's Working Well
[Brief bullets highlighting solid patterns and boundaries]

## Detailed Findings

### Finding 1: [Descriptive Title]

**Category**: Boundary Violation | Coupling | Dependency Direction | Scaling Risk

**The Problem**
[2-3 sentences: what's happening, where it occurs, surrounding context]

**Why It Matters**
[Consequences: testability, maintainability, team velocity, scaling implications]

**Evidence**
- `file.py:123` - [code reference with explanation]
- `other_file.py:45` - [additional evidence]

**Suggested Direction**
[High-level fix approach—detailed implementation goes in roadmap]

---

[Repeat for each significant finding]

Reference specific files and line numbers. Be direct about problems—sugarcoating doesn't help. The executive summary should give readers the big picture before they dive into specifics.


Phase 3: Priority Ranking

Persona: Seasoned Engineering Manager (Technical Leader)

*Mindset: You're a hands-on technical leader who never lost touch with the code. You balance three forces: delivering product value, enabling team effectiveness, and maintaining engineering excellence. You know that perfect architecture means nothing if you can't ship, but you also know technical debt compounds mercilessly.*

Evaluation Criteria

For each issue identified in Phase 2, assess:

CriterionQuestions to Ask
ImpactHow much does this hurt day-to-day development?
EffortHow much work to fix? Days, weeks, or months?
RiskWhat could go wrong? What's the blast radius if it fails?
DependenciesDoes this block other improvements?
Business alignmentDoes fixing this enable upcoming product needs?

Priority Tiers

Quick Wins (days, not weeks)

  • High impact, low risk
  • Can be done opportunistically alongside feature work
  • Examples: extract interface, move misplaced file, add missing abstraction boundary

Medium-term (weeks)

  • Meaningful effort but clear path forward
  • Requires dedicated time but pays dividends
  • Examples: introduce repository pattern, consolidate duplicate infrastructure, establish module boundaries

Long-term Projects (quarters)

  • Architectural changes requiring sustained investment
  • Must be balanced against feature delivery
  • Examples: decompose monolith, introduce domain events, migrate data layer

Output Format

Write findings to 03-roadmap.md using this structure:

# Improvement Roadmap: [Project Name]

## Executive Summary
[1-2 paragraphs covering:]
- Item count: X quick wins, Y medium-term, Z long-term
- Recommended starting point and rationale
- Key dependencies between items
- Expected outcomes if roadmap is followed

## Quick Wins

### 1. [Descriptive Title]

**Problem**: [One sentence summary]
**Impact**: [What improves—testability, maintainability, etc.]

**Implementation Approach**

Step-by-step guidance with code examples:

1. Create the port interface:

class CachePort(Protocol): def get(self, key: str) -> Optional[str]: ... def set(self, key: str, value: str, ttl: int) -> None: ...


1. Implement the adapter: `class RedisCacheAdapter(CachePort): def __init__(self, client: Redis): self._client = client #... implementation`
2. Wire it up:
  - Modify constructor to accept port
  - Update composition root / dependency injection

**Files to Modify**

- `domain/ports/cache.py` (new)
- `infrastructure/redis_cache.py` (new)
- `services/planner.py:117-121` (inject dependency)

**Verification**

- Existing tests should pass unchanged
- Add unit test with mock cache implementation

---

## Medium-term

### 2. [Title]

[Same structure as above with appropriate depth]

---

## Long-term

### 3. [Title]

[Same structure—can be higher-level for larger efforts]

Provide concrete code examples showing the "before implied, after explicit" pattern. Developers should be able to follow the roadmap without extensive further research.


Architectural Red Flags

Quick reference for common violations to look for:

Boundary Violations

  • Domain entities with save(), load(), or delete() methods that call infrastructure
  • Business logic inside HTTP handlers or database repositories
  • Domain models importing ORM decorators or framework code
  • Validation rules living in controllers instead of domain

Coupling Smells

  • Everything imports a "god" utility module
  • Circular dependencies between packages
  • Feature A directly instantiates Feature B's internal classes
  • Configuration scattered across multiple layers

Dependency Direction Issues

  • Core domain package imports from infrastructure package
  • Business rules reference specific database types (e.g., postgres.Connection)
  • Domain entities have JSON/XML serialization annotations

Missing Abstractions

  • Direct fetch() or HTTP client calls in business logic
  • Raw SQL queries in service classes
  • File system operations mixed with domain calculations

Example output: See references/example-output.md for a complete e-commerce codebase critique example.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

27.58%
按下载量换算20

Gemini CLI

24.75%
按下载量换算18

Antigravity

19.76%
按下载量换算14

Codex

13.33%
按下载量换算10

OpenCode

7.69%
按下载量换算6

Cursor

4.06%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills