python-project-structure

python-project-structure is a skill for Claude Code from Jartan-LLC/grimoire. It costs 17 tokens per session (1,482 once invoked), scanned A, a copy of python-project-structure, MIT.

Guidance for arranging Python files and modules so related code stays together and the parts other code may use are clearly defined. A module is a Python file or group of files with a focused purpose.

In plain words
What is it for?
Use it when starting or reorganizing a Python project, deciding where code belongs, defining public APIs, or keeping directory structures manageable.
Why use it?
It reduces the time spent searching through a project and makes changes less likely to affect unrelated code. It also clarifies which functions and classes form the public interface.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the pythonica plugin — 17 skills shipped together

Good fit Use it when starting or reorganizing a Python project, deciding where code belongs, defining public APIs, or keeping directory structures manageable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jartan-llc/grimoire/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 Jartan-LLC/grimoire --skill python-project-structure
Clone the repo
git clone --depth 1 https://github.com/Jartan-LLC/grimoire

Made for: Claude Code.

Or install pythonica, the plugin that ships this one along with the rest of its 17 skills.

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/jartan-llc/grimoire/python-project-structure/github.svg)](https://agentmods.dev/skills/jartan-llc/grimoire/python-project-structure)
Your own site
<a href="https://agentmods.dev/skills/jartan-llc/grimoire/python-project-structure"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/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/jartan-llc/grimoire/python-project-structure"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/python-project-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,482 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.
Origin 89% copy Near-identical to another mod 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.00017 $0.01482
Opus 5.5 $0.00007 $0.00593
Sonnet 5.5 $0.00003 $0.00296
Haiku 4.5 $0.00002 $0.00148

Measured 1mo ago against content hash 338ce5eaa9d9, 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 1mo 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

This is a copy

89% identical to python-project-structure — 135 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/pythonica/skills/python-project-structure/SKILL.md · 248 lines

How it starts

The opening of the file, as written. The whole thing — 248 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.

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
"""Business services: the user and order workflows over the repositories."""

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 · 248 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed · +2 lines 338ce5eaa9d9
  2. 3mo ago First seen · 246 lines · 17 tokens per session scan A 0fcade63879a

Subscribe to this mod's changes

python-project-structure is a skill published in the GitHub repository Jartan-LLC/grimoire (4 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 1,482 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to python-project-structure, differing in 135 lines, and is treated as a copy.

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-structureJartan-LLC/grimoireSkill4todayMITA17Claude Code
optimize-for-gpuK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA151Claude Code, Codex
astropyK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA56Claude Code, Codex
daskK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA67Claude Code
matlabK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA44Claude Code
polarsK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA47Claude Code
bioservicesK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA56Claude Code