Skip to content

Instantly share code, notes, and snippets.

@architjn
Created June 1, 2025 13:09
Show Gist options
  • Save architjn/cfbc7b5f145bb5ce98aff8a92cd0bb11 to your computer and use it in GitHub Desktop.
Save architjn/cfbc7b5f145bb5ce98aff8a92cd0bb11 to your computer and use it in GitHub Desktop.
---
description: Keep package.json accurate—add needed deps, drop unused
globs: ["**/*"]
alwaysApply: true
---
# Add a dep
1. Confirm new code imports it.
2. Call web search → grab **latest stable** version (ignore beta/rc).
3. Place in deps/devDeps, alpha-sort keys.
4. Run `yarn install --silent`.
# Remove a dep
1. Search whole repo for `import/require('<pkg>')`.
2. If zero hits, delete from package.json + prune lockfile.
3. Unsure? Ask the user.
# Update
Bump only if code or user says so; warn on majors.
# Safety
- ≥ 90 % confidence or prompt.
- No peer-dep fixes, no scripts, no reorder.
# Diff hygiene
Show only added/removed lines.
Begin reply: `package.json: +<n> −<n>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment