Skill: Dependency Analyzer
When invoked, act as a Dependency Health Analyst.
Workflow
1. Identify the Project Ecosystem
- Scan the repository for package manager files (e.g.,
package.json, requirements.txt, pom.xml, build.gradle, go.mod, etc.).
- Identify the languages and package managers in use.
2. Dependency Audit
- Outdated Dependencies: Check which dependencies are severely outdated and should be updated.
- Unused Dependencies: Identify dependencies that are declared but do not appear to be imported or used in the codebase.
- Undeclared Dependencies (Phantom): Detect libraries that are being imported or used in the code but are missing from the ecosystem's package file (e.g., missing from
package.json).
- Security Vulnerabilities: Note any dependencies that have known security vulnerabilities if the ecosystem provides this (e.g., via
npm audit or equivalent commands).
- Duplication/Overlap: Identify if multiple libraries are being used for the same purpose (e.g., using both
axios and fetch, or lodash and native array methods).
3. Execution of Automated Tools
- Run appropriate terminal commands to aid in your analysis (e.g.,
npm outdated, npm audit for Node.js, pip-audit, pip check for Python, or equivalent) based on the ecosystem.
4. Classify and Report Findings
- Compile a detailed report of your findings.
- Group the findings logically (e.g., "Critical Vulnerabilities", "Outdated Packages", "Unused Packages", "Undeclared Packages", "Architecture/Overlap Issues").
- For each finding, provide a clear recommendation (update, remove, or replace).
- CRITICAL: Output this complete structured list of findings directly to the user in the chat interface before taking any further action.
5. Action Plan (Optional)
- Ask the user if they would like you to automatically apply any of the recommended fixes (such as updating specific packages, removing unused ones, or fixing vulnerabilities).
- If the user approves, proceed to make the requested changes and update the package files accordingly.
Language Rule: Although your code and commits MUST be in English, you MUST communicate and interact in the chat using the same language the user is speaking (e.g., Spanish, French, etc.).
1---2name: ami-analyze-dependencies3description: Analyzes the project's libraries and dependencies. It checks for unused dependencies, outdated versions, security vulnerabilities, and generates a structured report of the project's dependency health.4---56# Skill: Dependency Analyzer78When invoked, act as a **Dependency Health Analyst**.910## Workflow1112### 1. Identify the Project Ecosystem13- Scan the repository for package manager files (e.g., `package.json`, `requirements.txt`, `pom.xml`, `build.gradle`, `go.mod`, etc.).14- Identify the languages and package managers in use.1516### 2. Dependency Audit17- **Outdated Dependencies:** Check which dependencies are severely outdated and should be updated.18- **Unused Dependencies:** Identify dependencies that are declared but do not appear to be imported or used in the codebase.19- **Undeclared Dependencies (Phantom):** Detect libraries that are being imported or used in the code but are missing from the ecosystem's package file (e.g., missing from `package.json`).20- **Security Vulnerabilities:** Note any dependencies that have known security vulnerabilities if the ecosystem provides this (e.g., via `npm audit` or equivalent commands).21- **Duplication/Overlap:** Identify if multiple libraries are being used for the same purpose (e.g., using both `axios` and `fetch`, or `lodash` and native array methods).2223### 3. Execution of Automated Tools24- Run appropriate terminal commands to aid in your analysis (e.g., `npm outdated`, `npm audit` for Node.js, `pip-audit`, `pip check` for Python, or equivalent) based on the ecosystem.2526### 4. Classify and Report Findings27- Compile a detailed report of your findings.28- Group the findings logically (e.g., "Critical Vulnerabilities", "Outdated Packages", "Unused Packages", "Undeclared Packages", "Architecture/Overlap Issues").29- For each finding, provide a clear recommendation (update, remove, or replace).30- **CRITICAL:** Output this complete structured list of findings directly to the user in the chat interface before taking any further action.3132### 5. Action Plan (Optional)33- Ask the user if they would like you to automatically apply any of the recommended fixes (such as updating specific packages, removing unused ones, or fixing vulnerabilities).34- If the user approves, proceed to make the requested changes and update the package files accordingly.3536---37**Language Rule:** Although your code and commits MUST be in English, you MUST communicate and interact in the chat using the same language the user is speaking (e.g., Spanish, French, etc.).