Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器unknown未标认证来源可访问许可证需确认审计未展示

structurizr-architecture-syncstructurizr 架构同步

Agent Skill

structurizr-architecture-sync 用于补充前端设计相关能力,适合在 Local Agent 中需要让 Agent 承接前端设计相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

306

周安装

13

下载量

107
Local Agent

安装说明

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

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

structurizr-architecture-sync 用于补充前端设计相关能力,适合在 Local Agent 中承接前端设计任务。

  • 它帮助生成或审查前端代码,使用时需结合项目现有设计系统和构建方式。
  • 安装方式未明确,建议通过官方渠道获取安装命令和文档。
  • 使用前应检查权限边界和维护状态,避免触发不必要的网络或文件操作。
  • 适用宿主包括 Local Agent,接入前应确认版本、权限和运行环境要求。

SKILL.md

Structurizr Architecture Synchronization

Context (Input)

Use this skill when:

  • Adding new components (controllers, handlers, services, repositories)
  • Creating new entities or aggregates
  • Modifying component relationships or dependencies
  • Implementing new architectural patterns (CQRS, events, subscribers)
  • Adding infrastructure components (databases, caches, message brokers)
  • Refactoring that changes component structure
  • After fixing Deptrac violations (may indicate architecture drift)
  • Creating new bounded contexts or modules
  • Implementing new API endpoints with significant handlers

Task (Function)

Keep the Structurizr workspace (workspace.dsl) synchronized with codebase changes, ensuring C4 model diagrams accurately represent the current system architecture.

Success Criteria:

  • workspace.dsl contains all significant components
  • Component relationships match actual code dependencies
  • Layer groupings (Application/Domain/Infrastructure) are accurate
  • Component descriptions reflect current purpose
  • All infrastructure dependencies are documented
  • C4 diagrams render without errors (check at http://localhost:${STRUCTURIZR_PORT:-8080})

Quick Start: Update Architecture in 5 Steps

Complete Template: See reference/workspace-template.md for full workspace.dsl structure.

Step 1: Identify Architectural Changes

Determine if your code changes are architecturally significant:

✅ DO update workspace.dsl when adding:

  • Processors (HTTP/GraphQL handlers)
  • Command Handlers (CQRS pattern)
  • Event Subscribers (event-driven patterns)
  • Entities (core domain objects)
  • Domain Events (significant business events)
  • Repositories (data access)
  • Event Bus or infrastructure services
  • External dependencies (DB, Cache, Message Broker)

❌ DON'T update for:

  • Factory classes
  • Transformer classes (unless critical)
  • Value objects (unless architecturally significant)
  • Interface definitions (except hexagonal ports)
  • Base classes
  • DTOs and input/output objects
  • Utility classes and helpers

Target: 15-25 components per diagram for clarity.

Step 2: Add Component to Appropriate Group

Edit workspace.dsl and add component in the correct layer group:

group "Application" {
    newProcessor = component "NewProcessor" "Handles new requests" "RequestProcessor" {
        tags "Item"
    }
}

Layers:

  • group "Application" - Controllers, Processors, Handlers, Subscribers
  • group "Domain" - Entities, Domain Events
  • group "Infrastructure" - Repositories, Event Bus, Infrastructure services

External dependencies (database, cache, messageBroker) go OUTSIDE groups at container level.

See: reference/dsl-syntax.md for complete syntax.

Step 3: Define Relationships

Add relationships showing how your component interacts:

// After all component definitions
newProcessor -> commandHandler "dispatches NewCommand"
commandHandler -> repository "uses"
repository -> database "accesses data"

Common patterns: See reference/relationship-patterns.md

Step 4: Verify Diagram Renders

View the updated diagram:

# Refresh browser (Structurizr Lite auto-reloads)
# Port is configurable via STRUCTURIZR_PORT in .env (default: 8080)
open http://localhost:${STRUCTURIZR_PORT:-8080}
# Navigate to "Diagrams" → "Components_All"

Check for:

  • No syntax errors displayed
  • New component appears
  • Relationships are visible
  • Component is in correct layer group

Step 5: Position and Commit

  1. Drag components in the UI to improve layout
  2. Click "Save workspace" button (saves to workspace.json)
  3. Commit both files:
git add workspace.dsl workspace.json
git commit -m "feat: update architecture with new processor"

Diagram as Code Workflow

Setup (Already Configured)

Docker: Structurizr Lite runs in docker-compose.override.yml:

structurizr:
  image: structurizr/lite:2024.07.02
  ports:
    - '${STRUCTURIZR_PORT}:8080'
  volumes:
    - ./:/usr/local/structurizr

Access: http://localhost:${STRUCTURIZR_PORT:-8080} (port configurable via .env)

Standard Development Flow

  1. Implement code changes → Add handler, entity, repository
  2. Update workspace.dsl → Add component + relationships
  3. View locally → Refresh browser at configured port
  4. Position components → Drag in UI, click "Save workspace"
  5. Commit together → Code + workspace.dsl + workspace.json in same PR

Manual Positioning in UI

Automatic layout doesn't work well - use manual positioning:

  1. Open Structurizr UI in browser
  2. Navigate to "Diagrams" → "Components_All"
  3. Drag components to arrange (left-to-right flow recommended)
  4. Click "Save workspace" button in top-right
  5. Positions saved to workspace.json in project root
  6. Commit workspace.json with workspace.dsl

Layout best practices:

  • Processors/Controllers on the left (entry points)
  • Command Handlers in the middle (business logic)
  • Repositories to the right of handlers
  • Database/Cache/Message Broker on far right (external)

Common mistakes: See reference/common-mistakes.md for complete guide.


Reference Documentation

Detailed Guides

Examples


Critical Principles

What Makes a Good Architecture Diagram

Clarity over Completeness:

  • 15-25 components (optimal readability)
  • Focus on architectural significance
  • Clear left-to-right or top-to-bottom flow
  • External dependencies clearly visible

Layer Separation:

  • Application: Entry points and orchestration
  • Domain: Business logic and entities
  • Infrastructure: Technical implementation

Meaningful Relationships:

  • Show actual code dependencies
  • Use descriptive labels
  • Avoid circular dependencies

Alignment with Deptrac

Layer groupings in workspace.dsl MUST match Deptrac configuration:

group "Application"     ↔  Application layer in deptrac.yaml
group "Domain"          ↔  Domain layer in deptrac.yaml
group "Infrastructure"  ↔  Infrastructure layer in deptrac.yaml

This ensures architecture documentation matches enforced boundaries.


Integration with Other Skills

Use this skill after:

Use this skill before:


Troubleshooting

Common Issues

Issue: Structurizr UI shows "Element does not exist" error

Solution: Check component variable names in relationships match the component definitions exactly. See common-mistakes.md.


Issue: Diagram shows components in wrong positions after pull

Solution: Ensure workspace.json is committed along with workspace.dsl. The JSON file stores manual positions.


Issue: DSL syntax validation fails

Solution:

  1. Check balanced braces {}
  2. Verify all components are defined before relationships
  3. Ensure no duplicate variable names
  4. Compare with workspace-template.md

Issue: Too many components (30+), diagram is cluttered

Solution: Follow component-identification.md - aim for 15-25 components. Omit DTOs, utilities, and factories.


Issue: Can't determine if component should be documented

Solution: Use the decision matrix in component-identification.md or the TL;DR section.

External Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

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

平台分布

Local Agent

72.1%
按下载量换算77

安全审计

暂无安全审计结果可展示。

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills