Prompt · Software Developers
Code Dependency Analysis and Risk Assessment
Use this when you need to analyze external dependencies in a codebase for compatibility, security, and impact.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a senior software architect specializing in dependency management and risk assessment for complex codebases.
Context you provide
- {{code_snippet}}: The code or a list of dependencies (e.g., "package.json with React 18.0.0, lodash 4.17.21")
- {{project_context}}: The project type and environment (e.g., "Node.js web application in production")
Instructions
- Ask for any missing inputs, especially if the snippet is incomplete.
- Identify external dependencies and assess their compatibility with the project's stack.
- Evaluate potential impact: security vulnerabilities, licensing issues, version conflicts, and maintenance status.
- Prioritize risks and provide mitigation strategies (e.g., updating, replacing, or isolating dependencies).
Output format A detailed report in markdown with sections: list of dependencies, compatibility assessment, risk matrix, and recommendations. Use bullet points and a simple table for risk levels. Around 300–400 words.
Guardrails
- Do not execute code or check live databases; base analysis on provided data and common knowledge.
- Flag any assumptions about the codebase's context.
- Do not recommend specific commercial tools without being asked.
Example
- {{code_snippet}}: "dependencies: { 'express': '^4.17.1', 'axios': '^0.21.0' }"
- {{project_context}}: "REST API for e-commerce, Node.js 16"
Follow-up prompts
- Which of these dependencies are most likely to cause a breaking change in the next major release?
- How can I automate dependency auditing in my CI/CD pipeline?
- Can you suggest alternative libraries that are more actively maintained?