sac-c4
C4 model integration for the architecture second brain. Map System/Person/ SoftwareContainer/Component/Code, generate L1–L4 Mermaid views, import Structurizr DSL, and avoid Docker vs C4 Container confusion.
- License 许可
- MIT
- 最近更新
- 2026-09-20
- Stars
- ★ 1
- Forks
- 2
01 前言 Front Matter
- name
- sac-c4
- description
- C4 model integration for the architecture second brain. Map System/Person/ SoftwareContainer/Component/Code, generate L1–L4 Mermaid views, import Structurizr DSL, and avoid Docker vs C4 Container confusion.
03 SKILL.md 正文
SAC × C4 model
Critical naming
- C4 Container =
SoftwareContainer(or Service/WebApp/Database stand-ins) - Docker/OCI =
ContainerImage— different concept
Commands
# Inventory how the bundle maps to C4 abstractions
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_c4.py" --bundle knowledge --inventory
# Generate L1–L4 diagram concepts + Structurizr DSL export
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_c4.py" --bundle knowledge --generate --system "My System"
# Print DSL only
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_c4.py" --bundle knowledge --dsl
# Scan existing Structurizr workspaces
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_scan_structurizr.py" --root . --json
When designing
- L1 — who uses the system; external systems
- L2 — where does the new app/service/DB sit as a SoftwareContainer?
- L3 — components inside that container
- L4 — modules/classes when coding
Deep doc: docs/c4-integration.md.
04 同仓库更多 Skills
sac-session
Open or close an isolated second-brain write session (worktree + PR). Use before scanning or materializing architecture when multiple agents share one knowledge remote.
sac-search
Full-text search over SAC architecture knowledge concepts.
sac-scan
Run deterministic architecture scanners (packages, containers, IaC, K8s, CI/CD, identity) against a code root without writing knowledge.
sac-reverse-engineer
End-to-end reverse-engineer one or more git repositories into a SAC architecture knowledge graph (packages, services, IaC, CI/CD, IAM, identity, topology). Plan breadth-first, then fan out area walkers. Primary entry skill for SAC.
sac-retrieve
Query-time retrieval of SAC architecture context without contaminating the parent. Spawn architecture-retriever for topology (Service, ApiContract, Package, Runtime, Pipeline, IdentityProvider, blast radius). Do not run sac_search or sac_pack in the parent. Consume only the retrieval card.
sac-plan
Breadth-first reverse-engineering plan — map monorepo/multi-repo roots, rank focus areas, emit deep-dive checklists. Pause here before spawning area walkers. Not query-time retrieve.