agentleFS
NicoGentiNicoGenti/opencode-orchestrator-kit/skills/examples/python-conventions/SKILL.md

python-conventions

Skill9 starsChanged 8 days agoMITView on GitHub

Python style and structure conventions based on PEP 8. Load before implementing or reviewing any pyproject.toml/requirements.txt-based feature.

7 other projects use 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. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Always use self as the first argument of instance methods [web:84].

    line 17
  2. Very specific:

    Prefer one import per line.

    line 30
  3. Distinctive:

    Use type hints on public function signatures.

    line 34
  4. Distinctive:

    Use docstrings for modules, classes, and public functions describing purpose, not implementation.

    line 35
  5. Distinctive:

    Keep functions focused; if a function mixes multiple responsibilities, split it.

    line 36

“Common” is measured: kept by at least 6 in 10 of the 7 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 Conventions

Based on PEP 8, the official Python style guide [web:74].

Naming

  • lower_case_with_underscores for functions and variables [web:87].
  • CapitalizedWords (PascalCase) for classes [web:87].
  • UPPERCASE_WITH_UNDERSCORES for constants [web:87].
  • Always use self as the first argument of instance methods [web:84].

Formatting

  • 4 spaces per indentation level; never mix tabs and spaces [web:74][web:84].
  • Limit lines to 79 characters for code, 72 for docstrings/comments — relax this ceiling only if the project's linter config already does (e.g., Black's 88-char default) [web:74].
  • Two blank lines around top-level functions and classes; one blank line between methods inside a class [web:74].
  • One space around operators; no space immediately inside parentheses/brackets [web:87].
  • Pick one quote style (single or double) and use it consistently across the codebase [web:87].

Imports

  • Order: standard library, then third-party, then local application imports, each group separated by a blank line [web:87][web:84].
  • Prefer one import per line; use explicit from module import name only when it improves clarity.

Structure

  • Use type hints on public function signatures.
  • Use docstrings for modules, classes, and public functions describing purpose, not implementation.
  • Keep functions focused; if a function mixes multiple responsibilities, split it.

When Reviewing

Flag mixed tabs/spaces, inconsistent quote style, and missing type hints on public APIs ahead of line-length nits if the project has its own formatter (Black/Ruff) already configured — defer to that tool's config over strict PEP 8 line length.

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.