nimazasinich/codeanalysisandextension icon
public
Published on 3/26/2025
Code Analysis and Extension

Code Analysis and Extension

Prompts
Code Analysis and Extension
A sample prompt
Prompts for Code Analysis and Extension

 Initial Analysis Prompts

1. "Analyze the current project structure and identify all file types, dependencies, and relationships between components. Provide a visual map of how files/folders relate to each other."

2. "Examine the existing codebase for patterns, conventions, and architectural approaches used. Summarize the key programming paradigms, frameworks, and design patterns in use."

3. "Identify all external dependencies, libraries, and APIs used in the current project. Create a comprehensive list with version information where available."
  Code Extension Prompts

4. "Based on the existing code style and patterns, generate [specific functionality] that integrates seamlessly with the current implementation in [file/location]. Maintain consistent formatting and architecture."

5. "The project currently handles [X] by [current approach]. Propose and implement an enhanced solution that builds upon rather than replaces the existing code, with backward compatibility."

6. "Extend the [specific module/component] to include [new features] without breaking existing functionality. Show the minimal changes needed to the current codebase."

Relationship Mapping Prompts

7. "Trace the data flow through the entire application starting from [entry point]. Create a diagram showing how information moves between components."

8. "Identify all cross-references between [specific file] and other project files. Show how they interact and depend on each other."

9. "Map out the complete call hierarchy for [specific function/method], showing all possible execution paths through the codebase."

Safe Modification Prompts

10. "Propose a non-destructive way to refactor [specific code section] to improve [performance/maintainability/readability] while preserving all existing functionality."

11. "Suggest implementation strategies for [new feature] that would require the least modification to the current code structure while maintaining architectural consistency."

12. "Generate adapter/wrapper code that would allow new [components/modules] to work with the existing system without requiring changes to legacy code."

Completion Prompts

13. "The project has partially implemented [feature] in [location]. Analyze the existing partial implementation and complete it in a way that matches the project's style and approach."

14. "Identify all TODO comments and unimplemented stubs in the codebase. For each one, propose a completion that aligns with the surrounding code context."

15. "The file [filename] appears to be incomplete. Analyze its intended purpose based on imports, exports, and usage elsewhere in the project, then provide a complete implementation."