python-project-structure

python-project-structure is a skill for Claude Code, Codex from RudyCity/superagent. It costs 39 tokens per session (1,503 once invoked), scanned A, original, MIT.

A guide to arranging Python projects into clear modules, directories, and public interfaces. A public interface is the part of a module that other code is intended to use.

In plain words
What is it for?
Use it to start or reorganize projects, design directory layouts, define module exports with __all__, place tests, and create reusable packages.
Why use it?
It makes code easier to find and changes more predictable. Clear boundaries also help prevent unrelated responsibilities from becoming mixed together.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to start or reorganize projects, design directory layouts, define module exports with all, place tests, and create reusable packages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rudycity/superagent/python-project-structure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RudyCity/superagent --skill python-project-structure
Clone the repo
git clone --depth 1 https://github.com/RudyCity/superagent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-project-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/rudycity/superagent/python-project-structure/github.svg)](https://agentmods.dev/skills/rudycity/superagent/python-project-structure)
Your own site
<a href="https://agentmods.dev/skills/rudycity/superagent/python-project-structure"><img src="https://agentmods.dev/badge/skills/rudycity/superagent/python-project-structure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-project-structure

Your own site · 80×15
<a href="https://agentmods.dev/skills/rudycity/superagent/python-project-structure"><img src="https://agentmods.dev/badge/skills/rudycity/superagent/python-project-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01503
Opus 5.5 $0.00016 $0.00601
Sonnet 5.5 $0.00008 $0.00301
Haiku 4.5 $0.00004 $0.00150

Measured 2mo ago against content hash c53696fb8d90, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-project-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/python-project-structure/SKILL.md · 253 lines

How it starts

The opening of the file, as written. The whole thing — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Project Structure & Module Architecture

Design well-organized Python projects with clear module boundaries, explicit public interfaces, and maintainable directory structures. Good organization makes code discoverable and changes predictable.

When to Use This Skill

  • Starting a new Python project from scratch
  • Reorganizing an existing codebase for clarity
  • Defining module public APIs with __all__
  • Deciding between flat and nested directory structures
  • Determining test file placement strategies
  • Creating reusable library packages

Core Concepts

1. Module Cohesion

Group related code that changes together. A module should have a single, clear purpose.

2. Explicit Interfaces

Define what's public with __all__. Everything not listed is an internal implementation detail.

3. Flat Hierarchies

Prefer shallow directory structures. Add depth only for genuine sub-domains.

4. Consistent Conventions

Apply naming and organization patterns uniformly across the project.

Quick Start

myproject/
├── src/
│   └── myproject/
│       ├── __init__.py
│       ├── services/
│       ├── models/
│       └── api/
├── tests/
├── pyproject.toml
└── README.md

Fundamental Patterns

Pattern 1: One Concept Per File

Each file should focus on a single concept or closely related set of functions. Consider splitting when a file:

  • Handles multiple unrelated responsibilities
  • Grows beyond 300-500 lines (varies by complexity)
  • Contains classes that change for different reasons
# Good: Focused files
# user_service.py - User business logic
# user_repository.py - User data access
# user_models.py - User data structures

# Avoid: Kitchen sink files
# user.py - Contains service, repository, models, utilities...

Pattern 2: Explicit Public APIs with __all__

Define the public interface for every module. Unlisted members are internal implementation details.

# mypackage/services/__init__.py
from .user_service import UserService
from .order_service import OrderService
from .exceptions import ServiceError, ValidationError

__all__ = [
    "UserService",
    "OrderService",
    "ServiceError",
    "ValidationError",
]

# Internal helpers remain private by omission
# from .internal_helpers import _validate_input  # Not exported

Read the full file on GitHub · 253 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 253 lines · 39 tokens per session scan A c53696fb8d90

Subscribe to this mod's changes

python-project-structure is a skill published in the GitHub repository RudyCity/superagent (73 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 1,503 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

python-project-structure compared with skills from other repositories

python-project-structure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-project-structureRudyCity/superagentSkill73yesterdayMITA39Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA44Claude Code
pennylaneK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA74Claude Code
holoscan-install-wheelNVIDIA/skillsSkill4.2ktodayApache-2.0A34Claude Code, Codex
python-engineering-guidelinesanywhere-labs/Agents-AnywhereSkill3.9kyesterdayApache-2.0A75Codex
future-self-liteTHU-MAIC/OpenMAICSkill45ktodayMITA20Claude Code, Codex
rocm-kernelshuggingface/kernelsSkill796todayApache-2.0A93Claude Code