code-explainer
Explain any code file in plain English. Use when you need to understand unfamiliar code.
Why use this skill?
Learn how to use the OpenClaw code-explainer skill to automatically generate plain English documentation and analysis for your source code files.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lxgicstudios/code-explainerWhat This Skill Does
The code-explainer skill acts as an intelligent bridge between complex, undocumented source code and the human developer. By leveraging advanced AI analysis, it parses entire code files to provide natural language summaries, structural breakdowns, and logic explanations. It is designed to minimize cognitive load when navigating unfamiliar codebases, legacy repositories, or complex logic that lacks internal documentation. It supports multiple depth levels—beginner, intermediate, and expert—allowing users to tailor the output to their current knowledge gap, whether they need a high-level architectural summary or a granular deep-dive into specific algorithmic patterns.
Installation
You can integrate this skill into your environment using the OpenClaw command-line interface. Run the following command in your terminal:
clawhub install openclaw/skills/skills/lxgicstudios/code-explainer
Ensure you have Node.js 18 or higher installed on your system to maintain compatibility with the underlying toolset. Once installed, you can trigger it globally using npx to inspect any file in your project directories without additional configuration.
Use Cases
- Onboarding: Quickly get up to speed on a large, unfamiliar project by generating human-readable documentation for core modules.
- Code Review: Audit incoming pull requests by having the AI explain the flow of unfamiliar files, ensuring you catch logic errors before they merge.
- Legacy Maintenance: Analyze aging codebases that lack comments to understand the 'why' behind existing implementations.
- Educational Tooling: Use the beginner mode to learn how specific libraries or design patterns function in real-world scenarios.
Example Prompts
- "@code-explainer explain the logic in src/auth.ts using the beginner level to help me understand how session tokens are validated."
- "@code-explainer provide an expert-level breakdown of the memory management patterns in this C++ file."
- "@code-explainer summarize the primary purpose of this deployment script and highlight any potential risks identified in the code flow."
Tips & Limitations
For the best results, always start by running the skill at the 'beginner' level to establish a mental model of the file's purpose before diving into 'expert' technicalities. While the tool is excellent for explanation and pattern recognition, remember that it is a heuristic analysis tool; it cannot execute the code or guarantee behavioral results in a live environment. It is best used as a supplement to human code review rather than a replacement. Be aware that extremely large files may be truncated or summarized at a higher level depending on token limits, so it is often better to point the tool at specific module files rather than massive monolithic files.
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-lxgicstudios-code-explainer": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
script-gen
Generate package.json scripts with AI. Use when setting up npm scripts.
email-template-gen
Generate responsive email templates. Use when building transactional emails.
branch-namer
Generate descriptive git branch names from plain English. Use when you need a branch name that follows conventions.
cloudflare-gen
Generate Cloudflare Workers configuration and code. Use when building on the edge.
adr-writer
Generate Architecture Decision Records with AI. Use when documenting technical decisions.