agentleFS
mehulpratapsingmehulpratapsing/ai-engineer-skill-stack/.agents/skills/python-production/SKILL.md

python-production

Skill1 starsChanged 42 days agoApache-2.0View on GitHub

Build or harden production Python services, APIs, workers, and AI integrations with project-aligned typing, validation, async behavior, security, observability, and operational controls.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. tonyfujs/.claude-skills★ 0same name

    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 repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when implementing or changing Python services, APIs, workers, or production integrations.

    line 9
  2. Very specific:

    Inspect before changing: Read the project instructions, pyproject.toml or equivalent, lockfile, supported Python versions, architecture, …

    line 13
  3. Distinctive:

    When Context7 is configured, use it for focused, version-specific documentation for dependencies already selected by the project.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 Production

Use this skill when implementing or changing Python services, APIs, workers, or production integrations. Follow the target repository's supported Python and dependency versions and established conventions.

Workflow

  1. Inspect before changing. Read the project instructions, pyproject.toml or equivalent, lockfile, supported Python versions, architecture, lint/type/test commands, and adjacent code. Confirm the framework and deployment model already in use. Do not introduce a framework or dependency without a concrete need.
  2. Make boundaries explicit. Use type annotations on public and cross-module interfaces. Validate untrusted HTTP, queue, file, and model/tool inputs at the boundary with the project's schema mechanism (Pydantic where appropriate); keep internal domain types and validation rules clear. Treat model output as untrusted and validate before using it in control flow or side effects.
  3. Keep configuration and dependencies controlled. Use typed, validated configuration and the approved secret manager/environment path. Never commit secrets, log them, or use defaults that silently weaken production security. Inject network, model, storage, clock, and other external dependencies at clear boundaries where that improves control and testing.
  4. Handle concurrency and failure deliberately. Use async only along genuinely asynchronous paths. Bound concurrency, request sizes, queue growth, and timeouts; propagate cancellation and clean up resources. Retry only transient failures and only when the operation is safe to repeat or protected by idempotency. Translate expected failures into stable domain/API errors; preserve diagnostic context in protected logs without exposing internals to clients.
  5. Apply security at each boundary. Authenticate and authorize every protected operation. Use parameterized queries and safe process APIs; validate paths and URLs; limit outbound network access; protect file uploads and deserialization; use least privilege. Avoid broad exception handling that converts security or data-integrity failures into success-shaped responses.
  6. Make the service operable. Add structured logs, request/trace correlation, relevant metrics, health/readiness behavior, and alerts according to project conventions. Redact secrets, credentials, prompts, retrieved text, and confidential, proprietary, restricted, or personal data by default. Set retention and access according to approved policy. For AI calls, record model/version, latency, usage, and outcome only to the extent permitted and useful.
  7. Verify proportionately. Use the repository's formatter, linter, type checker, and focused tests when requested or required by the delivery workflow. Cover boundary validation, authorization, failure/cancellation, and idempotency cases affected by the change. Report the exact checks run and any not run; never claim a check passed without its result.

Output

Summarize the behavior changed, key contracts and operational/security choices, dependency changes, checks and outcomes, and any deployment/configuration steps. Keep implementation aligned with existing project patterns unless a concrete defect justifies a change.

Current references

Confirm APIs and migration notes against the installed version before coding.

When Context7 is configured, use it for focused, version-specific documentation for dependencies already selected by the project. Match the lockfile and runtime versions, verify consequential details against official docs, and keep credentials, secrets, private source code, and restricted data out of queries. Context7 is optional.

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.