dockerfile-linting

dockerfile-linting is a skill for Claude Code, Codex from abdullahkhawer/devops-skills. It costs 33 tokens per session (640 once invoked), scanned A, original, Apache-2.0.

A Dockerfile checking guide that uses Hadolint to find problems and style issues in Docker build instructions. Dockerfiles describe how to build container images, which package an application with its runtime files.

In plain words
What is it for?
It is for locating Dockerfiles, reporting findings with rule codes and severity, and suggesting corrections such as pinned package versions or safer command forms.
Why use it?
It finds common build, security, and maintenance problems before an image is built or deployed. It does not change the file automatically, so each suggested fix can be reviewed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for locating Dockerfiles, reporting findings with rule codes and severity, and suggesting corrections such as pinned package versions or safer command forms.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/dockerfile-linting
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.

Any agent
npx skills add abdullahkhawer/devops-skills --skill dockerfile-linting
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

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 dockerfile-linting

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/dockerfile-linting/github.svg)](https://agentmods.dev/skills/abdullahkhawer/devops-skills/dockerfile-linting)
Your own site
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/dockerfile-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/dockerfile-linting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dockerfile-linting

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/dockerfile-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/dockerfile-linting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00033 $0.00640
Opus 5.5 $0.00013 $0.00256
Sonnet 5.5 $0.00007 $0.00128
Haiku 4.5 $0.00003 $0.00064

Measured 23d ago against content hash 846679d13ef5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dockerfile-linting scanned grade A with 0 findings 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 23d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dockerfile-linting/SKILL.md · 65 lines

How it starts

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

Dockerfile Linting Skill

Run this skill when asked to lint or check a Dockerfile for issues.

Step 1 — Detect available tooling

which hadolint 2>/dev/null
ls .hadolint.yaml .hadolint.yml 2>/dev/null

If hadolint is not installed, inform the user and ask before installing:

brew install hadolint

Step 2 — Find Dockerfiles

find . -type f \( -iname "Dockerfile" -o -iname "Dockerfile.*" -o -iname "*.dockerfile" \) -not -path "*/node_modules/*" -not -path "*/.git/*"

Step 3 — Run linting (read-only check)

hadolint <Dockerfile>

Respect the project's .hadolint.yaml if present (e.g. ignored rules) — do not override it.

Report all findings grouped by file, with line numbers, rule codes (e.g. DL3008), and severity (error/warning/info/style).


Step 4 — Explain and suggest fixes

hadolint does not auto-fix — for each finding, show the offending line and a suggested replacement. Common fixes:

  • DL3008/DL3018/DL3028: pin package versions (e.g. apt-get install -y package=1.2.3).
  • DL3009: clean up package manager caches in the same RUN layer.
  • DL3025: use JSON/exec form for CMD/ENTRYPOINT.
  • DL3002: avoid running as root — add a USER instruction.
  • DL3006: pin the base image tag (avoid latest).
  • DL4006: set SHELL ["/bin/bash", "-o", "pipefail", "-c"] before any piped RUN command.

Rules

  • NEVER install hadolint without asking the user first.
  • Respect the project's existing .hadolint.yaml ignore list — do not re-flag rules the project has intentionally silenced, but you may mention them if they look unsafe (e.g. ignoring DL3002, running as root).
  • Report the exact command run and its full output — do not summarize away findings.
  • Always flag missing non-root USER, unpinned base image tags, and unpinned package versions even if hadolint's default severity for them is only "info" or "style" — these are security-relevant in production images.
  • Do not suggest disabling a rule via inline # hadolint ignore=DLxxxx comments unless the user explicitly asks for an exception and confirms the reason.

Read the full file on GitHub · 65 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. 23d ago First seen · 65 lines · 33 tokens per session scan A 846679d13ef5

Subscribe to this mod's changes

dockerfile-linting is a skill published in the GitHub repository abdullahkhawer/devops-skills (8 stars, last pushed 24d ago), licensed Apache-2.0. It adds 33 tokens to every session and 640 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.

Related

Other skills, from other repositories

docker-build-deploy

Use when containerizing a Node.js app and setting up GitHub Actions CI/CD to build, push to GHCR, and deploy via SSH. Multi-stage build, non-root user, caching.

wu529778790/shenzjd-skills · 44 tokens

development-environment

IDE setup, dev containers, and local development tools.

miles990/claude-software-skills · 14 tokens

docs-manage

Manage the Grounded Docs MCP Server documentation index. Covers scraping and indexing documentation from URLs or local files, refreshing existing indexes with changed content, removing libraries from the index, and compacting the SQLite store. Use when you need to add, update, or delete indexed documentation, or…

arabold/docs-mcp-server · 67 tokens

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens

implementing-container-image-minimal-base-with-distroless

Reduce container attack surface by building application images on Google distroless base images that contain only the application runtime with no shell, package manager, or unnecessary OS utilities.

xalgorix/xalgorix · 45 tokens

dokploy-deploy

This skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".

fcakyon/claude-codex-settings · 63 tokens