/python-standards:python-standardsfrom python-standards
Org-wide Python coding standards covering clean-code principles (SOLID, DRY, KISS, YAGNI), FastAPI project architecture/layout, naming conventions, secure coding (OWASP-aligned), and linting/testing setup. Use this whenever writing, reviewing, structuring, or refactoring ANY Python code or Python project — new modules, API endpoints, class design, file/folder layout, variable/function/class names, auth or input-handling code, or CI/lint config. Trigger even for small tasks like "name this function," "where should this file go," or "is this endpoint secure," not just explicit requests for "standards" or "guidelines." For FastAPI/Flask/Django web projects specifically, always consult architecture.md and secure-coding.md before proposing a structure or writing auth/data-handling code.
Ships in python-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Five reference documents, bundled in references/, encode this org's Python conventions. Read the specific file(s) relevant to the task at hand — don't guess from memory, and don't load all five for a one-line naming question.
| File | Read it when the task involves... |
|---|---|
references/coding-principles.md | Class/function design, refactoring, deciding whether to split responsibilities, inheritance vs. composition, applying SOLID/DRY/KISS/YAGNI, error-handling patterns |
references/architecture.md | Starting a new FastAPI project, deciding where a new file/module belongs, project-wide layout, dependency/tooling setup (Poetry, pre-commit) |
references/naming.md | Naming any variable, function, class, file, module, package, route, template, or env var |
references/secure-coding.md | Anything touching auth, sessions/tokens, user input, file uploads, SQL, templates/XSS, CORS, secrets, or deployment config |
references/testing.md | Writing tests, or setting up linting/formatting tooling (black, ruff/flake8, isort, mypy) |
Multiple files often apply to one task — e.g., adding a login endpoint touches architecture (where it lives), naming (route/function names), and secure-coding (auth handling) all at once. Read each relevant file rather than picking one.
Use this to sanity-check trivial cases without opening a file; open the file itself for anything non-trivial or before writing real code.
Design principles (coding-principles.md)
elif (OCP).self.x.y(), not self.x.y.z.w()) — Law of Demeter.Triangle(Rectangle) needs to override the area formula, it shouldn't inherit from Rectangle at all.Architecture (architecture.md)
app/api/v1/, business logic in app/services/, SQLAlchemy models in app/models/, Pydantic schemas in app/models/schemas/, JWT/permissions in app/auth/, cross-cutting config in app/core/.tests/.pyproject.toml + dedicated config files at repo root; pre-commit enforces it.Naming (naming.md)
snake_case: variables, functions, files, modules. PascalCase: classes. UPPER_SNAKE_CASE: constants.is_/has_/should_/can_/was_.Error.test_<function>_<scenario>_<expected_outcome>./users/), not verbs; hyphens for multi-word paths (/reset-password/).data, info, flag, status, handle, process, x/y/temp as real names — see anti-pattern table in the file for the specific swap.Security (secure-coding.md)
bcrypt/argon2; JWTs short-TTL, never exposed to JS.eval/exec/pickle.loads/os.system/unsanitized subprocess.DEBUG=False in production; HTTPS + HSTS + standard security headers everywhere.Testing & linting (testing.md)
black formats, ruff/flake8 lints, isort sorts imports, mypy type-checks..flake8, pyproject.toml, mypy.ini); enforced via pre-commit + CI.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub harshitmywork17/claude-mods --plugin python-standards