python-standards

A set of enterprise coding standards for Python applications using FastAPI, Django, Django REST Framework, or Flask. It defines code style, project layers, typing, logging, security, database access, errors, and tests.

In plain words
What is it for?
It guides work on Python APIs and services, including choosing the correct framework instructions, organizing API-to-database layers, handling errors, logging, securing endpoints, and writing tests.
Why use it?
It gives generated and reviewed code consistent rules to follow across a Python project. This reduces inconsistent structure, unsafe shortcuts, and missing tests or type information.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rishapgandhi/python-skills/python-standards
Any agent
npx skills add rishapgandhi/python-skills --skill python-standards
Clone the repo
git clone --depth 1 https://github.com/rishapgandhi/python-skills

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.00503
Opus 5 $0.00008 $0.00251
Sonnet 5 $0.00003 $0.00101
Haiku 4.5 $0.00002 $0.00050

Measured yesterday against content hash 9a9135d7ff42, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/python-standards/SKILL.md · 71 lines

What it actually says

Python AI-SDLC Standards

Overview

This skill provides the AurigaIT Python enterprise coding standards. All code generated must follow these standards.

Prerequisites

  • Python 3.11+ project
  • One of: FastAPI, Django, DRF, or Flask

Instructions

Before Writing Code

  1. Read skills/common/code-style.md — always loaded.
  2. Identify the framework and read skills/{framework}/SKILL.md.
  3. Follow layer discipline: API → Service → Repository → Model.

Non-Negotiable Rules

  • 4 spaces indentation, no tabs
  • Full type annotations on all function signatures
  • No hardcoded secrets — pydantic-settings only
  • structlog for all logging — never print()
  • ORM/repository for DB access — no raw SQL unless parameterised
  • Tests mandatory — 80% coverage minimum
  • All endpoints authenticated unless explicitly public
  • Never bare except: — catch specific exceptions
  • Monetary values: Decimal, never float

Skill Files

Load from skills/common/ based on task:

Task File
Any Python code-style.md
New project folder-structure.md
Errors error-handling.md
Logging logging.md
Security security.md, api-auth.md
Tests testing.md
Database db-design.md, data-migrations.md
Performance performance.md
CI/CD ci-cd.md
Deploy deployment.md
Monitoring observability.md
Async/Events async-patterns.md
Multi-service microservices.md
Feature flags feature-flags.md
Dependencies dependency-management.md
LLM/AI llm-patterns.md

Rules

  • rules/api-design.md — REST conventions
  • rules/git-workflow.md — Branching, releases
  • rules/code-review.md — Review process

Verification

  • Code passes ruff check .
  • Code passes mypy app/ --strict
  • Tests pass with pytest --cov-fail-under=80
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 71 lines · 16 tokens per session scan A 9a9135d7ff42

Subscribe to this mod's changes

python-standards is a skill published in the GitHub repository rishapgandhi/python-skills (4 stars, last pushed 3mo ago), licensed MIT. It adds 16 tokens to every session and 503 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ring:applying-composition-patterns

React composition patterns that scale. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or during architecture review. Skip for simple components with 1-2 props…

LerianStudio/ring · 68 tokens

ring:adopting-lib-commons-huma-wrapper

Adopting the lib-commons/v5 shared Huma (OAS 3.1) OpenAPI wrapper + RFC 9457 problem model (commons/net/http/{openapi,problem}) in a Lerian Go service: wire openapi.New/ServeSpec + problem.Install (central >=500 scrub) on BOTH runtime and spec-gen paths, the per-rail problem.MapError flex seam, and rename-only spec…

LerianStudio/ring · 142 tokens

ring:searching-code

Forensic code search and analysis with optional Chain of Draft (CoD) ultra-concise mode. Five-phase methodology (clarification, planning, execution, analysis, synthesis) with severity assessment. Use for targeted investigation of specific patterns, bugs, or vulnerabilities. Skip for broad architecture mapping (use…

LerianStudio/ring · 74 tokens

ring:fixing-lint

Fixing lint to a clean state: runs the linter, groups reported issues into independent streams, and dispatches one parallel fixer agent per stream (ring:backend-go for Go, ring:general-purpose otherwise), iterating until clean. Use when a codebase has lint errors across multiple files. Skip for a single error (fix…

LerianStudio/ring · 96 tokens

ring:auditing-dependency-security

Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or updating a dependency, reviewing a…

LerianStudio/ring · 102 tokens

ring:creating-worktrees

Creating an isolated git worktree for parallel branch work: selects the directory by priority order, verifies/adds .gitignore safety, auto-installs the detected toolchain's dependencies, runs a baseline test, and reports readiness. Use before a feature that needs isolation from the main workspace or before executing…

LerianStudio/ring · 88 tokens