python-packaging
Skill36 starsChanged 6 months agoMITView on GitHub
Python project structure patterns — pyproject.toml for services and internal tools, source vs flat layout, CLI entry points with Click/argparse, dynamic versioning, and editable installs. Use when structuring a new Python project or building internal CLI tools.
- Installs packages
9 other projects use a version of this.
Adopted by
Most recently taken up by
- Quad4-Software/skillstheir own version, first seen Oct 3, 2026
- Paldom/python-skillstheir own version, first seen Sep 10, 2026
- 2867203296/hermes-agenttheir own version, first seen Aug 19, 2026
- AntheaLaffy/missing-semester-skills-dshtheir own version, first seen Aug 16, 2026
- AntheaLaffy/the-missing-semester-skillstheir own version, first seen Aug 16, 2026
- drzioner/gitwisetheir own version, first seen Jul 22, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- xfstudio/skills★ 9same name
- Paldom/python-skills★ 3same name
- ai4brands-design/claude-skills★ 2same name
- CodeWithBehnam/cc-docs★ 2same name
- AntheaLaffy/the-missing-semester-skills★ 1same name
- drzioner/gitwise★ 1same name
- Quad4-Software/skills★ 1same name
- 2867203296/hermes-agent★ 0same name
- AntheaLaffy/missing-semester-skills-dsh★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository157 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a2ui-angularSkill
- accessibility-auditSkill
- adk-deploy-guideSkill
- adk-dev-guideSkill
- adk-eval-guideSkill
- adk-observability-guideSkill
- agentic-ai-coding-standardSkill
- agentic-ai-devSkill
- ai-auditSkill
- ai-chatSkill
- ai-decision-recordSkill
- ai-incident-responseSkill
- ai-launch-checkSkill
- ai-playbookSkill
- angular-best-practicesSkill
- angularSkill
- angular-spaSkill
- angular-ui-patternsSkill
- api-design-principlesSkill
- app-store-optimizationSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-designSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-release-flowSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-testflight-orchestrationSkill
- browser-testingSkill
- changelog-generatorSkill
- claude-actions-auditorSkill
- clean-codeSkill
- codebase-onboardingSkill
- code-explainerSkill
- code-reviewerSkill
- code-simplifierSkill
- comment-analyzerSkill
- database-schema-designerSkill
- ddd-architectSkill
- decision-frameworksSkill
- dedup-code-agentSkill
- deployment-ci-cdSkill
- design-systemSkill
- dockerSkill
- documentation-generationSkill
- domain-finderSkill
- error-detectiveSkill
- eval-guideSkill
- feature-forgeSkill
- firebase-basicsSkill
- firebase-hosting-basicsSkill
- fixing-accessibilitySkill
- fixing-motion-performanceSkill
- flutter-animationsSkill
- flutter-genuiSkill
- flutter-mobileSkill
- flutter-security-expertSkill
- The first 60 shown.
The file
Files
Iron Law
USE SOURCE LAYOUT (src/) FOR ALL SERVICES AND INSTALLABLE TOOLS — flat layout works for scripts but causes import confusion in larger projects and CI environments
Python Packaging
Project structure patterns for Python 3.14 services, internal tools, and CLI applications.
Scope
This skill covers the workspace-relevant subset of Python packaging:
pyproject.tomlstructure for FastAPI services and internal tools- Source layout vs flat layout decision
- CLI entry points (Click, argparse) for internal tooling
- Dynamic versioning
- Editable installs for development
Out of scope for this workspace: PyPI publishing, wheels, namespace packages, C extensions, private package index. The workspace builds services and internal tools, not distributable libraries.
Layout Decision
New project?
│
├── FastAPI service / internal service
│ └── Source layout: src/<package>/ ← default for all services
│
├── Internal CLI tool (deployment scripts, data tools)
│ └── Source layout with [project.scripts] entry point
│
└── Quick one-off script
└── Flat layout (single .py file or simple directory)Reference File
Load resources/implementation-playbook.md for:
- Source layout pattern (Pattern 1) — full directory structure with init.py placement
- Flat layout pattern (Pattern 2) — when appropriate
- Full pyproject.toml template (Pattern 4) — with all modern metadata fields
- Dynamic versioning with
setuptools-scm(Pattern 5) - CLI with Click (Pattern 6) — entry points, commands, options
- CLI with argparse (Pattern 7) — subcommands, arguments
- Editable install (Pattern 16) —
uv pip install -e .for development
Key pyproject.toml Sections
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-service"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
"fastapi>=0.135.2",
"pydantic>=2.0.0",
]
[project.scripts]
my-cli = "my_package.cli:main" # CLI entry point
[tool.hatch.build.targets.wheel]
packages = ["src/my_package"]CLI Entry Point Pattern
# src/my_tool/cli.py
import click
@click.group()
def main():
"""Internal deployment tool."""
pass
@main.command()
@click.argument("environment")
@click.option("--dry-run", is_flag=True)
def deploy(environment: str, dry_run: bool):
"""Deploy to environment."""
click.echo(f"Deploying to {environment} (dry_run={dry_run})")
if __name__ == "__main__":
main()Install and run: uv pip install -e . then my-cli deploy staging --dry-run
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

