Code Complexity Analyzer
Analyze codebase complexity metrics and identify refactoring candidates
Example Prompt
Analyze the complexity of our codebase and create issues for the modules that most need refactoring
About
Examines the codebase to measure complexity metrics such as file sizes, nesting depth, and function lengths. Identifies the most complex modules that would benefit from refactoring and creates GitHub issues with specific improvement suggestions.
Workflow Steps
List the source directories to identify all code modules to analyze
๐ List DirectoryRead source files to measure complexity indicators like function length and nesting depth
๐ Read FileCalculate complexity scores and rank modules by refactoring priority
๐ง Structured ReasoningCreate GitHub issues for the top refactoring candidates with specific recommendations
โ Create IssueStore the complexity analysis results for tracking improvements over time
๐ง Store MemoryTools Used
List Directory
List all files and subdirectories in a given directory path
Read File
Read the contents of a file at a specified path on the local filesystem
Create Issue
Create a new issue in a GitHub repository with title, body, labels, and assignees
Store Memory
Persist a key-value pair to the agent's long-term knowledge graph memory
Structured Reasoning
Break down a complex problem into sequential reasoning steps with explicit chain-of-thought
Required MCP Servers
Filesystem
Read, search, and manage files on the local filesystem
GitHub
Access GitHub repos, issues, PRs, and code search via the official MCP server
Memory (Knowledge Graph)
Persistent knowledge graph for storing and retrieving structured information across sessions
Sequential Thinking
Dynamic problem-solving through structured thought sequences with branching and revision