agentleFS
hugobatistahugobatista/agent-skills/skills/python/python-project/SKILL.md

python-project

Skill1 starsChanged 53 days agoMITView on GitHub

Use when writing, reviewing, or modifying Python code (*.py files). Covers Typer CLI, FastAPI, pytest, uv + hatch, 100% coverage. When creating a new Python project, also load the python-ci skill for CI setup and the python-devcontainer skill for devcontainer setup.

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CLI: use Typer — always fetch latest docs

    line 11
  2. Distinctive:

    Web API: use FastAPI — always fetch latest docs

    line 12
  3. Distinctive:

    No docstrings on tests — test function names must be descriptive enough to stand alone

    line 28
  4. Distinctive:

    No inline comments for self-explanatory code — names and types are the documentation.

    line 29
  5. Very specific:

    When creating a new Python project, write a .gitignore to the project root:

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frameworks & Libraries

  • CLI: use Typer — always fetch latest docs
  • Web API: use FastAPI — always fetch latest docs
  • Dependencies: pyproject.toml + uv. Pin the tool version with required-version in [tool.uv], exclude fresh deps with exclude-newer = "30 days", and declare the package index explicitly with [[tool.uv.index]] (explicit = true). For production Docker images, export locked deps with uv export --no-dev --no-emit-project -o requirements.txt and install with pip install --require-hashes.
  • Build: hatchling; use hatch when needed
  • Structure: packages over monolithic files; no module > 500 lines; no name-prefix modules

Testing & Coverage

  • 100% coverage required; no # pragma: no cover or # type: ignore — fix the root cause instead (cast, explicit annotation, restructure). The only exception is inherently untypeable code (e.g. SQLAlchemy dynamic attribute access), and even then prefer cast() or a typed helper.
  • Tests for all new features, bug fixes, critical paths, and edge cases (empty inputs, invalid types, large datasets)

Code Standards

  • PEP 8; 4-space indent; 79-char line limit; English only regardless of prompt language
  • Type hints on all functions; typing module for annotations
  • PEP 257 docstrings on public API only — private functions (_name) only if logic is non-obvious
  • No docstrings on tests — test function names must be descriptive enough to stand alone
  • No inline comments for self-explanatory code — names and types are the documentation; comment why, not what
  • Descriptive names; break complex functions into smaller ones
  • Handle edge cases explicitly; document design decisions in comments

Project scaffolding

When creating a new Python project, write a .gitignore to the project root:

# Python
__pycache__/
*.pyc
*.pyo

# Virtual environment
.venv/

# Tools
.mypy_cache/
.pytest_cache/
.ruff_cache/

# Coverage
.coverage
coverage/
coverage.xml
htmlcov/

# Build
dist/
build/
*.egg-info/

# Environment
.env

Documentation example


def calculate_area(radius: float) -> float:
    """Return the area of a circle with the given radius."""
    import math
    return math.pi * radius ** 2

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.