dockerize-service

dockerize-service is a skill for Claude Code from robhowley/py-pit-skills. It costs 40 tokens per session (2,638 once invoked), scanned A, original, MIT.

A workflow for adding local-development Docker support to an existing Python project. Docker packages applications into containers, while Compose coordinates those containers and their configuration.

In plain words
What is it for?
Use it to add or extend a Dockerfile, Docker Compose configuration, environment settings, and a Docker ignore file for a Python service.
Why use it?
It avoids creating conflicting container setups and adapts the files to the project's existing tools and services.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the py-pit plugin — 16 skills, 1 hook shipped together

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/robhowley/py-pit-skills/dockerize-service
Any agent
npx skills add robhowley/py-pit-skills --skill dockerize-service
Clone the repo
git clone --depth 1 https://github.com/robhowley/py-pit-skills

Made for: Claude Code.

Or install py-pit, the plugin that ships this one along with the rest of its 16 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dockerize-service

README.md
[![agentmods](https://agentmods.dev/badge/skills/robhowley/py-pit-skills/dockerize-service.svg)](https://agentmods.dev/skills/robhowley/py-pit-skills/dockerize-service)
Your own site
<a href="https://agentmods.dev/skills/robhowley/py-pit-skills/dockerize-service"><img src="https://agentmods.dev/badge/skills/robhowley/py-pit-skills/dockerize-service.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00040 $0.02638
Opus 5 $0.00020 $0.01319
Sonnet 5 $0.00008 $0.00528
Haiku 4.5 $0.00004 $0.00264

Measured 6d ago against content hash f9d109ce401e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

dockerize-service scanned grade A with 1 finding 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 6d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000{detected_path}')"
skills/dockerize-service/SKILL.md · 282 lines

How it starts

The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: dockerize-service

Core position

This skill produces a local-development Docker Compose setup that reflects the project as-is. It does not introduce backing services the repo doesn't already use, and it does not create a second Docker pattern if one already exists.


Trigger

Use this skill when the user wants to:

  • Containerize an existing Python project
  • Add Docker Compose to a project
  • Add a Dockerfile to a project
  • "Dockerize" a service

Variables

  • {pkg_name} — snake_case package name (matches the project directory and Python package)
  • {PKG_NAME}_ — env var prefix, only used if a pydantic-settings env_prefix is detected in the repo (e.g., MY_SERVICE_); otherwise plain names are used

Step 1 — Inspect the repo

Inspect before asking. Work through each check in order and record findings.

1. Check for existing Docker artifacts

Look for Dockerfile, docker-compose.yml, docker-compose.yaml, .dockerignore. If any are present, extend them — do not create a competing setup. Note what was found.

2. Check for repo tooling

  • uv.lock present → uv-native project; use uv base image in Dockerfile
  • No uv.lock → pip-based project; use python:3.12-slim with pip install

3. Check for service signals

Inspect pyproject.toml dependencies and any settings/config files for:

  • sqlalchemy + a non-sqlite database URL pattern, or psycopg, psycopg2, asyncpg in deps → Postgres
  • redis in deps → Redis
  • No signals → app-only (do not add Postgres as a default)

If Postgres is signaled, also note which driver is already present (psycopg2-binary, psycopg[binary], asyncpg, etc.) — this determines what to add in Step 6.

4. Check for an existing health endpoint

Grep routes for /health, /healthz, /ping, /api/v1/health, or similar. Record the exact path if found.

5. Detect app entrypoint

Look for the ASGI app object in {pkg_name}/main.py, {pkg_name}/app.py, or {pkg_name}/application.py. Record the module path (e.g., {pkg_name}.main:app). Also check [project.scripts] in pyproject.toml for any uvicorn/gunicorn invocations. This becomes the CMD in the Dockerfile — default to {pkg_name}.main:app only if no entrypoint is found elsewhere.

Read the full file on GitHub · 282 lines

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. 6d ago First seen · 282 lines · 40 tokens per session scan A f9d109ce401e

Subscribe to this mod's changes

dockerize-service is a skill published in the GitHub repository robhowley/py-pit-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 2,638 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

python-backend

Production Python async patterns including asyncio TaskGroup, FastAPI dependency injection and middleware, SQLAlchemy 2.0 async sessions, and database connection pool tuning. Python 3.11+ runtime concerns such as ExceptionGroup, cancellation semantics, and session rollback. Use when building async services, wiring…

yonatangross/orchestkit · 82 tokens

python

Use when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.

MadAppGang/claude-code · 34 tokens

database

Relational database authority — PostgreSQL, async ORM (SQLAlchemy 2 / asyncpg), Alembic schema migrations, Supabase Python and JS clients, query optimisation, index strategy, connection pooling, transaction patterns, and bulk operations across Python and Node stacks.

LuuOW/meridian-mcp · 54 tokens

pytest

Advanced Python unit testing framework for customer support tech enablement, covering FastAPI, SQLAlchemy, PostgreSQL, async operations, mocking, fixtures, parametrization, coverage, and comprehensive testing strategies for backend support systems.

manutej/luxor-claude-marketplace · 44 tokens

FastAPI Customer Support Tech Enablement

Comprehensive FastAPI skill for building modern Python web APIs with focus on customer support systems, ticket management, real-time chat, and backend operations.

manutej/luxor-claude-marketplace · 36 tokens

SQLAlchemy ORM Expert

Comprehensive SQLAlchemy skill for customer support tech enablement, covering ORM patterns, session management, query optimization, async operations, and PostgreSQL integration.

manutej/luxor-claude-marketplace · 34 tokens