Skip to content
TrustedSkillsbeta
Back to all skills

Dockerfile Optimise

Listed
pproenca·vlatest·cloud·MIT

Optimizes Dockerfiles for smaller image sizes and faster builds, improving deployment efficiency and reducing storage costs.

Install on your platform

Showing Claude Code. One command installs this skill into any of the agents below.

  1. 1

    Run this in your project

    terminal
    $ npx skills add pproenca/dot-skills --skill dockerfile-optimise -a claude-code
  2. Uses the open-source skills CLI and needs Node.js. Add -g to install it for your user instead of this project.

What we know about this skill

Publisher

pproenca

Taken from the source listing. We haven't verified who controls this account.

Install target

Live repository

Not pinned. Installing fetches whatever the repository holds at the time you run the command.

No human has reviewed this code. The checks below are a static scan of the files at one commit — nobody has run this skill or judged whether it works. A skill runs with whatever access you give your agent, so read the source before you install it.

Automated safety checks

scanned

This skill failed 3 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.

  • No undeclared network calls: failed

    Contacts 1 host that is neither well-known infrastructure nor declared in the skill's frontmatter: deb.nodesource.com.

    Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.

    Hosts contacted

    deb.nodesource.comundeclared

    What it found

    • skills/.experimental/dockerfile-optimise/references/lint-pipefail.md:47contacts deb.nodesource.com
      RUN ["/bin/bash", "-c", "set -o pipefail && curl -fsSL https://deb.nodesource.com/setup_22.x | bash -"]
  • No credential access: failed

    Touches credential material in 6 places.

    Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.

    What it found (3 of 6)

    • skills/.experimental/dockerfile-optimise/references/sec-ssh-mounts.md:20SSH private keys or config
      COPY id_rsa /root/.ssh/id_rsa
    • skills/.experimental/dockerfile-optimise/references/sec-ssh-mounts.md:21SSH private keys or config
      RUN chmod 600 /root/.ssh/id_rsa && \
    • skills/.experimental/dockerfile-optimise/references/sec-ssh-mounts.md:22SSH private keys or config
      ssh-keyscan github.com >> /root/.ssh/known_hosts && \
  • No pipe-to-shell installers: failed

    Runs code fetched at install time in 4 places.

    No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.

    What it found (3 of 4)

    • skills/.experimental/dockerfile-optimise/references/lint-pipefail.md:21remote script piped into a shell
      RUN wget -O - https://example.com/install.sh | bash
    • skills/.experimental/dockerfile-optimise/references/lint-pipefail.md:35remote script piped into a shell
      RUN set -o pipefail && wget -O - https://example.com/install.sh | bash
    • skills/.experimental/dockerfile-optimise/references/lint-pipefail.md:47remote script piped into a shell
      RUN ["/bin/bash", "-c", "set -o pipefail && curl -fsSL https://deb.nodesource.com/setup_22.x | bash -"]
  • Declares what it does: passed

    SKILL.md parses and declares a name and a description.

    SKILL.md exists, its frontmatter parses, and it declares a name and a description.

  • No obfuscated payloads: passed

    No encoded or obfuscated payloads.

    No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.

  • Pinned to a commit: passed

    Scanned pproenca/dot-skills at cf93c57cac.

    The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.

Scanned
51 files, 3,762 lines
This is a static scan, not a review. It reads the skill's files; it does not run them, and it cannot tell you whether the skill is any good or whether the code does what its description says. A skill runs with whatever access you give your agent.
What each check looks for →

About this skill

The dockerfile-optimise skill analyzes Dockerfiles to identify inefficiencies and suggest improvements for build performance and image size. It automatically detects best practice violations, such as unnecessary layers or inefficient instructions, and provides actionable refactoring recommendations.

When to use it

  • Reducing the final size of production Docker images before deployment.
  • Accelerating CI/CD pipeline builds by minimizing Docker layer count.
  • Auditing legacy Dockerfiles for security vulnerabilities and maintenance issues.
  • Standardizing multi-stage build patterns across a project's containerization strategy.

Key capabilities

  • Parses existing Dockerfile syntax to understand the build context.
  • Identifies redundant instructions that create unnecessary image layers.
  • Suggests optimizations for ordering commands to leverage Docker layer caching effectively.
  • Recommends multi-stage build configurations to separate build tools from runtime dependencies.

Example prompts

  • "Analyze my Dockerfile and list all opportunities to reduce the final image size."
  • "Refactor this Dockerfile to use multi-stage builds for a Node.js application."
  • "Identify any security risks or best practice violations in this container definition."

Tips & gotchas

Ensure your source Dockerfile is complete and includes all necessary context, as missing instructions may lead to incomplete optimization suggestions. While the tool provides strong recommendations, always manually review generated code before applying it to production environments to ensure compatibility with your specific runtime requirements.