一键导入
architecture-diagrammer
Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyzes ETL and data pipeline code for optimization opportunities across Python (Pandas, PySpark), Rust (polars, datafusion), SQL, and general pipeline descriptions
Validates environment variable configurations and config files (YAML, TOML, JSON, .env) for missing required variables, type mismatches, deprecated keys, naming convention violations, secret exposure risks, and invalid value ranges
Analyzes code for performance bottlenecks including N+1 queries, O(n^2) or worse algorithms, unnecessary allocations, sync I/O in async contexts, excessive cloning, missing caching opportunities, and large payload transfers. Supports Rust, Python, TypeScript, and Go.
Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability
Analyzes source code for common security vulnerabilities including SQL injection, XSS, command injection, hardcoded secrets, insecure deserialization, path traversal, and SSRF
Agent reviews its own work before presenting to the user. Catches errors, style violations, and omissions before the user sees the output.
| name | architecture-diagrammer |
| description | Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format |
| version | 1.0.0 |
| author | go-on-team |
| tags | ["architecture","diagram","mermaid","visualization","rust","python","typescript","go"] |
| min_go_on_version | 1.0.0 |
Analyzes source code to understand module boundaries, data flow paths, async task spawning relationships, and external service dependencies, then generates architecture diagrams in Mermaid format (flowcharts, sequence diagrams, and C4 model diagrams). Supports Rust, Python, TypeScript, and Go projects.
| Parameter | Type | Description |
|---|---|---|
project_root | string | Root directory of the project to analyze |
language | string | One of "rust", "python", "typescript", "go", or "auto" for automatic detection (default: "auto") |
diagram_type | string | Diagram style: "flowchart", "sequence", or "c4" (default: "flowchart") |
depth | integer | Module traversal depth for import resolution (default: 3, max: 10) |
include_patterns | array | Optional glob patterns to include (e.g. ["src/**/*.rs"]) |
exclude_patterns | array | Optional glob patterns to exclude (e.g. ["**/tests/**", "**/vendor/**"]) |
show_external | boolean | Whether to include external service dependencies in the diagram (default: true) |
show_entry_points | boolean | Whether to highlight entry points (main, handlers, CLI commands) with special styling (default: true) |
group_by_namespace | boolean | Whether to group nodes by namespace or module boundary using subgraphs (default: true) |
{
"project_root": "/home/user/projects/my-service",
"language": "go",
"diagram_type": "c4",
"depth": 3,
"exclude_patterns": ["**/vendor/**", "**/*_test.go"],
"show_external": true,
"show_entry_points": true,
"group_by_namespace": true
}
Example output (C4 container diagram — Mermaid):
C4Context
title System Context — my-service
Person(user, "End User", "Interacts via HTTP")
System_Boundary(my_service, "my-service") {
Container(api, "API Gateway", "Go / gin", "Routes requests and validates auth")
Container(worker, "Background Worker", "Go / goroutines", "Processes async jobs from queue")
ContainerDb(db, "PostgreSQL", "Relational DB", "Stores user and order data")
}
System_Ext(sqs, "Amazon SQS", "Message queue for job dispatch")
System_Ext(s3, "Amazon S3", "Object storage for file assets")
Rel(user, api, "HTTP / JSON")
Rel(api, db, "SQL", "Reads / writes")
Rel(api, sqs, "Publish jobs")
Rel(worker, sqs, "Consume jobs")
Rel(worker, s3, "Upload / download")
Example output (module-level flowchart — Mermaid):
flowchart TD
subgraph cmd/server
ENTRY[main.go] --> HANDLER[handlers/]
end
subgraph internal/service
HANDLER --> SERVICE[service.go]
SERVICE --> REPO[repository.go]
end
subgraph internal/repository
REPO --> DB[(postgres.go)]
REPO --> CACHE[(redis.go)]
end
subgraph internal/queue
HANDLER --> PRODUCER[producer.go]
WORKER[worker.go] --> SERVICE
end
subgraph pkg
CONFIG[config.go]
LOGGER[logger.go]
end
ENTRY --> CONFIG
ENTRY --> LOGGER