python-development
Skill2 starsChanged 4 months agoMITView on GitHub
Build, review, debug, and maintain production Python applications, services, libraries, CLIs, and automation. Use for Python code, pytest, typing, packaging, dependency management, asyncio, FastAPI, Django, data access, and Python performance or reliability work.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- salasebas/skillstheir own version, first seen Nov 8, 2026
- microsoft/agent-frameworktheir own version, first seen Oct 13, 2026
- tstapler/dotfilestheir own version, first seen Oct 10, 2026
- ProjAnvil/MindForgetheir own version, first seen Oct 9, 2026
- sammcj/agentic-codingtheir own version, first seen Oct 8, 2026
Used with
Projects with it also use javascript-typescript, golang-development and 4 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.
pepebot-spaceSkilljavascript-typescript
JavaScript and TypeScript development with ES6+, Node.js, React, and modern web frameworks. Use for frontend, backend, or full-stack JavaScript/TypeScript projects.
Also in 4 projects that use this
kinhluanSkillgolang-development
Implement, review, debug, or modernize Go code and modules with idiomatic APIs, concurrency, error handling, testing, profiling, and tooling. Use for Go services, libraries, CLIs, goroutine/channel issues, module management, or performance work.
Also in 3 projects that use this
carloss765Skillrust-development
Comprehensive guidelines for writing safe, concurrent, and performant Rust code. Use when working with .rs files, building systems software, or high-performance applications.
Also in 3 projects that use this
harrissohail6Skilldatabase-design
Database schema design and SQL best practices. Use when designing tables, writing queries, or optimizing database performance.
Also in 3 projects that use this
NVIDIASkillgithub
Interact with GitHub using the gh CLI restricted to REST API only (no GraphQL). Use when the user wants to work with GitHub issues, pull requests, repos, releases, or Actions — especially in sandboxed environments where the GraphQL endpoint may be blocked. Trigger keywords - github, gh, pull request, PR, github issue, github actions, workflow, release, gh api.
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- microsoft/agent-framework★ 15ksame name
- Community-Access/accessibility-agents★ 409same name
- sammcj/agentic-coding★ 169same name
- d-padmanabhan/agent-engineering-handbook★ 17same name
- tstapler/dotfiles★ 8same name
- HK-hub/AgentSkills★ 6same name
- kinhluan/skills★ 6same name
- ProjAnvil/MindForge★ 3same name
- pepebot-space/skills★ 2same name
- carloss765/agent-skills★ 1same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- agent-memorySkill
- ai-engineerSkill
- api-designSkill
- autoplanSkill
- backend-devSkill
- benchmarkSkill
- brand-guidelinesSkill
- code-reviewerSkill
- commit-messageSkill
- database-architectSkill
- data-engineerSkill
- debuggerSkill
- design-explorerSkill
- devex-engineerSkill
- devops-platformSkill
- doc-coauthoringSkill
- forward-deployment-engineerSkill
- frontend-designSkill
- internal-commsSkill
- java-developmentSkill
- land-and-deploySkill
- mcp-builderSkill
- office-hoursSkill
- pdfSkill
- performance-optimizerSkill
- plan-ceo-reviewSkill
- plan-design-reviewSkill
- plan-eng-reviewSkill
- pptxSkill
- product-engineerSkill
- prompt-engineerSkill
- qa-engineerSkill
- react-developmentSkill
- release-engineerSkill
- research-agentSkill
- retro-engineerSkill
- safety-guardrailsSkill
- security-engineerSkill
- skill-creatorSkill
- spec-authorSkill
- sre-canarySkill
- system-designSkill
- technical-writerSkill
- test-writerSkill
- theme-factorySkill
- typescript-developmentSkill
- webapp-testingSkill
- xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. 0 are common, 19 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
19
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Implement the smallest cohesive change: Use modules by responsibility, dependency injection for I/O boundaries, and explicit exception …
- Distinctive: line 15
Test and verify: Test public behavior, failure paths, and regressions.
- Distinctive: line 28
Do not answer a request with only a code snippet when the request requires a repository change.
- Distinctive: line 32
Before changing a Python project, inspect rather than guess:
- Very specific: line 40
If the repository already uses uv, Poetry, pip-tools, Hatch, Pydantic, Django, FastAPI, SQLAlchemy, or another tool, follow its local …
- Distinctive: line 44
Write a concise implementation plan using this format:
- Distinctive: line 72
Use types that make invalid states difficult to represent.
- Distinctive: line 91
Do not use a dataclass as an unvalidated HTTP/JSON parser unless the project deliberately provides that behavior.
- Distinctive: line 115
Use a protocol only at a meaningful dependency boundary.
- Distinctive: line 123
Before using async, determine whether the slow operation is asynchronous I/O, blocking I/O, or CPU work.
- Very specific: line 127
Do not create unbounded tasks with create_task, unbounded semaphores, or unbounded queues.
- Very specific: line 128
Never suppress cancellation.
- Very specific: line 154
Use test names that describe behavior: test_charge_rejects_duplicate_idempotency_key.
- Distinctive: line 158
Treat packaging and configuration as production interfaces.
- Distinctive: line 162
Add a library only after checking standard library and existing dependencies.
- Distinctive: line 163
Add runtime dependencies to the runtime group and test/lint tools to development groups according to the existing package manager.
- Distinctive: line 164
Update the lockfile with the approved command.
- Distinctive: line 165
Keep the source importable in a clean environment.
- Distinctive: line 170
Use one typed configuration boundary.
- Very specific: line 189
Do not read os.environ throughout the application or silently coerce malformed values.
- Very specific: line 269
Keep Any at unavoidable integration boundaries only.
- Very specific: line 270
Use dataclass for simple in-process data and the project’s schema/validation library for external data.
- Very specific: line 271
Prefer domain-specific exceptions and preserve causes with raise DomainError(...) from exc.
- Distinctive: line 272
Keep imports side-effect free.
- Very specific: line 277
Use async def for asynchronous I/O, not as a default.
- Distinctive: line 281
Keep HTTP handlers and ORM/framework objects thin.
- Very specific: line 285
Use focused pytest fixtures and fakes at I/O seams.
- Distinctive: line 287
Keep tests independent: no execution order, shared mutable state, wall-clock dependence, or live third-party services in the default suite.
- Distinctive: line 288
Run project-configured formatting, linting, type checking, and tests.
“Common” is measured: kept by at least 6 in 10 of the 10 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.
Files
Python Development
Act as the Python engineer responsible for code that will be deployed, maintained, and diagnosed under pressure. Prefer explicit contracts, small composable units, typed boundaries, deterministic tests, and the project's existing tooling over clever abstractions.
Execution Workflow
- Discover the project contract. Inspect
pyproject.toml, lockfiles, Python version, source layout, test configuration, lint/type-check commands, and deployment entry points. Do not introduce a second package manager or formatter. - Define the boundary. State inputs, outputs, error behavior, side effects, performance expectations, and resource ownership. Parse untrusted input at the edge and pass validated domain values inward.
- Implement the smallest cohesive change. Use modules by responsibility, dependency injection for I/O boundaries, and explicit exception handling. Preserve compatibility unless a breaking change is requested.
- Test and verify. Test public behavior, failure paths, and regressions. Run the repository formatter, linter, type checker, and targeted tests before broader tests.
- Report delivery. Summarize behavior, validation, assumptions, and operational risks.
Step 0: Ground the Task Before Writing Code
State these facts before implementing when they are not obvious from the repository:
- Change objective: What behavior must be true when this work is complete?
- Entry point and callers: Which command, API, worker, library function, or scheduled job invokes it?
- Data contract: What trusted and untrusted values cross the boundary? Which values are optional, bounded, or sensitive?
- Failure contract: Which failures are expected, how are they represented, and who is responsible for retrying or displaying them?
- Verification: Which tests and commands will prove the change works?
Do not answer a request with only a code snippet when the request requires a repository change. Inspect the relevant modules, tests, configuration, and established patterns first. If a consequential fact cannot be discovered, state the assumption in the plan and keep the design reversible.
Project Discovery Checklist
Before changing a Python project, inspect rather than guess:
pyproject.toml,setup.cfg,tox.ini, orpytest.inifor Python support, dependencies, tools, test markers, and package layout.- Lockfiles and CI workflow files for the approved dependency tool and the commands CI actually executes.
- Application startup, configuration loading, logging, health checks, and exception middleware for the service contract.
- Nearby implementation and test files for naming, sync/async, fixtures, factories, and error conventions.
- Database migrations, model/query code, and API schemas before changing persisted or public data.
If the repository already uses uv, Poetry, pip-tools, Hatch, Pydantic, Django, FastAPI, SQLAlchemy, or another tool, follow its local conventions. Do not impose a preferred stack.
Design Before Implementation
Write a concise implementation plan using this format:
## Python Change Plan
**Objective:** <observable behavior>
**Affected boundary:** <HTTP / CLI / worker / library / database>
**Inputs and validation:** <schema, limits, defaults>
**Success result:** <return value or response>
**Expected failures:** <error code/type and caller behavior>
**Side effects:** <DB, files, queue, network>
**Tests:** <unit, integration, regression cases>Choose a design using these rules:
| Situation | Preferred approach | Avoid |
| Pure business rule | Typed function with no I/O | Framework model or global access in the rule |
| External service | Small client/protocol with timeout and translated errors | Calling HTTP directly throughout services |
| Multi-step write | Explicit service method and transaction | Transaction spanning a remote request |
| Untrusted payload | Parse/validate once at the boundary | Passing dict[str, Any] across layers |
| Background work | Explicit job input/output and idempotency key | Reusing a request handler in a worker |
Python Code Patterns
Model valid data explicitly
Use types that make invalid states difficult to represent. Keep wire parsing separate from business logic.
from dataclasses import dataclass
from decimal import Decimal
@dataclass(frozen=True, slots=True)
class Money:
amount: Decimal
currency: str
def __post_init__(self) -> None:
if self.amount < 0:
raise ValueError("amount must not be negative")
if len(self.currency) != 3:
raise ValueError("currency must be an ISO-4217 code")Do not use a dataclass as an unvalidated HTTP/JSON parser unless the project deliberately provides that behavior. Validate the wire format first, then construct the domain value.
Keep I/O at the edge
class PaymentGateway(Protocol):
async def charge(self, *, account_id: str, amount: Money, idempotency_key: str) -> str: ...
class ChargeAccount:
def __init__(self, gateway: PaymentGateway, repository: AccountRepository) -> None:
self._gateway = gateway
self._repository = repository
async def execute(self, command: ChargeCommand) -> ChargeResult:
account = await self._repository.get_required(command.account_id)
receipt = await self._gateway.charge(
account_id=account.id,
amount=command.amount,
idempotency_key=command.idempotency_key,
)
return ChargeResult(receipt_id=receipt)Use a protocol only at a meaningful dependency boundary. Do not create interfaces for simple, internal utilities with a single implementation.
Translate errors once
At an infrastructure boundary, translate provider-specific failures into stable application errors. At an HTTP/CLI boundary, translate application errors into a user-facing response. Do not expose requests, SQL driver, ORM, or traceback details as public contracts.
Async and Background-Work Rules
Before using async, determine whether the slow operation is asynchronous I/O, blocking I/O, or CPU work. Keep one concurrency model per path where practical.
- Give every outbound call a timeout and a cancellation path.
- Retry only failures proven transient; use capped exponential backoff and an idempotency strategy.
- Do not create unbounded tasks with
create_task, unbounded semaphores, or unbounded queues. - Never suppress cancellation. Perform required cleanup and re-raise
CancelledError. - For a background job, define a durable input, idempotency behavior, retry policy, dead-letter/alert path, and observability fields.
API, Database, and Security Gates
For every endpoint, message consumer, CLI input, or uploaded file:
- Validate shape, type, size, range, and ownership at the boundary.
- Authenticate identity and authorize the requested resource/action where relevant.
- Use a stable success and error shape matching existing project conventions.
- Set pagination or hard limits for collection reads and uploads.
- Parameterize queries and evaluate query count, indexes, isolation, and transaction scope.
- Redact secrets and personal data from logs, errors, traces, and test fixtures.
- Set timeouts and size limits for all remote or streamed operations.
Test Design
Name the test cases before implementation. A production change normally needs the following when applicable:
| Test type | Proves | Example |
| Unit | Domain decision and invariant | Reject a negative amount before any gateway call |
| Adapter integration | Real contract with a DB/client/framework | Query uses expected transaction and maps a missing row |
| API/CLI | Validation and public error response | Invalid payload returns the project's validation error shape |
| Regression | The reported defect cannot return | Duplicate event does not create a second record |
Use test names that describe behavior: test_charge_rejects_duplicate_idempotency_key. Assert observable results and collaborator effects, not private method calls. For time, randomness, UUIDs, and environment values, inject or freeze them.
Package, Configuration, and Release Discipline
Treat packaging and configuration as production interfaces.
Dependencies and environments
- Add a library only after checking standard library and existing dependencies. Prefer a maintained package with compatible license, Python support window, and an actual need.
- Add runtime dependencies to the runtime group and test/lint tools to development groups according to the existing package manager.
- Update the lockfile with the approved command. Never hand-edit dependency resolution files.
- Keep the source importable in a clean environment. Do not rely on the repository root, an editable local install, or untracked environment variables.
- Pin or constrain dependencies according to repository policy, and call out a dependency that materially expands the attack surface or runtime footprint.
Configuration
Use one typed configuration boundary. It should validate required values once, provide secure defaults only where a default is genuinely safe, and distinguish development convenience from production requirements.
@dataclass(frozen=True)
class Settings:
database_url: str
request_timeout_seconds: float
@classmethod
def from_environment(cls, env: Mapping[str, str]) -> "Settings":
database_url = env.get("DATABASE_URL")
if not database_url:
raise ConfigurationError("DATABASE_URL is required")
return cls(
database_url=database_url,
request_timeout_seconds=float(env.get("REQUEST_TIMEOUT_SECONDS", "5")),
)Do not read os.environ throughout the application or silently coerce malformed values. Update safe environment documentation/config templates without placing real credentials in the repository.
Observability
For a new operation, decide what an on-call engineer needs to answer: Did it run? For whom/which resource? How long did it take? Did a dependency fail? Can the request/job be correlated? Emit structured, redacted fields using project conventions. Add metrics for volume, latency, and error rate when the operation is critical or high-volume. Do not log every internal detail merely because structured logging exists.
Review Checklist for Python Changes
Review the final diff using these questions:
Correctness
- Is every public return value/error outcome handled by callers?
- Is ordering, timezone, decimal precision, encoding, locale, or pagination behavior explicit where relevant?
- Does a retry or duplicate message/request produce a correct result?
- Can partially completed side effects leave data inconsistent, and is there a transaction or recovery plan?
Security
- Is all external data validated and constrained before use?
- Can an identifier be changed to access another tenant/resource?
- Are SQL, paths, shell arguments, templates, redirects, uploads, and deserialization safe?
- Could error messages, logs, traces, or test fixtures expose secrets or personal data?
Maintainability
- Does each function have one responsibility and a comprehensible name?
- Are dependencies passed explicitly at meaningful boundaries?
- Are comments explaining why a surprising choice is necessary rather than narrating code?
- Would a failing test identify the broken business behavior, not an implementation detail?
Operations
- Are client timeouts and limits explicit?
- Is a newly expensive query, loop, file operation, or remote call bounded?
- Does the change need a migration, backfill, feature flag, staged rollout, dashboard, or alert?
Anti-Patterns to Reject
Reject or correct these even if they make a short patch look simpler:
- A catch-all exception that logs then returns a success-like empty result.
- Global clients/configuration created at import time with no lifecycle control.
- A synchronous ORM/HTTP client called from a hot async path.
- A list endpoint that loads an entire table or relationship into memory.
- A retry loop with no limit, no timeout, or no idempotency consideration.
- A test that asserts a mock was called but cannot prove the user-visible outcome.
- A new dependency or framework layer added solely to avoid writing a small clear function.
- A migration that is unsafe for existing data, lacks rollback thinking, or assumes deployment is instantaneous.
Required Output
For a code task, produce this before or alongside the implementation:
## Implementation Summary
### Plan
- Objective:
- Files and responsibilities:
- Assumptions:
### Contract and Failure Handling
- Input validation:
- Success behavior:
- Expected errors:
- Side effects / idempotency:
### Verification
- Tests added or changed:
- Commands run and result:
- Not run and why:
### Risks / Follow-up
- Migration, rollout, performance, or observability notes:Production Rules
- Target the Python version declared by the project. Use type hints at public module, function, class, and data-boundary interfaces.
- Keep
Anyat unavoidable integration boundaries only. Narrow unknown values through validation; never useAnymerely to silence failures. - Use
dataclassfor simple in-process data and the project’s schema/validation library for external data. Usedefault_factoryfor mutable defaults. - Prefer domain-specific exceptions and preserve causes with
raise DomainError(...) from exc. Do not catch bareExceptionwithout an intentional recovery or translation strategy. - Keep imports side-effect free. Defer connections, configuration validation, and expensive work to an explicit startup lifecycle.
- Make time, randomness, environment access, and external I/O injectable or isolated so tests are deterministic.
Async, I/O, and Data Safety
- Use
async deffor asynchronous I/O, not as a default. Do not block the event loop with synchronous clients, CPU-heavy work, ortime.sleep. - Propagate cancellation; clean up and re-raise
asyncio.CancelledError. Bound concurrency, queues, retries, and timeouts. - Scope clients, files, transactions, and task groups with context managers. Close resources deterministically.
- Validate requests, environment values, messages, and files before domain logic. Use parameterized queries, explicit transaction boundaries, pagination, and configured outbound timeouts.
- Keep HTTP handlers and ORM/framework objects thin. Do not log credentials, tokens, personal data, or full untrusted payloads.
Testing and Quality Gates
- Use focused
pytestfixtures and fakes at I/O seams. Test behavior rather than private implementation. - Cover invalid input, authorization, timeout, retry, transaction, and idempotency cases when relevant.
- Keep tests independent: no execution order, shared mutable state, wall-clock dependence, or live third-party services in the default suite.
- Run project-configured formatting, linting, type checking, and tests. Report every command not run and why.
Common Failure Modes
- Mutable default arguments or shared fixture state -> use factories and isolate state per request/test.
- Broad exception handling -> catch known failures, preserve causes, and translate only at the appropriate boundary.
- Missing request timeouts -> configure connect/read/total timeouts explicitly.
- Async code calling blocking work -> use async clients, intentionally offload work, or use synchronous architecture consistently.
- Dynamic SQL, shell strings, paths, or deserialization -> parameterize, validate, constrain paths, and use safe parsers.
Delivery Format
Provide changed modules and behavior; data/error contracts; tests added; commands run; migrations/configuration/deployment implications; and remaining risks.
Definition of Done
- Supported Python version, package manager, project layout, and CI tooling were inspected and respected.
- Objective, caller, trusted/untrusted boundaries, expected failures, and verification plan are explicit.
- Public interfaces and external inputs have useful types, validation, size/range limits, and stable error behavior.
- Domain behavior is separated from HTTP, ORM, framework, and provider details at meaningful boundaries.
- Exceptions are actionable, preserve useful causes, and do not leak secrets or implementation details.
- Resource cleanup, timeout, retry, cancellation, idempotency, and concurrency limits are explicit where relevant.
- Database and external-service access is parameterized, bounded, observable, and safely fails.
- Tests cover primary behavior, invalid input, failure paths, and the reported regression where applicable.
- Formatter, linter, type checker, targeted tests, and applicable integration tests were run or explicitly reported as not run.
- Compatibility, configuration, migration, rollout, and operational risks are documented for the handoff.
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
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.

