trace-python-code-dependencies

Map Python class, method, enum, and import dependencies using ripgrep.

Updated May 15, 2026
One-click install
npx skills add https://github.com/ruskibeats/t1d --skill trace-python-code-dependencies
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trace-python-code-dependencies
Source: https://github.com/ruskibeats/t1d/tree/main/.pi/skills-archive/trace-python-code-dependencies
Command: npx skills add https://github.com/ruskibeats/t1d --skill trace-python-code-dependencies

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you trace class definitions, method declarations, type enums, and import dependencies across a Python codebase, making it easier to understand module relationships and find where types are defined vs used.

Core Features & Use Cases

  • Dependency Mapping: Map dependencies between modules and understand which service imports which type.
  • Definition vs Usage: Find where a class, method, type enum, or function is defined, imported, or used.
  • Refactoring Assistance: Discover all callers of a method before refactoring to ensure changes are complete.
  • Import Chain Analysis: Identify import chains across a codebase and verify type enum values and their usages.
  • Lazy/Local Imports: Resolve lazy/local imports and understand deferred import patterns.

Quick Start

Use the trace-python-code-dependencies skill to find the definition of the GraphEdgeType class in your codebase.

Frequently Asked Questions about trace-python-code-dependencies

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

FAQPage Schema
How do I trace Python code dependencies across a large project?

To trace Python code dependencies, this Skill uses ripgrep and read to map class definitions, method declarations, type enums, and import statements. It identifies module relationships and locates where types are defined versus used across your Python project.

What is the best way to map module relationships and import chains in Python?

Mapping module relationships in Python involves analyzing import chains to verify type enum values and their usages. This Skill resolves both standard and lazy or local imports to help you understand deferred import patterns across your codebase.

How do I find all callers of a method before refactoring Python code?

Finding all callers of a method before refactoring Python code requires tracing its definition and usage. This Skill discovers where classes, methods, and functions are defined, imported, or used to ensure your refactoring changes are complete.

Can I resolve lazy or local imports in a Python codebase?

Yes, you can resolve lazy or local imports in a Python codebase. This Skill analyzes deferred import patterns alongside standard import statements to help you fully understand complex module relationships and import chains.

Does this Python dependency mapping tool work for complex projects?

Yes, this Python dependency mapping tool is designed for software engineers working on complex projects. It traces class definitions and type enums using ripgrep to improve code maintainability and clarify module relationships.