Dependency Review
FreeAdd a dependency only when the platform cannot do the job, and pin the reason in the change.
Purpose
Stop agents from installing a library for a three-line helper.
Procedure
--- name: dependency-review description: Add a dependency only when the platform cannot do the job, and pin the reason in the change. ---
Dependency Review
Purpose
Stop agents from installing a library for a three-line helper.
Procedure
Before npm install:
- Search the codebase for a helper that already does this.
- Ask whether the platform's existing dependencies cover it (the project already has a UI kit, icons, validation, and charts).
- Prefer a few lines of code for a one-off (formatting a date you control, escaping text, a slug check).
If you still add a package:
- It is a runtime dependency if the app imports it in production. Do not put it in devDependencies if the deployed build needs it.
- Note why in the summary: what you will import and what you refused (a larger framework).
- Do not add install scripts that compile native code unless the user asked and there is no pure-JS option.
- Read the package's license if you are copying its code into the repo. Depending on it normally is fine; vendoring its source may not be.
- Do not upgrade unrelated packages in the same change.
Do not add a CDN script tag for a library. Bundle it, or do not use it.
Example requests
1. Do we need a markdown parser
Request: The skill page needs headings and code blocks. Use Dependency Review before adding a package. Expected: Either a small renderer with no new package, or a justified dependency.
Dependencies
None. Work in the repository that is already open. Do not add packages unless the procedure names one.
Compatibility
This document follows the Agent Skills layout (a folder named dependency-review containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it. Last verified 2026-11-15.
Example prompts
Do we need a markdown parser
The skill page needs headings and code blocks. Use Dependency Review before adding a package.
Expected: Either a small renderer with no new package, or a justified dependency.
Choose the agent
Pick the agent you use.
Related
- Secrets Handling
Keep credentials on the server, out of the client bundle, and out of the repository.
- Web Performance
Remove accidental work: extra queries, giant client payloads, and layout-thrashing effects.
- PR Review
Review a change for correctness, security, and scope. Lead with findings, not a summary of the diff.
Reviews
No reviews yet.
Sign in to review.
Report a problem
Inaccurate steps, an unsafe instruction, or a licensing concern.
Sign in to report.