All skills
lexler avatar

/c4-diagrams

@45ff07e
by Lada Kesselerlexler/skill-factory238 stars
61

Creates C4 architecture diagrams for designing, documenting, or understanding software architecture. Use when working through system design, mapping existing codebases, or visualizing structure at any level from system landscape down to code.

Use this Skill: https://skilld.dev/gh/lexler/skill-factory/c4-diagrams

This session only. Nothing lands on disk.

referencesdiagramscode.md

≈475 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Code Diagram

The deepest zoom level. Shows how a single component is implemented: classes, interfaces, functions, database tables, and their relationships.

Scope

A single component.

Elements

  • Primary: Code elements — classes, interfaces, objects, functions, database tables
  • Supporting: Other components that these code elements interact with

Audience

Developers trying to understand or reason about a component's internals.

What to Include

  • Classes/interfaces with their key attributes and methods
  • Relationships: inheritance, composition, dependency, association
  • Database tables and their relationships (if the component is data-centric)
  • Only the attributes and methods that tell the story — not every field and getter

When to Create

Generate Code diagrams when:

  • Investigating a specific component to understand its internals
  • The user explicitly asks for a code-level view
  • Reasoning about class relationships during design
  • Understanding a complex piece of unfamiliar code

Be selective about scope — show the component under investigation, not every component in the container. Focus on the elements that matter for the current question.

Style

Use UML class diagram style for object-oriented code:

  • Classes with compartments (name, key attributes, key methods)
  • Relationship arrows (inheritance, composition, dependency)

Use ER diagram style for data-centric components:

  • Tables with key columns
  • Foreign key relationships

Mix styles when a component spans both concerns.

Common Mistakes

  • Showing every attribute and method — filter to what tells the story
  • Trying to diagram an entire container at code level — stay focused on one component
  • Including implementation details that change frequently (private methods, internal state) unless they're the point of the diagram

Source: https://c4model.com/diagrams/code

Source: SKILL.md on GitHub

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The skill facilitates the creation of C4 architecture diagrams by providing detailed guidelines for various diagram levels and formats. It includes a Python script for validating the visual alignment of ASCII diagrams. The skill's instructions and script are focused on architectural documentation and do not contain malicious patterns.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 45ff07e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 6 months ago

README badge

README badge for lexler/skill-factory/c4-diagrams