code-to-doc-expert

Convert Java Spring codebases into OpenAPI-style Markdown and Mermaid diagrams.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Xunzi229/skills --skill code-to-doc-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-to-doc-expert
Source: https://github.com/Xunzi229/skills/tree/main/code-to-doc-expert
Command: npx skills add https://github.com/Xunzi229/skills --skill code-to-doc-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Converts Java service and controller code into human-readable technical documentation and visual diagrams to reduce manual documentation effort, speed onboarding, and clarify complex business logic.

Core Features & Use Cases

  • API Documentation Extraction: Detects controllers and endpoints, extracts URLs, HTTP methods, parameters, request/response schemas, and exceptions, and produces OpenAPI-style Markdown.
  • Business Logic Summarization: Analyzes service-layer logic to produce step-by-step business flow descriptions in natural language.
  • Architecture Mapping: Identifies class dependencies and interactions and generates Mermaid sequence or class diagrams to illustrate call chains and relationships.
  • Use Cases: New API development, complex logic explanation, documentation completion, refactoring handover, and generating developer-ready docs for code reviews.

Quick Start

Scan the selected Java controller and service files and generate OpenAPI-style Markdown API docs, a business flow summary, and Mermaid diagrams saved to docs/.

Frequently Asked Questions about code-to-doc-expert

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

FAQPage Schema
How do I generate OpenAPI documentation from Java Spring controllers?

Generate OpenAPI documentation by scanning Spring controllers to extract URLs, HTTP methods, parameters, request/response schemas, and exceptions, producing OpenAPI-style Markdown files persisted under docs/.

Can I generate Mermaid diagrams from Java codebases to visualize class dependencies?

Yes, you can generate Mermaid diagrams from Java codebases by identifying class dependencies and interactions, producing Mermaid sequence or class diagrams to illustrate call chains and relationships.

What is the best way to summarize business logic from Java service layers?

Summarize business logic by analyzing Java service-layer code to produce step-by-step business flow descriptions in natural language, clarifying complex logic during refactoring or handover.

Does this work with Spring-based domain classes for API documentation extraction?

Yes, it applies to Spring-based controllers, services, and domain classes to extract endpoints, request/response schemas, exceptions, and service logic flows for API documentation and architecture mapping.

How do I create technical documentation for a Java code refactoring handover?

Create technical documentation for a Java refactoring handover by converting service and controller code into structured Markdown, business flow summaries, and Mermaid diagrams to clarify complex business logic and speed onboarding.