Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

docker-developmentDocker 开发

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

661

周安装

27

GitHub Stars

103

下载量

212
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:docker-development(Docker 开发)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/docker-development
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill docker-development
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill docker-development

简介

docker-development 用于 Dockerfile 与 docker-compose 配置的自动化分析与优化。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中识别层合并机会、安全漏洞与最佳实践违规。
  • 提供 compose 服务配置检查与容器标准强制执行工具链。
  • 安装命令:npx skills add https://github.com/borghei/claude-skills --skill docker-development。
  • 使用前需确认本地测试与生产环境的差异,避免误操作影响线上服务。

SKILL.md

Docker Development

Category: Engineering Domain: Container Development & Optimization

Overview

The Docker Development skill provides automated analysis of Dockerfiles and docker-compose configurations. It identifies layer optimization opportunities, security issues, best practice violations, and compose service misconfigurations. Use this skill to enforce container standards across your team and catch issues before they reach production.

Quick Start

# Analyze a Dockerfile for best practices
python scripts/dockerfile_analyzer.py --file Dockerfile

# Analyze with JSON output
python scripts/dockerfile_analyzer.py --file Dockerfile --format json

# Validate a docker-compose file
python scripts/compose_validator.py --file docker-compose.yml

# Check for port conflicts across compose files
python scripts/compose_validator.py --file docker-compose.yml --check-ports

Tools Overview

dockerfile_analyzer.py

Analyzes Dockerfiles for best practices, security issues, and optimization opportunities.

FeatureDescription
Layer optimizationDetects unnecessary layers, recommends combining RUN statements
Multi-stage analysisValidates multi-stage build patterns and final image size
Security scanningFlags running as root, use of latest tags, exposed secrets
Base image checksRecommends smaller base images (alpine, distroless, slim)
Cache optimizationIdentifies poor layer ordering that breaks Docker cache
# Full analysis
python scripts/dockerfile_analyzer.py --file Dockerfile

# Security-focused scan
python scripts/dockerfile_analyzer.py --file Dockerfile --security-only

# JSON output for CI integration
python scripts/dockerfile_analyzer.py --file Dockerfile --format json

compose_validator.py

Validates docker-compose files for correctness, dependency issues, and port conflicts.

FeatureDescription
Schema validationChecks compose file structure and syntax
Dependency graphValidates depends_on chains for circular dependencies
Port conflict detectionIdentifies duplicate host port bindings
Volume mount checksValidates volume paths and mount configurations
Network analysisChecks network definitions and service connectivity
# Full validation
python scripts/compose_validator.py --file docker-compose.yml

# Check port conflicts only
python scripts/compose_validator.py --file docker-compose.yml --check-ports

# JSON output
python scripts/compose_validator.py --file docker-compose.yml --format json

Workflows

Dockerfile Review Workflow

  1. Analyze - Run dockerfile_analyzer.py against the target Dockerfile
  2. Review findings - Address critical security issues first (root user, secrets)
  3. Optimize layers - Combine RUN statements, reorder for cache efficiency
  4. Validate base images - Switch to minimal base images where possible
  5. Re-analyze - Confirm improvements and verify no regressions

Compose Validation Workflow

  1. Validate structure - Run compose_validator.py for syntax and schema checks
  2. Check dependencies - Review service dependency graph for circular refs
  3. Audit ports - Ensure no host port conflicts across services
  4. Review volumes - Confirm volume mounts are correct and necessary
  5. Network review - Verify service isolation and connectivity

CI Integration Workflow

# Example GitHub Actions step
- name: Docker Lint
  run: |
    python scripts/dockerfile_analyzer.py --file Dockerfile --format json > results.json
    python scripts/compose_validator.py --file docker-compose.yml --format json >> results.json

Reference Documentation

Common Patterns Quick Reference

PatternGoodBad
Base imageFROM python:3.12-slimFROM python:latest
UserUSER appuserRunning as root
Layer combiningRUN apt-get update && apt-get install -y pkgSeparate RUN for update and install
COPY orderingCopy requirements first, then codeCopy everything at once
Multi-stageUse builder stage + minimal runtimeSingle stage with build tools
SecretsUse build secrets or env at runtimeCOPY.env. or ENV SECRET=value
Health checksHEALTHCHECK CMD curl -f http://localhost/No health check defined
.dockerignoreInclude node_modules,.git, etc.No.dockerignore file

Compose Patterns

PatternGoodBad
Restart policyrestart: unless-stoppedNo restart policy
Resource limitsdeploy.resources.limits setUnlimited resources
Named volumesvolumes: [db-data:/var/lib/postgresql]Anonymous volumes
NetworksExplicit network definitionsDefault bridge only
Environmentenv_file:.envInline secrets in compose

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.68%
按下载量换算78

Claude

29.37%
按下载量换算62

Cursor

19.13%
按下载量换算41

Gemini CLI

7.97%
按下载量换算17

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills