php-diagrams

Generate Mermaid diagrams from PHP codebases into Markdown files.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/axitdev/skills --skill php-diagrams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-diagrams
Source: https://github.com/axitdev/skills/tree/main/php-diagrams-skill
Command: npx skills add https://github.com/axitdev/skills --skill php-diagrams

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the manual effort and guesswork of creating visual documentation for PHP codebases by automatically researching source code and producing accurate Mermaid diagrams, making architecture, flows, and database schemas easy to understand and maintain.

Core Features & Use Cases

  • Code-driven diagrams: Reads project files to produce sequence, class, ERD, flowchart, state, and other Mermaid diagrams that reflect actual code and database structures.
  • Configurable and multi-repo: Honors .mermaid-diagrams.yaml for sources, output paths, and defaults; supports researching additional local or git repositories for multi-service flows.
  • Organized output: Writes diagrams as Markdown files with Mermaid blocks, maintains an index, and marks draft proposals when the implementation is missing or uncertain.
  • Use case: Visualize a user registration flow across controllers, services, events, and database tables to onboard new engineers or document integrations like Stripe.

Quick Start

Diagram the user registration flow and database relationships as a sequence diagram and ERD for this PHP project using the default configuration.

Frequently Asked Questions about php-diagrams

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Mermaid diagrams from PHP code automatically?

To generate Mermaid diagrams from PHP code, this Skill analyzes project source files and configuration to visualize flows, classes, and database schemas. It outputs organized Markdown files containing Mermaid blocks and a maintained index.

Can I visualize a Laravel user registration flow as a sequence diagram?

Yes, you can visualize a Laravel user registration flow as a sequence diagram. The Skill reads controllers, services, events, and database tables to map cross-component flows for frameworks like Laravel and Symfony.

Does this Mermaid diagram generator work with multi-repo PHP projects?

Yes, this Mermaid diagram generator works with multi-repo PHP projects. It supports researching additional local or git repositories to map complex multi-service flows and respects .mermaid-diagrams.yaml settings for sources.

How do I create an ERD from my Symfony database schema?

To create an ERD from your Symfony database schema, the Skill analyzes your project source files and database structures. It then generates accurate Mermaid entity relationship diagrams reflecting your actual codebase.

What happens if the diagram implementation is missing or uncertain?

When the implementation is missing or uncertain, the generated Mermaid diagrams are marked as draft proposals. This ensures you know which visualizations reflect actual code and which are theoretical architecture suggestions.

Do I need a configuration file to document my PHP architecture?

You do not strictly need a configuration file to document your PHP architecture, but providing a .mermaid-diagrams.yaml file lets you specify sources, output paths, and defaults for more controlled diagram generation.