scan-js-codebase

Maps Node.js project dependencies and exported symbols into a queryable graph.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ngmthaq/my-copilot --skill scan-js-codebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scan-js-codebase
Source: https://github.com/ngmthaq/my-copilot/tree/main/skills/scan-js-codebase
Command: npx skills add https://github.com/ngmthaq/my-copilot --skill scan-js-codebase

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Scans a Node.js project (JavaScript or TypeScript) to build a compact knowledge graph of file dependencies and exported symbols, storing it in the project's agent folder (.claude, .github, or .cursor) for use by GitHub Copilot, Claude Code, or any AI agent.

Core Features & Use Cases

  • Builds a compact knowledge graph of dependencies and exports for JS/TS projects, stored in an agent folder for later querying.
  • Supports context provisioning for AI copilots (GitHub Copilot, Claude Code) and for onboarding and impact analysis.
  • Useful for understanding imports, symbol definitions, and what breaks when modifying a module, or for onboarding new codebases.

Quick Start

Run the build-graph.js script from the project root to generate the knowledge-graph.json in your agent folder.

Frequently Asked Questions about scan-js-codebase

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

FAQPage Schema
How do I build a dependency graph for a Node.js project to use with AI agents?

To build a dependency graph for AI agents, you can scan a Node.js project to map file dependencies and exported symbols into a compact knowledge graph. This graph is stored in an agent folder like .claude or .cursor for querying.

What's the best way to provide codebase context for GitHub Copilot or Claude Code?

Providing codebase context for GitHub Copilot or Claude Code is best done by generating a compact knowledge graph of dependencies and exported symbols. This graph is saved to your project's agent folder for onboarding and impact analysis.

Can I use madge to map exported symbols and dependencies for TypeScript projects?

Yes, you can use madge to map exported symbols and dependencies for TypeScript projects. The scan supports both JavaScript and TypeScript, computing a dependency graph stored as a queryable JSON file in your agent folder.

How do I analyze the impact of modifying a module in a JavaScript codebase?

To analyze the impact of modifying a module in a JavaScript codebase, you can query a generated knowledge graph of file dependencies and exported symbols. This graph reveals what breaks when you change a module.

Do I need a specific agent folder to store the generated codebase knowledge graph?

You need an agent folder such as .claude, .github, or .cursor to store the generated codebase knowledge graph. Running the build script from the project root automatically outputs the graph to this directory.

How does a static dependency graph help with onboarding to a new codebase?

A static dependency graph helps with onboarding to a new codebase by mapping file dependencies and exported symbols into a compact structure. This provides immediate context on imports and symbol definitions for AI agents.