deps-check

List importers of a TypeScript or JavaScript file using madge with grep fallback.

58|5|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/mukiwu/muki-ai-plugins --skill deps-check-mukiwu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deps-check
Source: https://github.com/mukiwu/muki-ai-plugins/tree/main/plugins/shipshape-skills/skills/deps-check
Command: npx skills add https://github.com/mukiwu/muki-ai-plugins --skill deps-check-mukiwu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires madge, and includes scripts (resource) components.

What problem does it solve?

Developers often make changes to shared TypeScript or JavaScript files without knowing which parts of the codebase import them, creating "change A breaks B" regressions. deps-check quickly identifies downstream importers so you can assess impact and plan safe, staged edits.

Core Features & Use Cases

  • Project-root discovery: walks up to the nearest package.json to determine the repository root for accurate scanning.
  • Madge first, grep fallback: prefers madge --reverse for precise dependency graphs and falls back to a grep-based search across common source directories when madge is unavailable.
  • Targeted scope & guidance: only processes TS/JS files and summarizes importer counts with actionable strategies (safe to change, inspect a few files, or require deprecation/shims).
  • Use cases: renaming or moving exported symbols, changing function signatures or public APIs, preparing large refactors of shared libraries.

Quick Start

Run the deps-check script on the target TypeScript or JavaScript file to list its importers before editing.

Frequently Asked Questions about deps-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find who imports a file before refactoring TypeScript code?

To find who imports a file before refactoring TypeScript code, run a reverse dependency analysis to list all downstream importers. This identifies affected modules so you can assess impact and plan safe, staged edits.

What is reverse dependency analysis and when do I need it for JavaScript?

Reverse dependency analysis identifies which files import a specific module. You need it for JavaScript when renaming, moving, or changing exported function signatures to prevent change A breaks B regressions across shared libraries.

Does madge work with TypeScript for tracing import dependencies?

Yes, madge works with TypeScript for tracing import dependencies by building precise reverse dependency graphs. If madge is unavailable, a grep-based fallback searches common source directories.

What's the best way to assess impact before changing exported function signatures?

The best way to assess impact before changing exported function signatures is scanning for downstream importers. Summarizing importer counts provides actionable strategies like safe to change, inspect files, or require deprecation shims.

Can I use grep fallback for dependency analysis if madge is unavailable?

Yes, you can use a grep fallback for dependency analysis if madge is unavailable. The tool walks up to the nearest package.json for project-root discovery, then falls back to grep across common source directories.

Limitations of grep fallback for import tracing in JavaScript repositories?

The limitation of grep fallback for import tracing is reduced precision compared to madge. Grep searches common source directories for text matches, whereas madge builds accurate dependency graphs, making grep less reliable for complex refactoring.