Review a Dockerfile
Checks an image build for size, layer caching, and anything that ships a secret.
- What it does?
- Checks an image build for size, layer caching, and anything that ships a secret.
- Name
- review-a-dockerfile
- Organisation
- DAC
- Visibility
- Public
- Author
- rajivgandhi.c+pa@digitalapi.ai
- Updated
- Wed, 23 Sep 2026 - 22:49
- Inputs
- 0
Review a Dockerfile
Use this when someone asks you to look over a Dockerfile before it is built and pushed.
Steps
- Check the base image: pinned to a digest or a specific tag, and still maintained.
- Check layer order: the things that change least come first, so the cache holds; dependency manifests are copied before the source tree.
- Look for anything that ships a secret: copied .env files, tokens in build arguments, credentials baked into layers.
- Check the final stage runs as a non-root user and exposes only the ports it needs.
- Report what would fail a review, then what would make the image smaller or faster to build.
What not to do
Do not rewrite the file. Point at the line, say what is wrong and why.
Raw markdown (SKILL.md)
# Review a Dockerfile Use this when someone asks you to look over a Dockerfile before it is built and pushed. ## Steps 1. Check the base image: pinned to a digest or a specific tag, and still maintained. 2. Check layer order: the things that change least come first, so the cache holds; dependency manifests are copied before the source tree. 3. Look for anything that ships a secret: copied .env files, tokens in build arguments, credentials baked into layers. 4. Check the final stage runs as a non-root user and exposes only the ports it needs. 5. Report what would fail a review, then what would make the image smaller or faster to build. ## What not to do Do not rewrite the file. Point at the line, say what is wrong and why.
This skill declares no inputs. It works from whatever the conversation already contains.
--- name: review-a-dockerfile description: 'Checks an image build for size, layer caching, and anything that ships a secret.' --- # Review a Dockerfile Use this when someone asks you to look over a Dockerfile before it is built and pushed. ## Steps 1. Check the base image: pinned to a digest or a specific tag, and still maintained. 2. Check layer order: the things that change least come first, so the cache holds; dependency manifests are copied before the source tree. 3. Look for anything that ships a secret: copied .env files, tokens in build arguments, credentials baked into layers. 4. Check the final stage runs as a non-root user and exposes only the ports it needs. 5. Report what would fail a review, then what would make the image smaller or faster to build. ## What not to do Do not rewrite the file. Point at the line, say what is wrong and why.
Try this skill in the playground
Run it against the portal's model with your own sample inputs and see what it answers, before you add it to an agent.