agentleFS
jdharmonjdharmon/skills/python/SKILL.md

python

Skill0 starsChanged 37 days agoMITView on GitHub

Python conventions built entirely on uv. Use whenever installing Python packages, creating or activating a virtual environment, installing or running a Python CLI tool, choosing or pinning an interpreter version, running a Python script, setting up a new Python project, or adding dependencies to an existing one. Also use when about to write any pip, pipx, pyenv, poetry, virtualenv, or `python -m venv` command — those are all replaced here.

  • Installs packages

53 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use android-kotlin, java and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • alinaqiSkill

    android-kotlin

    Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing

    Also in 4 projects that use this

  • testdino-hqSkill

    java

    Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.

    Also in 6 projects that use this

  • testdino-hqSkill

    cpp

    Google's official C++ style guide. Covers headers, naming conventions, formatting, classes, memory management, RAII, smart pointers, and modern C++ features.

    Also in 5 projects that use this

  • ffsshhttiikkSkill

    flutter

    Flutter cross-platform framework

    Also in 4 projects that use this

  • mcollinaSkill

    node

    Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.

    Also in 4 projects that use this

  • VercelSkill

    react

    React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.

    Also in 7 projects that use this

  • +1 more from testdino-hq

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 47 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never invoke pip, pipx, poetry, pyenv, virtualenv, or python -m venv directly.

    line 12
  2. Very specific:

    Commit pyproject.toml and uv.lock.

    line 43
  3. Very specific:

    Prefer this over a bare venv even for small things — the lockfile makes the environment reproducible, and uv run removes any question of …

    line 45
  4. Very specific:

    Only when a pyproject.toml is not appropriate, such as an existing requirements.txt repo you don't own:

    line 49
  5. Distinctive:

    Never install something permanently just to run it once.

    line 63
  6. Distinctive:

    Prefer uv-managed standalone builds over whatever Python the OS ships:

    line 87

“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “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

Python

uv is the only entry point for Python work: packages, tools, virtual environments, and interpreters.

The rule that matters: nothing is ever installed into a system or user-level site-packages. Every package lives in either a project venv or a uv-managed tool venv. A system Python that has been written to is contaminated and hard to clean up, so treat the boundary as absolute rather than as a default to be overridden when convenient.

Never invoke pip, pipx, poetry, pyenv, virtualenv, or python -m venv directly.

Replacements

Instead ofUse
python3 -m venv .venv, virtualenvuv venv
pip install <pkg>uv add <pkg> (project) or uv pip install <pkg> (bare venv)
pip install -r requirements.txtuv pip install -r requirements.txt
pip uninstall <pkg>uv remove <pkg> or uv pip uninstall <pkg>
pip freeze, pip listuv pip freeze, uv pip list
pipx install <tool>uv tool install <tool>
pipx run <tool>uvx <tool>
pyenv install 3.13uv python install 3.13
pyenv local 3.13uv python pin 3.13
python script.pyuv run script.py
source .venv/bin/activatenot needed — uv run and uv pip auto-detect ./.venv

Projects (preferred)

Anything with — or deserving — a pyproject.toml. uv creates and manages .venv for you.

uv init                 # new project
uv add <package>        # dependency (updates pyproject.toml + uv.lock)
uv add --dev <package>  # dev-only dependency
uv remove <package>
uv sync                 # reconcile .venv with uv.lock
uv run <command>        # run inside the project env

Commit pyproject.toml and uv.lock. Never commit .venv/.

Prefer this over a bare venv even for small things — the lockfile makes the environment reproducible, and uv run removes any question of which interpreter is active.

Bare virtual environments

Only when a pyproject.toml is not appropriate, such as an existing requirements.txt repo you don't own:

uv venv                            # creates ./.venv
uv pip install <package>           # installs into ./.venv, no activation needed
uv pip install -r requirements.txt

uv pip resolves the target environment from ./.venv or $VIRTUAL_ENV. If neither exists it errors rather than falling back to system Python — that failure is correct behavior, so create a venv instead of reaching for --system.

Watch for an inherited VIRTUAL_ENV from an unrelated directory; it wins over ./.venv and will silently install into the wrong environment. Check it before installing if the shell state is uncertain.

One-off scripts and tools

Never install something permanently just to run it once.

uvx ruff check .                 # run a CLI tool in a throwaway env
uv tool install ruff             # install a CLI tool persistently, in its own venv
uv run --with httpx script.py    # ad-hoc dep; does not touch the project env
uv run --no-project script.py    # run ignoring any surrounding project

uv tool install gives each tool its own isolated venv and links only the executable onto PATH, so tools never share a dependency graph with each other or with a project.

For standalone scripts, prefer PEP 723 inline metadata so dependencies travel with the file:

# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx"]
# ///

Then uv run script.py builds the environment on demand — no project, no venv to manage.

Interpreters

Prefer uv-managed standalone builds over whatever Python the OS ships:

uv python install 3.13   # download a managed interpreter
uv python pin 3.13       # write .python-version for this project
uv python list

Set UV_MANAGED_PYTHON=1 (or pass --managed-python) to make uv refuse to fall back to a system interpreter.

Never

  • sudo pip, sudo uv, or any install as root
  • pip install --user, pip install --break-system-packages
  • uv pip install --system — installs into the system interpreter and defeats the point
  • Modifying the Homebrew or OS-vendored Python in any way
  • Committing .venv/

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.