skills/docker-hub-toolkit/SKILL.md
Automate Python project Docker Hub deployments with optimized multi-stage builds, CI/CD pipelines, and security best practices. This skill should be used when users ask to containerize Python apps, build Docker images, push to Docker Hub, set up CI/CD for Docker, optimize Dockerfiles, debug Docker build failures, or deploy Python projects as containers.
npx skillsauth add alijilani-dev/claude docker-hub-toolkitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
This skill has been flagged as suspicious. Review the scan results before using.
2 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
End-to-end automation for deploying Python project images to Docker Hub with maximum performance and efficiency.
.dockerignore and docker-compose.ymlGather context to ensure successful implementation:
| Source | Gather |
|--------|--------|
| Codebase | Python framework (FastAPI/Flask/Django), entry point, dependencies file |
| Conversation | Docker Hub username, image name, target platforms, version tag |
| Skill References | Multi-stage patterns, CI/CD templates, security practices from references/ |
| User Guidelines | Team Docker standards, naming conventions, security requirements |
Ensure all required context is gathered before implementing. Only ask user for THEIR specific requirements (domain expertise is in this skill).
Ask about USER'S context:
uvicorn app.main:app)"1. Generate Dockerfile → Multi-stage optimized build
2. Create .dockerignore → Exclude unnecessary files
3. Build image → With BuildKit caching
4. Tag image → Semantic version + git SHA
5. Security scan → Check for vulnerabilities
6. Push to Docker Hub → Authenticated push
7. Set up CI/CD → GitHub Actions automation (optional)
pyproject.toml, setup.py, or .python-versionrequirements.txt, pyproject.toml, Pipfile).dockerignore from assets/templates/dockerignore.templatereferences/multi-stage-builds.md--mount=type=cache,target=/root/.cache/pip for pip caching--mount=type=bind for dependency files--user for clean multi-stage copypytest) and lintingdocker build --target devCMD/ENTRYPOINT| Script | Purpose | Usage |
|--------|---------|-------|
| scripts/build-and-push.sh | Build, tag, and push image | bash scripts/build-and-push.sh USERNAME APP_NAME VERSION |
| scripts/validate-dockerfile.sh | Lint and validate Dockerfile | bash scripts/validate-dockerfile.sh [path/to/Dockerfile] |
| scripts/setup-multiplatform.sh | Configure buildx for multi-arch | bash scripts/setup-multiplatform.sh |
| Error | Recovery |
|-------|----------|
| Build fails on pip install | Check requirements.txt syntax, verify package availability |
| Push denied/unauthorized | Run docker login, verify access token |
| Image too large (>500MB) | Switch to slim base, verify multi-stage COPY |
| BuildKit not available | Set DOCKER_BUILDKIT=1 or use docker buildx build |
| Multi-platform fails | Run scripts/setup-multiplatform.sh |
| Rate limit exceeded | Wait or use authenticated pulls |
See references/troubleshooting.md for comprehensive error resolution.
username/app:tagBefore delivering, verify:
.dockerignore excludes .git, __pycache__, .venv, .env, node_modulesPYTHONDONTWRITEBYTECODE=1 and PYTHONUNBUFFERED=1 set| File | When to Read |
|------|--------------|
| references/multi-stage-builds.md | Dockerfile patterns, stage architecture, anti-patterns |
| references/docker-hub-deployment.md | Push workflow, tagging strategy, Hub settings |
| references/ci-cd-github-actions.md | GitHub Actions pipeline, caching, automation |
| references/claude-integration.md | Claude Code commands, hooks, CLAUDE.md standards |
| references/troubleshooting.md | Build/push errors, size issues, security fixes |
| documentation/docker_hub_stages.md | Original multi-stage build stages reference |
| documentation/docker_hub_python_project_partner.md | Claude capabilities for Docker Hub |
data-ai
Orchestrate complex tasks by delegating work to parallel subagent teams, preserving the main context window and preventing auto-compact. This skill should be used when users ask to apply subagent-teams, when performing complex multi-step tasks, when context window is getting large, or when independent subtasks can run in parallel.
development
Generate new Claude Code skills with proper structure and standards. Use when the user requests skill creation, wants to generate a new skill, or mentions creating custom Claude Code functionality. Activated by phrases like "create a skill", "generate a skill", "make a new skill", or "build a skill for".
testing
Generate comprehensive educational quizzes based on Bloom's Taxonomy methodology (Remember, Understand, Apply, Analyze, Evaluate, Create). Creates structured True/False quizzes with detailed answer keys and explanations. Use when user requests quiz generation, assessment creation, test materials, practice questions, mentions Bloom's Taxonomy, or provides educational topics for quiz creation. Activates for study topics, course materials, reference files (.md, .txt, .pdf), or educational content requiring systematic assessment.
content-media
Generate comprehensive educational notes using Bloom's Taxonomy methodology. Creates structured learning materials with summaries, practice questions, and visual diagrams. Use when user requests notes generation, study materials, learning resources, mentions Bloom's Taxonomy, or provides topics for educational note-taking. Activates for .md files, study topics, course materials, or educational content creation.