rules-src

Enforce coding standards and explicit typing for Python files in the src/ directory.

Updated May 20, 2025
One-click install
npx skills add https://github.com/flext-sh/flext --skill rules-src
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rules-src
Source: https://github.com/flext-sh/flext/tree/main/.claude/skills/rules-src
Command: npx skills add https://github.com/flext-sh/flext --skill rules-src

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that common source code modules used across multiple packages adhere to defined architectural boundaries, import rules, and typing standards, preventing fragile and hard-to-maintain code.

Core Features & Use Cases

  • Code Quality Enforcement: Automatically checks for and prevents common anti-patterns in shared Python source files.
  • Dependency Management: Enforces explicit imports and avoids wildcard imports to maintain clear dependencies.
  • Use Case: When modifying core utility functions in src/flext/, this Skill will verify that changes do not introduce private imports or violate established architectural contracts, ensuring stability for all dependent packages.

Quick Start

Run the make check PROJECT=flext-core command to verify linting and type checking for shared source modules.

Frequently Asked Questions about rules-src

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

FAQPage Schema
How do I enforce Python source code standards in a shared src directory?

To enforce Python source code standards in a shared src directory, you can use linting checks that prevent wildcard imports and require explicit typing. This maintains architectural integrity and stability across dependent packages.

Why should I avoid wildcard imports in shared Python modules?

You should avoid wildcard imports in shared Python modules to maintain clear dependencies and architectural boundaries. Wildcard imports make code fragile and hard to maintain by obscuring where specific functions and classes originate.

How do I check linting and type checking for shared source modules?

You can check linting and type checking for shared source modules by running `make check PROJECT=flext-core`. This command verifies that your Python files adhere to defined module patterns and public contracts.

Can I verify architectural boundaries when modifying core utility functions?

Yes, you can verify architectural boundaries when modifying core utility functions in `src/flext/`. The verification process ensures changes do not introduce private imports or violate established architectural contracts for dependent packages.

What are the limitations of automated code quality enforcement for Python?

Automated code quality enforcement for Python is limited to files within the `src/` directory and targets specific anti-patterns like wildcard imports and missing explicit typing. It requires adherence to predefined module patterns to function correctly.