project-import-conventions

Enforce standardized import paths and test-mocking conventions in Python projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/drhayf/GUTTERS --skill project-import-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-import-conventions
Source: https://github.com/drhayf/GUTTERS/tree/main/.agent/skills/project-import-conventions
Command: npx skills add https://github.com/drhayf/GUTTERS --skill project-import-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Import path and test conventions across the codebase to prevent module-resolution errors and circular dependencies.

Core Features & Use Cases

  • Standardized import patterns for tests and scripts to avoid ambiguity between namespace prefixes.
  • Clear rules for relative imports within src/app and guidance for cross-module references.
  • Guidelines for test structure (module-level and integration) to improve reliability and discovery.

Quick Start

Apply the project import conventions to new modules and tests to ensure consistent import paths and reliable test mocks.

Frequently Asked Questions about project-import-conventions

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

FAQPage Schema
How do I fix circular imports and module-resolution errors in my Python project structure?

To fix circular imports and module-resolution errors, enforce standardized root-to-submodule import paths and consistent test-mocking conventions. This prevents ambiguity between namespace prefixes and ensures reliable module discovery across the codebase.

What is the best way to structure pytest mocks to avoid import ambiguity?

The best way to structure pytest mocks is applying standardized import patterns for tests and scripts. This avoids ambiguity between namespace prefixes and provides clear rules for test structure to improve reliability and discovery.

How do I configure relative imports within src/app without triggering circular dependencies?

To configure relative imports within src/app without triggering circular dependencies, apply clear rules for within-module references and use explicit root-to-submodule import paths. This standardizes cross-module references and prevents resolution failures.

Does this convention support adding new scripts and references as the Python project expands?

Yes, the convention supports project expansion by enumerating recommended locations for scripts, references, and assets. It requires explicit frontmatter name and description to maintain consistent import paths as new modules are added.

Why do my Python tests fail with namespace prefix ambiguity during module resolution?

Python tests fail with namespace prefix ambiguity when import paths lack standardization across the codebase. Enforcing root-to-submodule import conventions and clear test-mocking guidelines resolves this ambiguity and prevents module-resolution errors.