# C4 Generator

> Generate C4 diagrams from project analysis.

- **Type:** Skill
- **Install:** `agentstack add skill-wesleyegberto-software-engineering-skills-c4-generator`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [wesleyegberto](https://agentstack.voostack.com/s/wesleyegberto)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [wesleyegberto](https://github.com/wesleyegberto)
- **Source:** https://github.com/wesleyegberto/software-engineering-skills/tree/main/plugins/architecture/skills/c4-generator

## Install

```sh
agentstack add skill-wesleyegberto-software-engineering-skills-c4-generator
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Objective
Enable AI agents to automatically generate C4 diagrams (C1, C2, C3, and C4 levels) from project analysis.

## Process Steps

1. **Project Structure Analysis**
   - Identify the general architecture, main modules, components, and purpose of the system.

2. **Package/Folder Structure and Organization Analysis**
   - Map the directory hierarchy, logical groupings, and responsibilities of each package/folder.

3. **Analysis of Integrations with External Systems and Resources**
   - Detect connections with APIs, queues, files, databases, and other external systems.

4. **Dependency Analysis**
   - Identify relevant libraries, frameworks, and external dependencies for the architecture.

5. **C4 Diagram Generation**
   - Generate diagrams for each level (C1, C2, C3, C4) in Mermaid format.

6. **User Interaction**
   - If there are doubts or ambiguous points, ask the user for clarification before finalizing the diagrams.

7. **Final Markdown Generation**
   - Create a markdown file containing:
     - Analysis summary
     - Mermaid diagrams for each level (C1, C2, C3, C4)

## Example of Generated Markdown Structure

---
# C4 Analysis of Project 

## Analysis Summary
- General project structure
- Main packages and responsibilities
- External integrations
- Dependencies

## C4 Diagram - Level 1 (Context)
```mermaid
C4Context
    ...
```

## C4 Diagram - Level 2 (Container)
```mermaid
C4Container
    ...
```

## C4 Diagram - Level 3 (Component)
```mermaid
C4Component
    ...
```

## C4 Diagram - Level 4 (Code)
```mermaid
C4Dynamic
    ...
```

---

## Observations
- Always question the user if any point of the analysis is not clear.
- Use the actual project structure to detail the diagrams.
- Adapt the diagrams according to the complexity and context of the analyzed project.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [wesleyegberto](https://github.com/wesleyegberto)
- **Source:** [wesleyegberto/software-engineering-skills](https://github.com/wesleyegberto/software-engineering-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-wesleyegberto-software-engineering-skills-c4-generator
- Seller: https://agentstack.voostack.com/s/wesleyegberto
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
