rules-pkg

Enforce Python package metadata and structure rules within the pkg/ directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill enforces consistent package metadata and clear structural boundaries within the pkg/ directory, preventing layer mixing and ensuring maintainability.

Core Features & Use Cases

  • Metadata Consistency: Ensures package names and versions align with workspace standards.
  • Layer Enforcement: Maintains clear separation between domain, infrastructure, and plugin code.
  • Use Case: When developing a new Python package within the pkg/domain/ directory, this Skill will verify that its metadata is correctly formatted and that it doesn't accidentally include infrastructure-specific code.

Quick Start

Run make check PROJECT=<your-project-name> to verify package rules.

Frequently Asked Questions about rules-pkg

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

FAQPage Schema
How do I enforce consistent Python package metadata in a monorepo?

To enforce consistent Python package metadata, you need rules that verify package names and versions align with workspace standards. This maintains clear separation between domain, infrastructure, and plugin code within the pkg/ directory.

What is the best way to prevent layer mixing in Python package structures?

Preventing layer mixing requires structural boundary enforcement within your pkg/ directory. By validating package descriptors and plugin manifests, you ensure domain code remains separate from infrastructure-specific code.

How do I verify Python packaging rules for my project?

You verify Python packaging rules by running the command make check PROJECT=<your-project-name>. This triggers code quality gates that validate package metadata formatting and structural consistency deterministically.

Can I use package structure rules for PyPI publishing preparation?

Yes, package structure rules support PyPI publishing preparation by ensuring deterministic build processes. Validating package descriptors and metadata consistency beforehand prevents packaging failures during CI/CD pipelines.

Why does my Python package build fail code quality gates?

Python package builds fail code quality gates when package metadata is incorrectly formatted or when infrastructure-specific code accidentally leaks into domain directories. Enforcing structural boundaries resolves these deterministic build failures.