python-project-structure

Structure Python projects with explicit __all__ and flat directories.

4|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/AI-Foundry-Core/ril-agents --skill python-project-structure-ai-foundry-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-project-structure
Source: https://github.com/AI-Foundry-Core/ril-agents/tree/main/plugins/python-development/skills/python-project-structure
Command: npx skills add https://github.com/AI-Foundry-Core/ril-agents --skill python-project-structure-ai-foundry-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guideline helps developers design Python projects with clear module boundaries and well-defined public APIs, reducing churn and confusion as codebases grow.

Core Features & Use Cases

  • Establish explicit module interfaces using all and consistent naming conventions.
  • Promote flat directory structures and cohesive modules to simplify navigation, testing, and onboarding.
  • Use when starting new projects, reorganizing existing code, or designing reusable libraries for teams of varying sizes.

Quick Start

Create a Python project skeleton with a flat structure, explicit public API surfaces, and clear module boundaries following the guidance in this skill.

Frequently Asked Questions about python-project-structure

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

FAQPage Schema
How do I structure a Python project with clear module boundaries?

Structure a Python project by organizing code into flat directory structures with cohesive modules. This approach defines explicit public APIs and reduces churn as your codebase grows.

What is the best way to define a public API in a Python module?

Define a public API in Python modules by using the explicit __all__ variable. This establishes a clear, consistent interface that controls which names are exported and simplifies onboarding.

How do I reorganize an existing Python codebase to reduce confusion?

Reorganize existing Python code by flattening directory structures and setting explicit module boundaries. This reduces confusion and simplifies navigation, testing, and team onboarding.

Does Python packaging require a specific directory structure for reusable libraries?

Python packaging for reusable libraries benefits from flat directory structures and consistent conventions. This ensures clear module boundaries and well-defined public APIs across teams of varying sizes.

When should I use __all__ in my Python packages?

Use __all__ in Python packages when you need to establish explicit module interfaces. It defines the public API surface, preventing internal module names from leaking and reducing import churn.

Why does my Python project structure make onboarding difficult for new developers?

Python project structure makes onboarding difficult when module boundaries are unclear and directories are deeply nested. Applying flat structures and explicit naming conventions simplifies navigation immediately.