Python project deployment troubleshooting

From Dirtytrii/codex-skills · View interactive version

Python project deployment troubleshooting is an AI agent skill from the GitHub repository Dirtytrii/codex-skills. Read-only first troubleshooting workflow for Python project deployments, including systemd startup failures, dependency issues, encoding problems, permissions, proxy setup, and readiness gates.

How to use this skill

Skill file

Python Project Deployment Troubleshooting

Purpose

Diagnose Python deployment failures safely before changing code, packages, files, permissions, service units, or runtime configuration. This skill turns common failure patterns into a read-only evidence collection workflow.

When to use

Safety rules

Read-only workflow

  1. Establish the failed component, time window, deployment method, and expected startup path.
  2. Check service status and recent journal summaries without restarting.
  3. Identify the actual command, working directory, service user, virtualenv, and environment keys present.
  4. Inspect package/archive metadata in staging only: file names, size, timestamp, and whether archive layout looks plausible. Do not unpack into production.
  5. Check script encoding indicators safely: file type, first bytes if needed, line-ending class, shebang, and shell syntax validity plan. Do not modify the file.
  6. Check dependency failure class: missing module, incompatible version, optional extra missing, mirror/source issue, or wrong virtualenv.
  7. Check permissions by summarizing ownership and mode of key directories, especially project root, virtualenv, logs, data, and package directories.
  8. Check proxy/network requirements and whether the service runtime sees only the required environment variable names, not values.
  9. Check readiness gates and current artifact timestamps to avoid treating stale failures as current truth.
  10. Produce a remediation plan grouped by approval level: safe checks, package install, permission fix, config edit, restart, or rollback.

Evidence to collect

Stop conditions

Optional user-approved actions

Only after explicit user approval:

Final report format

Summary: <deployment diagnosis>
Project: <PROJECT_NAME>
Service state: <state/exit/restarts>
Failure class: <encoding/dependency/permission/proxy/readiness/archive/unknown>
Evidence:
- Logs: <safe summary>
- Entrypoint: <summary>
- Dependencies: <summary>
- Files/permissions: <summary>
- Readiness: <summary>
Likely cause: <ranked hypothesis>
Recommended remediation: <approval-gated steps>
Needs approval: <specific changes>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.