conditional-imports

Community

Transform conditional imports into robust, protocol-based Python code.

Authorpaudley
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps fix Python code that relies on conditional imports, type-checking branches, or hiding dependencies, enabling clearer, more reliable module boundaries.

Core Features & Use Cases

  • Identify conditional import patterns such as if TYPE_CHECKING or try-except import blocks.
  • Refactor codebases to replace conditional dependencies with explicit protocols and dependency inversion principles.
  • Use Case: A developer notices cyclic import issues caused by environment-dependent imports and wants to enforce consistent, environment-agnostic dependencies across modules.

Quick Start

Use this Skill to convert conditional import statements into strict, Protocol-based interfaces appropriate for production code.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: conditional-imports
Download link: https://github.com/paudley/coding-ethos/archive/main.zip#conditional-imports

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.