← Browse

@berkcangumusisik/docker-build

A

Creates or optimizes a Dockerfile for the current project

skillclaude

Install

agr install @berkcangumusisik/docker-build --target claude

Writes 1 file into .claude/skills/, pinned to git-6196962e.

  • .claude/skills/docker-build/SKILL.md

Document


name: docker-build description: Creates or optimizes a Dockerfile for the current project user-invocable: true allowed-tools: Read Glob Bash Edit effort: medium

Docker Setup

  1. Detect project type:
cat package.json 2>/dev/null | grep '"main"\|"start"\|"scripts"' -A 5
ls -la | grep -E "Dockerfile|docker-compose|\.dockerignore"
  1. If Dockerfile exists, review it for:

    • Multi-stage build (build stage vs runtime stage)
    • Layer caching order (dependencies before source)
    • Running as non-root user
    • .dockerignore completeness
    • Image size optimization
  2. If no Dockerfile, generate one following best practices:

# Multi-stage: build → runtime
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production

FROM node:20-alpine AS runtime
RUN addgroup -S app && adduser -S app -G app
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY . .
USER app
EXPOSE 3000
CMD ["node", "dist/index.js"]
  1. Also create/update .dockerignore:
node_modules
dist
.env*
.git
coverage
*.test.*
  1. Show docker build and docker run commands to test.

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-6196962e9cc42026-07-31