scan

Parse Python ASTs to build import graphs and symbol metadata.

24|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/Borda/AI-Rig --skill scan-borda
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scan
Source: https://github.com/Borda/AI-Rig/tree/main/plugins/codemap/skills/scan
Command: npx skills add https://github.com/Borda/AI-Rig --skill scan-borda

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the discovery of module dependencies and symbol relationships in Python projects by building a structured JSON index from Python source files.

Core Features & Use Cases

  • AST-based import graph extraction across all .py files.
  • Symbol metadata collection (classes, functions, methods) with line ranges.
  • Blast-radius metrics and incremental re-scans using --incremental.

Quick Start

Run the scanner to index your project by executing the scan-index script in the CLAUDE_PLUGIN_ROOT directory.

Frequently Asked Questions about scan

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

FAQPage Schema
How do I generate a Python import graph for a large codebase?

This Skill indexes Python codebases by parsing the AST to build an import graph, symbol metadata, and blast-radius metrics. It targets medium to large Python projects where reproducible module dependency views and symbol-level references support safe refactors and audits.

How do I extract symbol metadata like classes and functions from Python source files?

This Skill uses ast.parse to collect symbol metadata including classes, functions, and methods with their line ranges, writing the structured results to .cache/scan/<project>.json for reproducible audits.

Can I perform incremental code analysis scans on a Python project?

Yes, incremental scans are supported via the --incremental flag. This updates the existing JSON index by re-scanning only changed files, avoiding a full rebuild of the module dependency graph.

What Python version is required for AST-based code structure indexing?

Python 3.10 or higher is required for AST-based code structure indexing. The scanner uses the built-in ast.parse module to analyze source files and build the import graph without external dependencies.

How do I calculate blast-radius metrics for Python module refactoring?

Calculate blast-radius metrics by indexing the import graph and symbol-level references across the codebase. The scanner outputs these metrics to a JSON file, helping assess the impact of refactoring specific modules.

What is the best way to audit module dependencies in a medium to large Python project?

The best way to audit module dependencies is to index the codebase into a reproducible JSON graph. This AST-based approach captures import relationships and symbol metadata, providing a structured view for safe refactors and audits.