Controller Call Chain Analysis
Skill by 14686039
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/14686039/controller-call-chain-analysisWhat This Skill Does
The Controller Call Chain Analysis skill is an advanced diagnostic tool designed for Java microservice architectures. It acts as an automated architecture documenter, traversing the entire execution path of a Controller method. Starting from the HTTP endpoint definition, the skill systematically identifies injected Service components, traces method calls through the business logic layer, resolves the underlying MyBatis Mapper or Spring Data Repository calls, and finally extracts the precise SQL statements executed against the database. The output is a structured JSON artifact that maps your entire request lifecycle, making it an essential utility for modern DevOps and backend development workflows.
Installation
You can install this skill directly using the OpenClaw CLI:
clawhub install openclaw/skills/skills/14686039/controller-call-chain-analysis
Ensure you have the appropriate file-read permissions for your Java project source directory before execution.
Use Cases
- Legacy Codebase Exploration: Quickly understand undocumented business logic by visualizing the code path from API request to SQL execution.
- Security Auditing: Identify sensitive database interactions by reviewing the extracted SQL statements associated with specific Controller endpoints.
- API Documentation: Automate the generation of technical documentation for RESTful services, including mapping input parameters to internal service logic and data layers.
- Query Optimization: Detect inefficient SQL patterns or N+1 query issues by analyzing the generated chain for every API endpoint.
Example Prompts
- "Analyze the controller path src/main/java/org/ssh/boot/itemSupply/controller/pham/TDrugdictController.java and generate a full call chain report."
- "Run a call chain analysis on my TDrugdictController and save the output in the custom directory docs/arch/reports."
- "After mapping the controller at [path], identify all SQL queries that interact with the 'drug_info' database table."
Tips & Limitations
- Project Structure: This skill works best with standard Spring Boot structures (Maven/Gradle). If your project uses complex custom directory structures for Mappers, ensure the file paths are correctly reachable.
- XML Parsing: It assumes MyBatis XML files follow the standard
namespaceconvention. If your project uses heavily annotated Mapper interfaces, note that the SQL extraction relies on static code analysis. - Security: As this tool reads your source code and identifies database queries, ensure it is run in a secure, local environment.
- Performance: For extremely large projects, running the analysis on individual controllers is recommended over bulk execution to manage compute resources effectively.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-14686039-controller-call-chain-analysis": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read