import-resolution

Identify and fix Python import errors and validate __init__.py exports.

Updated Jan 3, 2026
One-click install
npx skills add https://github.com/GaryOcean428/pantheon-chat --skill import-resolution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-resolution
Source: https://github.com/GaryOcean428/pantheon-chat/tree/main/skills/import-resolution
Command: npx skills add https://github.com/GaryOcean428/pantheon-chat --skill import-resolution

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect and fix Python import errors, validate init.py barrel exports, and enforce canonical absolute import patterns. Use when reviewing imports, fixing circular dependencies, or validating module structure in qig-backend/.

Core Features & Use Cases

  • Validate that imports use absolute paths to prevent circular dependencies and maintain clear module boundaries.
  • Identify and reduce relative imports, promoting stable structure across Python packages.
  • Verify init.py exports and all coverage to ensure predictable module interfaces.

Quick Start

Run an audit of the Python project to enforce canonical imports and correct barrel exports.

Frequently Asked Questions about import-resolution

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

FAQPage Schema
How do I fix circular dependencies caused by relative imports in Python?

Resolve circular dependencies by enforcing canonical absolute import paths and reducing relative imports. This stabilizes Python package structure and maintains clear module boundaries to prevent import cycles.

How do I validate __init__.py barrel exports and __all__ coverage in a Python project?

Validate __init__.py barrel exports by running static analysis checks to verify __all__ coverage. This ensures predictable module interfaces and confirms that all intended package exports are explicitly declared.

What is the best way to enforce absolute imports across a Python backend codebase?

Enforce absolute imports by running a static analysis audit that flags relative import patterns and validates module structure. This enforces canonical absolute paths and maintains clear boundaries across Python projects.

Does this import resolution approach work for reviewing existing Python backend codebases?

Yes, import resolution applies directly to reviewing Python backend codebases. It detects existing import errors, validates module structure, and corrects barrel exports to enforce canonical import patterns.

Why do I need static analysis to check Python module exports and import paths?

Static analysis is needed to script validation steps that automatically identify import errors and verify __init__.py exports. It enforces canonical absolute imports without executing code, catching structural issues early.

What are the limitations of using static analysis for Python import resolution?

Static analysis limitations include validating only import patterns and export structure without runtime execution. It enforces canonical absolute imports and barrel exports but cannot detect dynamic import behaviors or circular dependencies resolved at runtime.