Rpg Explainer — AI skill for Claude Code
CLI tool to analyze IBM RPG programs using Tree-sitter and Claude LLM.
How to install Rpg Explainer
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mayflower/rpg-explainer and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Rpg Explainer does
CLI tool to analyze IBM RPG programs using Tree-sitter and Claude LLM.
Alternatives in AI
- Jcodemunch MCP — Cut AI token costs 95%+ on code exploration 2.6k ★
- AI Investigator — An automated AI system (Python framework) designed to analyze any type of website content and generate structu 733 ★
- Semble Rs — Fast, AI-agent-native code search in Rust — hybrid BM25 + semantic, Tree-sitter AST chunking, dependency & imp 210 ★
README
RPG Explainer
A CLI tool that parses IBM ILE RPG (RPGLE) programs using Tree-sitter and generates human-readable architecture reports with Mermaid diagrams using Claude LLM.
Features
- Tree-sitter parsing: Uses a custom RPG grammar to parse both free-form and fixed-form RPGLE code (RPG III/IV)
- Mixed format support: Automatically detects
**FREEdirective and handles mixed-format files - Static analysis: Extracts procedures, subroutines, file definitions, data structures, and call graphs
- LLM-powered explanations: Uses Claude via LangChain to generate detailed program explanations
- Mermaid diagrams: Generates flowcharts, sequence diagrams, ER diagrams, and state diagrams for visualization
- Dependency detection: Identifies internal and external calls, file usage, and resource dependencies
Example Output
The tool generates comprehensive analysis reports including:
- Executive summary
- Program architecture with flowcharts
- File dependencies with ER diagrams
- Processing flow with sequence diagrams
- Business logic analysis
- Modernization recommendations
See [examples.md](examples.md) for complete analysis examples.
Installation
Prerequisites
- Python 3.10+
- Node.js (for building the Tree-sitter grammar)
- An Anthropic API key
Setup
Clone the repository:
git clone https://github.com/YOUR_USERNAME/rpg-explainer.git cd rpg-explainerBuild the Tree-sitter RPG grammar:
cd tree-sitter-rpg npm install npx tree-sitter generate cd .. python build_rpg_language.pyInstall the Python package:
pip install -e .Set your Anthropic API key:
export ANTHROPIC_API_KEY=your-api-key-here
Usage
Analyze one or more RPG source files:
rpg-explain path/to/program.rpgle
Analyze multiple files:
rpg-explain src/module1.rpgle src/module2.rpgle
Save the report to a file:
rpg-
Related Skills
Codetospec
Turn a legacy codebase into a verifiable, versionable knowledge graph of its business rules — LLM map/reduce i
Ast Outline
ast-outline lets AI coding agents pull exactly the code context they need — a repo skeleton, a file outline, o
Reporecall
Local codebase memory for Claude Code. Tree-sitter AST indexing (22 languages), hybrid keyword + vector search
MCP Server Code Extractor
🎯 Precise code extraction for AI assistants - MCP server using tree-sitter to extract functions, classes & sn
Fast File Search
Ultra-fast file search toolkit for AI agents, Neovim, and code editors. MCP server for Claude Code/Cursor/Code
Codesift
Token-efficient code intelligence for AI agents — 66 MCP tools via tree-sitter AST, BM25F search, semantic sea
Related Agents
Diff Explainer
Explains a diff (staged, working tree, branch, or commit) in the project's domain language and then asks the u
Node Developer
Node.js programs a person, shell or scheduler runs — a CLI and its bin, a script, a worker, a cron job, a daem
Review Package Analyzer
Analyze codebase and current work to identify files for a review package. Use when creating packages for exter