| name | doxygen-javadoc |
| description | Documentation generation for C, C++, and Java codebases using Doxygen and Javadoc. Extract API documentation from source code, generate cross-references, call graphs, and comprehensive technical documentation. |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| backlog-id | SK-015 |
| metadata | {"author":"babysitter-sdk","version":"1.0.0"} |
| graph | {"domains":["domain:software-engineering"],"specializations":["specialization:technical-documentation"],"skillAreas":["skill-area:api-doc-generation","skill-area:docs-as-code"],"roles":["role:technical-writer","role:documentation-engineer"]} |
Doxygen/Javadoc Skill
Generate comprehensive API documentation for C, C++, Java, and other languages using Doxygen and Javadoc with cross-references, call graphs, and coverage analysis.
Capabilities
- Configure Doxygen for C/C++/Java projects
- Generate Javadoc for Java codebases
- Create cross-reference documentation
- Generate call graphs and dependency visualizations
- Analyze documentation coverage
- Support custom tag definitions
- Multiple output formats (HTML, LaTeX, PDF, XML)
- Integrate with build systems (CMake, Maven, Gradle)
Usage
Invoke this skill when you need to:
- Document C/C++ libraries and applications
- Generate Java API documentation
- Create reference documentation with diagrams
- Set up automated documentation builds
- Analyze code structure and dependencies
Inputs
| Parameter | Type | Required | Description |
|---|
| projectPath | string | Yes | Root path of the project |
| tool | string | No | doxygen or javadoc (auto-detected) |
| sourceDir | string | No | Source directory (default: src) |
| outputDir | string | No | Output directory (default: docs) |
| outputFormat | array | No | html, latex, pdf, xml, man |
| includeGraphs | boolean | No | Generate call/dependency graphs |
| configFile | string | No | Existing Doxyfile or pom.xml path |
| coverageReport | boolean | No | Generate coverage analysis |
Input Example
{
"projectPath": "./mylib",
"tool": "doxygen",
"sourceDir": "src",
"outputDir": "docs/api",
"outputFormat": ["html", "xml"],
"includeGraphs": true,
"coverageReport": true
}
Output Structure
Doxygen Output
docs/api/
โโโ html/
โ โโโ index.html # Main documentation page
โ โโโ annotated.html # Class/struct list
โ โโโ files.html # File list
โ โโโ modules.html # Module grouping
โ โโโ namespaces.html # Namespace documentation
โ โโโ hierarchy.html # Class hierarchy
โ โโโ class_*.html # Individual class pages
โ โโโ struct_*.html # Struct documentation
โ โโโ group__*.html # Module documentation
โ โโโ *_8h.html # Header file documentation
โ โโโ search/ # Search index
โโโ xml/
โ โโโ index.xml # XML index
โ โโโ class_*.xml # Class XML
โ โโโ doxygen-layout.xml # Layout configuration
โโโ latex/ # LaTeX output (if enabled)
โโโ coverage.json # Documentation coverage
Javadoc Output
docs/api/
โโโ index.html # Package overview
โโโ overview-summary.html # Overview page
โโโ allclasses-index.html # Class index
โโโ allpackages-index.html # Package index
โโโ com/
โ โโโ example/
โ โโโ package/
โ โโโ package-summary.html
โ โโโ ClassName.html
โ โโโ ...
โโโ element-list # Package list
โโโ member-search-index.js # Search data
Doxygen Documentation Patterns
File Header
Class Documentation
template<typename Connection>
class ConnectionPool {
public:
explicit ConnectionPool(const PoolConfig& config);
std::shared_ptr<Connection> acquire(int timeout = 30000);
bool release(std::shared_ptr<Connection> conn);
};
Function Documentation
int executeQuery(
const std::string& query,
const std::vector<std::string>& params,
ResultSet& results
);
Module/Group Documentation
Javadoc Documentation Patterns
Package Documentation (package-info.java)
package com.example.database;
Class Documentation
public class ConnectionPool<T extends Connection> implements AutoCloseable {
public ConnectionPool(PoolConfig config) {
}
public T acquire(Duration timeout) throws TimeoutException {
}
@Override
{
}
}
Method Documentation with Code Examples
public <R> List<R> query(String sql, List<?> params, Class<R> resultType)
throws SQLException {
}
Doxyfile Configuration
PROJECT_NAME = "MyLib"
PROJECT_NUMBER = "1.0.0"
PROJECT_BRIEF = "Database connectivity library"
PROJECT_LOGO = logo.png
INPUT = src include
FILE_PATTERNS = *.c *.cc *.cpp *.h *.hpp
RECURSIVE = YES
EXCLUDE = src/test src/vendor
EXCLUDE_PATTERNS = *_test.cpp *_mock.h
OUTPUT_DIRECTORY = docs
GENERATE_HTML = YES
GENERATE_XML = YES
GENERATE_LATEX = NO
HTML_OUTPUT = html
HTML_EXTRA_STYLESHEET = custom.css
SEARCHENGINE = YES
DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
= svg
=
=
=
=
=
=
=
=
=
=
= DOXYGEN_SKIP
=
ALIASES += "=\par Performance\n
Maven Javadoc Configuration
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<source>17</source>
<show>protected</show>
<nohelp>true</nohelp>
<doclint>all,-missing</doclint>
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
</additionalOptions>
<links>
<link>https://docs.oracle.com/en/java/javase/17/docs/api/</link>
</links>
<tags>
<tag>
<name>apiNote</name>
<placement>a</>
API Note:
implSpec
a
Implementation Specification:
implNote
a
Implementation Note:
attach-javadocs
jar
Workflow
- Detect project type - Identify C/C++/Java project
- Locate sources - Find source files and headers
- Generate config - Create Doxyfile or configure Maven
- Parse comments - Extract documentation from source
- Generate diagrams - Create call graphs (if enabled)
- Build output - Generate HTML/PDF/XML
- Analyze coverage - Report documentation gaps
Dependencies
Doxygen
apt-get install doxygen graphviz
brew install doxygen graphviz
choco install doxygen.install graphviz
Javadoc
java -version
Best Practices Applied
- Document all public API elements
- Use @brief for one-line summaries
- Include @param for all parameters
- Specify @return values
- Document exceptions with @throws
- Add @code examples for complex functions
- Use @see for cross-references
- Enable warning for undocumented items
References
Target Processes
- api-doc-generation.js
- sdk-doc-generation.js
- arch-docs-c4.js
- docs-audit.js